cirq-core 1.5.0.dev20250110201758__py3-none-any.whl → 1.5.0.dev20250112044102__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of cirq-core might be problematic. Click here for more details.

cirq/_version.py CHANGED
@@ -28,4 +28,4 @@ if sys.version_info < (3, 10, 0): # pragma: no cover
28
28
  'of cirq (e.g. "python -m pip install cirq==1.1.*")'
29
29
  )
30
30
 
31
- __version__ = "1.5.0.dev20250110201758"
31
+ __version__ = "1.5.0.dev20250112044102"
cirq/_version_test.py CHANGED
@@ -3,4 +3,4 @@ import cirq
3
3
 
4
4
 
5
5
  def test_version():
6
- assert cirq.__version__ == "1.5.0.dev20250110201758"
6
+ assert cirq.__version__ == "1.5.0.dev20250112044102"
@@ -130,7 +130,7 @@ class RandomizedBenchMarkResult:
130
130
 
131
131
  $$r_p = (1 - 1/d^2) * (1 - p),$$
132
132
 
133
- where $d = 2^N_Q$ is the Hilbert space dimension and $N_Q$ is the number of qubits.
133
+ where $d = 2^{N_Q}$ is the Hilbert space dimension and $N_Q$ is the number of qubits.
134
134
  """
135
135
  opt_params, _ = self._fit_exponential()
136
136
  p = opt_params[2]
@@ -150,6 +150,7 @@ def _class_resolver_dictionary() -> Dict[str, ObjectFactory]:
150
150
  'IdentityGate': cirq.IdentityGate,
151
151
  'InitObsSetting': cirq.work.InitObsSetting,
152
152
  'InsertionNoiseModel': InsertionNoiseModel,
153
+ '_InverseCompositeGate': raw_types._InverseCompositeGate,
153
154
  'KeyCondition': cirq.KeyCondition,
154
155
  'KrausChannel': cirq.KrausChannel,
155
156
  'LinearDict': cirq.LinearDict,
@@ -333,7 +333,7 @@ class DepolarizingChannel(raw_types.Gate):
333
333
  """The probability that one of the Pauli gates is applied.
334
334
 
335
335
  Each of the Pauli gates is applied independently with probability
336
- $p / (4^n_qubits - 1)$.
336
+ $p / (4^n - 1)$, where $n$ is `n_qubits`.
337
337
  """
338
338
  return self._p
339
339
 
@@ -372,7 +372,7 @@ def depolarize(p: float, n_qubits: int = 1) -> DepolarizingChannel:
372
372
  Args:
373
373
  p: The probability that one of the Pauli gates is applied. Each of
374
374
  the Pauli gates is applied independently with probability
375
- $p / (4^n - 1)$.
375
+ $p / (4^n - 1)$, where $n$ is n_qubits.
376
376
  n_qubits: The number of qubits.
377
377
 
378
378
  Raises:
@@ -506,7 +506,6 @@ def test_gate_to_operation_to_gate_round_trips():
506
506
  cirq.transformers.measurement_transformers._ConfusionChannel,
507
507
  cirq.transformers.measurement_transformers._ModAdd,
508
508
  cirq.transformers.routing.visualize_routed_circuit._SwapPrintGate,
509
- cirq.ops.raw_types._InverseCompositeGate,
510
509
  cirq.circuits.qasm_output.QasmTwoQubitGate,
511
510
  cirq.ops.MSGate,
512
511
  # Interop gates
@@ -80,7 +80,7 @@ class PhasedXZGate(raw_types.Gate):
80
80
  def from_zyz_exponents(cls, z0: float, y: float, z1: float) -> 'cirq.PhasedXZGate':
81
81
  """Create a PhasedXZGate from ZYZ exponents.
82
82
 
83
- The returned gate is equivalent to $Z^z0 Y^y Z^z1$ (in time order).
83
+ The returned gate is equivalent to $Z^{z0} Y^y Z^{z1}$ (in time order).
84
84
  """
85
85
  return PhasedXZGate(axis_phase_exponent=-z0 + 0.5, x_exponent=y, z_exponent=z0 + z1)
86
86
 
cirq/ops/raw_types.py CHANGED
@@ -1066,6 +1066,9 @@ class _InverseCompositeGate(Gate):
1066
1066
  def __str__(self) -> str:
1067
1067
  return f'{self._original!s}†'
1068
1068
 
1069
+ def _json_dict_(self) -> Dict[str, Any]:
1070
+ return {'original': self._original}
1071
+
1069
1072
 
1070
1073
  def _validate_qid_shape(val: Any, qubits: Sequence['cirq.Qid']) -> None:
1071
1074
  """Helper function to validate qubits for gates and operations.
@@ -0,0 +1,10 @@
1
+ {
2
+ "cirq_type": "_InverseCompositeGate",
3
+ "original": {
4
+ "cirq_type": "QubitPermutationGate",
5
+ "permutation": [
6
+ 0,
7
+ 1,
8
+ 2
9
+ ]}
10
+ }
@@ -0,0 +1 @@
1
+ (cirq.QubitPermutationGate(permutation=(0, 1, 2))**-1)
@@ -29,7 +29,7 @@ def _matrix_for_phasing_state(num_qubits, phase_state, phase):
29
29
 
30
30
  @dataclasses.dataclass(frozen=True)
31
31
  class PhaseUsingCleanAncilla(ops.Gate):
32
- r"""Phases the state $|phase_state>$ by $\exp(1j * \pi * \theta)$ using one clean ancilla."""
32
+ r"""Phases the state $|phase\_state>$ by $\exp(1j * \pi * \theta)$ using one clean ancilla."""
33
33
 
34
34
  theta: float
35
35
  phase_state: int = 1
@@ -56,7 +56,7 @@ class PhaseUsingCleanAncilla(ops.Gate):
56
56
 
57
57
  @dataclasses.dataclass(frozen=True)
58
58
  class PhaseUsingDirtyAncilla(ops.Gate):
59
- r"""Phases the state $|phase_state>$ by -1 using one dirty ancilla."""
59
+ r"""Phases the state $|phase\_state>$ by -1 using one dirty ancilla."""
60
60
 
61
61
  phase_state: int = 1
62
62
  target_bitsize: int = 1
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: cirq-core
3
- Version: 1.5.0.dev20250110201758
3
+ Version: 1.5.0.dev20250112044102
4
4
  Summary: A framework for creating, editing, and invoking Noisy Intermediate Scale Quantum (NISQ) circuits.
5
5
  Home-page: http://github.com/quantumlib/cirq
6
6
  Author: The Cirq Developers
@@ -4,10 +4,10 @@ cirq/_compat_test.py,sha256=Qq3ZcfgD-Nb81cEppQdJqhAyrVqXKtfXZYGXT0p-Wh0,34718
4
4
  cirq/_doc.py,sha256=yDyWUD_2JDS0gShfGRb-rdqRt9-WeL7DhkqX7np0Nko,2879
5
5
  cirq/_import.py,sha256=p9gMHJscbtDDkfHOaulvd3Aer0pwUF5AXpL89XR8dNw,8402
6
6
  cirq/_import_test.py,sha256=6K_v0riZJXOXUphHNkGA8MY-JcmGlezFaGmvrNhm3OQ,1015
7
- cirq/_version.py,sha256=GbAnjnvuMnn-5NitjN5EeS5K-od08hnVtTqUdqGkJww,1206
8
- cirq/_version_test.py,sha256=N-g4OoGgc0YgOMIxJIZn_-ucrJ7z8PnHwfZtHQGA3Yo,147
7
+ cirq/_version.py,sha256=ZHpR6MHYaUWIvgkD-DUNzrD_q8GFYJcngAzkN8i47DQ,1206
8
+ cirq/_version_test.py,sha256=MeKMfQ2lHz6vEI144yzc3wbt3yaazaA6UVuM4Mnm8cA,147
9
9
  cirq/conftest.py,sha256=X7yLFL8GLhg2CjPw0hp5e_dGASfvHx1-QT03aUbhKJw,1168
10
- cirq/json_resolver_cache.py,sha256=5fPH07VyuACPlPo8ifHTAePrasf-pKwQ12Wf-Nz96Uw,13636
10
+ cirq/json_resolver_cache.py,sha256=cpbvJMNIh0U-l1mEVb-TqhJUEXfm2vpuR3v432ORSmg,13702
11
11
  cirq/py.typed,sha256=VFSlmh_lNwnaXzwY-ZuW-C2Ws5PkuDoVgBdNCs0jXJE,63
12
12
  cirq/circuits/__init__.py,sha256=HKunqRpZoDmjy1IiK9Cn84MTGT84_PMeQ5VDCPafcWk,1335
13
13
  cirq/circuits/_block_diagram_drawer.py,sha256=06ceNV01cMx4irIGYnztfLt_HDNhK3AwfsiNh686hjU,9510
@@ -183,7 +183,7 @@ cirq/experiments/n_qubit_tomography.py,sha256=9M_kf2-1hvFxfZOWND7ACwHYgD9SJU5nYF
183
183
  cirq/experiments/n_qubit_tomography_test.py,sha256=wHfV2OpGYSDXfoyEh-B5dc1Dv8sxKNFbUoHyjIWZoFk,4362
184
184
  cirq/experiments/purity_estimation.py,sha256=6D1UwFlQRzHeajXMTyTUfBYAc0jJQ8Cfz4lteFKeUaM,2467
185
185
  cirq/experiments/purity_estimation_test.py,sha256=xlBGp0NOBYR0IhTy3bckHPgi81FkGSGxKqk9hwXG-I8,923
186
- cirq/experiments/qubit_characterizations.py,sha256=-a-krc7Pw68VjsVvQmeZ92oXrpeME31j4cVrAkKFkr4,36730
186
+ cirq/experiments/qubit_characterizations.py,sha256=hhbs_6aCLb4co0Y6TNJGiSmmjE8smGUHQh1cfC1dI7U,36732
187
187
  cirq/experiments/qubit_characterizations_test.py,sha256=b_ONqxyW6s01Ts8T65BEdb4e8Xy24Qp4zTGXWesL0ic,9733
188
188
  cirq/experiments/random_quantum_circuit_generation.py,sha256=tTgo1mEbLhY8i9VzR-p6xPqnv-O62TlJyW8AGj4V56M,28269
189
189
  cirq/experiments/random_quantum_circuit_generation_test.py,sha256=zOWsLLcYefG0yA1rKn-hwdNjNANBXDaKg4vAUXPIwHk,16522
@@ -272,7 +272,7 @@ cirq/ops/classically_controlled_operation.py,sha256=qTOsbGRZFbQIaBj9iee31V_V8oML
272
272
  cirq/ops/classically_controlled_operation_test.py,sha256=nIYyXfNH4E2IibZSLk6QDVHpfJQbuI_iWwirCH8rhi8,50209
273
273
  cirq/ops/clifford_gate.py,sha256=qAKS0wqqoHljOF63treyR95I6H0yWFZBiHQoM4sLgSc,39350
274
274
  cirq/ops/clifford_gate_test.py,sha256=NF_if1X8LCMA9hy0vBO7lxvVPdumlvMMnI2XRQ-RLpk,37472
275
- cirq/ops/common_channels.py,sha256=uqgocTUhtuJ4VZI_9_3L34gBRTf1A10mByhZY4Q1fB8,38283
275
+ cirq/ops/common_channels.py,sha256=d53FzwsYK89vE5SV4PEoy96BPJHtdi522Rq0RRuc88M,38324
276
276
  cirq/ops/common_channels_test.py,sha256=EL_PxbqD3KPC8ioihiukhmW8bUdclqqigKoFyUQpmIM,29690
277
277
  cirq/ops/common_gate_families.py,sha256=e5M8wlDYtdrpWBrhdns6iizIvSqzfxDyIsBdxt8hVMc,8611
278
278
  cirq/ops/common_gate_families_test.py,sha256=Oo3C7BPO3gt3ePuqwsI_lx_lY38et8Ps4AuVydX2Aww,5275
@@ -297,7 +297,7 @@ cirq/ops/fsim_gate_test.py,sha256=4kFk0ALzTmaskQURHPl6JerNvw8gbZn49nt1_WAjpdY,25
297
297
  cirq/ops/gate_features.py,sha256=414mSi3kgKSwLOeAG_WEZKn8ZMaLtOowed7os1qSnM4,1049
298
298
  cirq/ops/gate_features_test.py,sha256=mnlqJnSpllcOnTUdvmUs_ssnPRhAIgHhKIAK2Z86Dfg,2347
299
299
  cirq/ops/gate_operation.py,sha256=IGCyqe9YguIlajnQ3EV61Y0vUxOT_SrRxvNEFwKtUak,13720
300
- cirq/ops/gate_operation_test.py,sha256=ftd-GZxvOtzFS1L153K89_PV1volGroU7G5nFGp9afE,17507
300
+ cirq/ops/gate_operation_test.py,sha256=3sXTtOR3tkrF6C0jCcDexC0qrHCiqcjRClsvc9NXPq8,17457
301
301
  cirq/ops/gateset.py,sha256=Tx1CIlve0RhnX9jHZsCVw7EHtfC6b3drbBncmCEtcsQ,21634
302
302
  cirq/ops/gateset_test.py,sha256=BY5UJ1k3NC0jz0d4yocyO1qcQU6e4UbN9mapWE7z7AM,16361
303
303
  cirq/ops/global_phase_op.py,sha256=4qYUov6BnBql2_yqUHI9DE60fLiLmCsKI9ZkfMLRRyo,4826
@@ -346,7 +346,7 @@ cirq/ops/phased_iswap_gate.py,sha256=j55nFjdF0r63oaT7cGw0YtosavaV24qUjC9T-8Y4Ghw
346
346
  cirq/ops/phased_iswap_gate_test.py,sha256=oH3RQ8tlSD0sU5Cf3M0uR92y3M1Xd7Yk3ayOoca9Neg,6708
347
347
  cirq/ops/phased_x_gate.py,sha256=qjlkdbj7SWMvgTJkTqEqsLe2XDgAGioA6ayanns-apg,9983
348
348
  cirq/ops/phased_x_gate_test.py,sha256=IpY-Z-MsqtYbyIEdxWu1NqgAJF2B7nddxPc2Hxafr4s,10202
349
- cirq/ops/phased_x_z_gate.py,sha256=L4BnAdbKlT66ZKvKGxNnRpDw6gjjxI1JTFTEVPKpOQM,11559
349
+ cirq/ops/phased_x_z_gate.py,sha256=uVmROoiKYxGPs_QZbpwoi7EmVHV4J2-LRa7jyLeIbCM,11563
350
350
  cirq/ops/phased_x_z_gate_test.py,sha256=KK5-FD5zoaqZkw7p6UKxFddzaFWoxnQnE8LpCiKtIk8,10690
351
351
  cirq/ops/projector.py,sha256=Eftqti8lwHvzsSFMUzcC8XGaMeH6fdGUdcWprZoMfX8,5686
352
352
  cirq/ops/projector_test.py,sha256=Wq7ddj-PV30yUXJxJoT3XIw2sIUC1AilnZ9m9N5Ejr8,9063
@@ -359,7 +359,7 @@ cirq/ops/qubit_order_or_list.py,sha256=WVnhQcOYCgAhiB4t47Kji-pN1tnvs--X5deCQwwGV
359
359
  cirq/ops/qubit_order_test.py,sha256=B9xMIxlaI7YjRUNA6AkHJuUCFejGYw-lT7ZaSl31yTU,4238
360
360
  cirq/ops/random_gate_channel.py,sha256=gKDqZa6AwdCIuuh2UOvO5oxCdGRDOInA7fI3ZLQ-LTY,5121
361
361
  cirq/ops/random_gate_channel_test.py,sha256=U3EAaAlCZkgFIYxqwcSkPsaVGrKA2PSeG_DK2ou--AE,8606
362
- cirq/ops/raw_types.py,sha256=NbzQA7er7T8Un9TrMzc61abqASSTcMFkVxhnav_09Vw,41156
362
+ cirq/ops/raw_types.py,sha256=4RoBhgadVHSsPaq5aaDzgBT--uKo_Pmvd-8yLyF9VHY,41246
363
363
  cirq/ops/raw_types_test.py,sha256=bZUOQSfPDZgH6Z98PKX0oBP2iWXwSh3b9dty1dFcFfM,33620
364
364
  cirq/ops/state_preparation_channel.py,sha256=PjVtoLbjBAy_XqnFAY40Am-NifeuCFVVLW6RJxph5sQ,4778
365
365
  cirq/ops/state_preparation_channel_test.py,sha256=yKUvLw_ft6cvIgRJcFQ779wZS-V6V-pzQq-rZRWdCmU,5922
@@ -810,6 +810,8 @@ cirq/protocols/json_test_data/Zip.json,sha256=3L4Lazj5oksJCit2cvXhwnNJSDNh2kCGtc
810
810
  cirq/protocols/json_test_data/Zip.repr,sha256=xlnQ1-q0aTS9t1mMO7vdCSj14QAuff1kTMCTX7TvzIk,103
811
811
  cirq/protocols/json_test_data/ZipLongest.json,sha256=NEPlMm8IPrDHBrvyASwq9IZu5fROzqG5u9PiTbe8vXM,280
812
812
  cirq/protocols/json_test_data/ZipLongest.repr,sha256=F-Ds7_1eqKgis0YvJqj3LwiXbkH8ZdP9k_ThmWsJL4k,110
813
+ cirq/protocols/json_test_data/_InverseCompositeGate.json,sha256=04Jo6qCe2RCkOZZHP_jMqgSkCP0Y26ZdXOeU9UJuQd8,172
814
+ cirq/protocols/json_test_data/_InverseCompositeGate.repr,sha256=MiivoajhEj7wtXepm3ZKJC2tKKN4LUFbmZBe2WQU4mg,54
813
815
  cirq/protocols/json_test_data/_MeasurementSpec.json,sha256=c03X4XXcc9xz8rqLHnlUeEI74JeDcT1AuafZUyqNOtg,1288
814
816
  cirq/protocols/json_test_data/_MeasurementSpec.repr,sha256=RO09cD6h-Th8dwtERQ6bPW8tVZFFUW8JngAzc-ASib4,285
815
817
  cirq/protocols/json_test_data/_NoNoiseModel.json,sha256=mgmgKTFYinC7Jy6tyVtLzDlNAs57OtgImnGLS3D__TI,44
@@ -1016,7 +1018,7 @@ cirq/testing/routing_devices.py,sha256=uIm0j7GcChiHog9-c7kyIw9qdfBEmLLETRF37UwLv
1016
1018
  cirq/testing/routing_devices_test.py,sha256=iyNZp3J8fUt8bOktXZNhDgxR6L8UBRphgzYmDsmHvTw,5598
1017
1019
  cirq/testing/sample_circuits.py,sha256=8HTrY_RWoPHV18q7aLz6e5Fjd2Twkt9Wkc_IDBzTE1o,1585
1018
1020
  cirq/testing/sample_circuits_test.py,sha256=IMz72CMXJeRt7Eg1rRB68hFV1v3k7OQpYUyhqmfjNpo,876
1019
- cirq/testing/sample_gates.py,sha256=qSCZhb-A-Mwm_J81Su2sUFyEUdvqfq7Je66dsk8cFy0,3277
1021
+ cirq/testing/sample_gates.py,sha256=4yBPuMiF3OA5tSBvM-uAiL71LwxBAEnzXNn084Sh7jU,3279
1020
1022
  cirq/testing/sample_gates_test.py,sha256=mkfYPNo4WFH6y33Vr_f9zy2Ry1oq5yYLpB__sqSCkjQ,2377
1021
1023
  cirq/testing/_compat_test_data/__init__.py,sha256=T9LHBgX2CLUvAloqrH0F1AAXdtgMuQvG3vZZhNbg61A,3028
1022
1024
  cirq/testing/_compat_test_data/module_a/__init__.py,sha256=hiodvWwXhGy7bG6L5CrM1vC3UIHY351RuK4As_joaMk,415
@@ -1201,8 +1203,8 @@ cirq/work/sampler.py,sha256=bE5tmVkcR6cZZMLETxDfHehdsYUMbx2RvBeIBetehI4,19187
1201
1203
  cirq/work/sampler_test.py,sha256=hL2UWx3dz2ukZVNxWftiKVvJcQoLplLZdQm-k1QcA40,13282
1202
1204
  cirq/work/zeros_sampler.py,sha256=x1C7cup66a43n-3tm8QjhiqJa07qcJW10FxNp9jJ59Q,2356
1203
1205
  cirq/work/zeros_sampler_test.py,sha256=JIkpBBFPJe5Ba4142vzogyWyboG1Q1ZAm0UVGgOoZn8,3279
1204
- cirq_core-1.5.0.dev20250110201758.dist-info/LICENSE,sha256=tAkwu8-AdEyGxGoSvJ2gVmQdcicWw3j1ZZueVV74M-E,11357
1205
- cirq_core-1.5.0.dev20250110201758.dist-info/METADATA,sha256=AUrdYaofbOhZew67oWCZri4EfKfaP9chFEmtJlFtgzI,2105
1206
- cirq_core-1.5.0.dev20250110201758.dist-info/WHEEL,sha256=tZoeGjtWxWRfdplE7E3d45VPlLNQnvbKiYnx7gwAy8A,92
1207
- cirq_core-1.5.0.dev20250110201758.dist-info/top_level.txt,sha256=Sz9iOxHU0IEMLSFGwiwOCaN2e9K-jFbBbtpPN1hB73g,5
1208
- cirq_core-1.5.0.dev20250110201758.dist-info/RECORD,,
1206
+ cirq_core-1.5.0.dev20250112044102.dist-info/LICENSE,sha256=tAkwu8-AdEyGxGoSvJ2gVmQdcicWw3j1ZZueVV74M-E,11357
1207
+ cirq_core-1.5.0.dev20250112044102.dist-info/METADATA,sha256=_Sr3aGIIUk8nHrqrBsjLqKjgbdUkBtvNXOnudtTxmm4,2105
1208
+ cirq_core-1.5.0.dev20250112044102.dist-info/WHEEL,sha256=tZoeGjtWxWRfdplE7E3d45VPlLNQnvbKiYnx7gwAy8A,92
1209
+ cirq_core-1.5.0.dev20250112044102.dist-info/top_level.txt,sha256=Sz9iOxHU0IEMLSFGwiwOCaN2e9K-jFbBbtpPN1hB73g,5
1210
+ cirq_core-1.5.0.dev20250112044102.dist-info/RECORD,,