cirq-core 1.5.0.dev20250128015450__py3-none-any.whl → 1.5.0.dev20250128200057__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 +1 -1
- cirq/_version_test.py +1 -1
- cirq/ops/raw_types.py +12 -0
- cirq/protocols/equal_up_to_global_phase_protocol_test.py +6 -0
- {cirq_core-1.5.0.dev20250128015450.dist-info → cirq_core-1.5.0.dev20250128200057.dist-info}/METADATA +1 -1
- {cirq_core-1.5.0.dev20250128015450.dist-info → cirq_core-1.5.0.dev20250128200057.dist-info}/RECORD +9 -9
- {cirq_core-1.5.0.dev20250128015450.dist-info → cirq_core-1.5.0.dev20250128200057.dist-info}/LICENSE +0 -0
- {cirq_core-1.5.0.dev20250128015450.dist-info → cirq_core-1.5.0.dev20250128200057.dist-info}/WHEEL +0 -0
- {cirq_core-1.5.0.dev20250128015450.dist-info → cirq_core-1.5.0.dev20250128200057.dist-info}/top_level.txt +0 -0
cirq/_version.py
CHANGED
cirq/_version_test.py
CHANGED
cirq/ops/raw_types.py
CHANGED
|
@@ -464,6 +464,18 @@ class Gate(metaclass=value.ABCMetaImplementAnyOneOf):
|
|
|
464
464
|
"""
|
|
465
465
|
raise NotImplementedError
|
|
466
466
|
|
|
467
|
+
def _equal_up_to_global_phase_(
|
|
468
|
+
self, other: Any, atol: Union[int, float] = 1e-8
|
|
469
|
+
) -> Union[NotImplementedType, bool]:
|
|
470
|
+
"""Default fallback for gates that do not implement this protocol."""
|
|
471
|
+
try:
|
|
472
|
+
return protocols.equal_up_to_global_phase(
|
|
473
|
+
protocols.unitary(self), protocols.unitary(other), atol=atol
|
|
474
|
+
)
|
|
475
|
+
except TypeError:
|
|
476
|
+
# Gate has no unitary protocol
|
|
477
|
+
return NotImplemented
|
|
478
|
+
|
|
467
479
|
def _commutes_on_qids_(
|
|
468
480
|
self, qids: 'Sequence[cirq.Qid]', other: Any, *, atol: float = 1e-8
|
|
469
481
|
) -> Union[bool, NotImplementedType, None]:
|
|
@@ -117,3 +117,9 @@ def test_equal_up_to_global_phase_eq_supported():
|
|
|
117
117
|
# cast types
|
|
118
118
|
assert cirq.equal_up_to_global_phase(A(0.1), A(0.1j), atol=1e-2)
|
|
119
119
|
assert not cirq.equal_up_to_global_phase(1e-8j, B(0.0), atol=1e-10)
|
|
120
|
+
|
|
121
|
+
|
|
122
|
+
def test_equal_up_to_global_phase_non_eigen_gates():
|
|
123
|
+
gate1 = cirq.PhasedXPowGate(phase_exponent=1.5, exponent=1.0)
|
|
124
|
+
gate2 = cirq.PhasedXPowGate(phase_exponent=0.5, exponent=1.0)
|
|
125
|
+
assert cirq.equal_up_to_global_phase(gate1, gate2)
|
{cirq_core-1.5.0.dev20250128015450.dist-info → cirq_core-1.5.0.dev20250128200057.dist-info}/METADATA
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: cirq-core
|
|
3
|
-
Version: 1.5.0.
|
|
3
|
+
Version: 1.5.0.dev20250128200057
|
|
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
|
{cirq_core-1.5.0.dev20250128015450.dist-info → cirq_core-1.5.0.dev20250128200057.dist-info}/RECORD
RENAMED
|
@@ -4,8 +4,8 @@ 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=
|
|
8
|
-
cirq/_version_test.py,sha256=
|
|
7
|
+
cirq/_version.py,sha256=06ExUqafPJt3gaD2za1DWtnFSdmECJHhuL8P445lFf8,1206
|
|
8
|
+
cirq/_version_test.py,sha256=UJc0VYXp9W7KVJsLJeCV--MAz4AD46xIOQjZm9w7lf0,147
|
|
9
9
|
cirq/conftest.py,sha256=X7yLFL8GLhg2CjPw0hp5e_dGASfvHx1-QT03aUbhKJw,1168
|
|
10
10
|
cirq/json_resolver_cache.py,sha256=p-vEOa-8GQ2cFIAdze-kd6C1un1uRvtujVPljVKaHBg,13557
|
|
11
11
|
cirq/py.typed,sha256=VFSlmh_lNwnaXzwY-ZuW-C2Ws5PkuDoVgBdNCs0jXJE,63
|
|
@@ -360,7 +360,7 @@ cirq/ops/qubit_order_or_list.py,sha256=WVnhQcOYCgAhiB4t47Kji-pN1tnvs--X5deCQwwGV
|
|
|
360
360
|
cirq/ops/qubit_order_test.py,sha256=B9xMIxlaI7YjRUNA6AkHJuUCFejGYw-lT7ZaSl31yTU,4238
|
|
361
361
|
cirq/ops/random_gate_channel.py,sha256=gKDqZa6AwdCIuuh2UOvO5oxCdGRDOInA7fI3ZLQ-LTY,5121
|
|
362
362
|
cirq/ops/random_gate_channel_test.py,sha256=U3EAaAlCZkgFIYxqwcSkPsaVGrKA2PSeG_DK2ou--AE,8606
|
|
363
|
-
cirq/ops/raw_types.py,sha256=
|
|
363
|
+
cirq/ops/raw_types.py,sha256=n_v0flAXTxHFVNOKrOZRcOIPx1LIZ3F7wYfGJiAF9qk,42176
|
|
364
364
|
cirq/ops/raw_types_test.py,sha256=AtcaAgu50IK_bsMXo4MkM_fjWQj9EQrkn9ved0_cJoo,33872
|
|
365
365
|
cirq/ops/state_preparation_channel.py,sha256=PjVtoLbjBAy_XqnFAY40Am-NifeuCFVVLW6RJxph5sQ,4778
|
|
366
366
|
cirq/ops/state_preparation_channel_test.py,sha256=yKUvLw_ft6cvIgRJcFQ779wZS-V6V-pzQq-rZRWdCmU,5922
|
|
@@ -396,7 +396,7 @@ cirq/protocols/control_key_protocol_test.py,sha256=190gp4QBu5QpP2doMmzx9RkAkp6VZ
|
|
|
396
396
|
cirq/protocols/decompose_protocol.py,sha256=fFy75GOLiJWwNRVDNtl00-19xCJcI_n9J7GiKuMY2wU,18903
|
|
397
397
|
cirq/protocols/decompose_protocol_test.py,sha256=5L5lQN_FV9qtE3NHPsnxtdgUtY5uDEIfxZkBHbgDrGs,16025
|
|
398
398
|
cirq/protocols/equal_up_to_global_phase_protocol.py,sha256=0a93790FDjID46cX94PVAlA9i9Fu7uN8cj6qT94NH9w,4101
|
|
399
|
-
cirq/protocols/equal_up_to_global_phase_protocol_test.py,sha256=
|
|
399
|
+
cirq/protocols/equal_up_to_global_phase_protocol_test.py,sha256=5uypo6WHTp8AQU1KURl48euQG2J123AXEVFQ6v6cIeE,5964
|
|
400
400
|
cirq/protocols/has_stabilizer_effect_protocol.py,sha256=XH6Lv9SGuYhuuSB0mi5v8Eg5emR-vbICKUjjqfxDw1U,4295
|
|
401
401
|
cirq/protocols/has_stabilizer_effect_protocol_test.py,sha256=0ia7ehyGpmscjRP448dBANZKwnlbqSODdPUYRUhDEN0,3879
|
|
402
402
|
cirq/protocols/has_unitary_protocol.py,sha256=inj17qr8Pz2Zofj0Lsp2o7TWlfmdU1TybtRjs1TWVow,5372
|
|
@@ -1202,8 +1202,8 @@ cirq/work/sampler.py,sha256=bE5tmVkcR6cZZMLETxDfHehdsYUMbx2RvBeIBetehI4,19187
|
|
|
1202
1202
|
cirq/work/sampler_test.py,sha256=hL2UWx3dz2ukZVNxWftiKVvJcQoLplLZdQm-k1QcA40,13282
|
|
1203
1203
|
cirq/work/zeros_sampler.py,sha256=x1C7cup66a43n-3tm8QjhiqJa07qcJW10FxNp9jJ59Q,2356
|
|
1204
1204
|
cirq/work/zeros_sampler_test.py,sha256=JIkpBBFPJe5Ba4142vzogyWyboG1Q1ZAm0UVGgOoZn8,3279
|
|
1205
|
-
cirq_core-1.5.0.
|
|
1206
|
-
cirq_core-1.5.0.
|
|
1207
|
-
cirq_core-1.5.0.
|
|
1208
|
-
cirq_core-1.5.0.
|
|
1209
|
-
cirq_core-1.5.0.
|
|
1205
|
+
cirq_core-1.5.0.dev20250128200057.dist-info/LICENSE,sha256=tAkwu8-AdEyGxGoSvJ2gVmQdcicWw3j1ZZueVV74M-E,11357
|
|
1206
|
+
cirq_core-1.5.0.dev20250128200057.dist-info/METADATA,sha256=9ZvLVmHhdCVPv5LKiLkFWC_pV8q7wKvo7-a4uNFOmu0,2111
|
|
1207
|
+
cirq_core-1.5.0.dev20250128200057.dist-info/WHEEL,sha256=tZoeGjtWxWRfdplE7E3d45VPlLNQnvbKiYnx7gwAy8A,92
|
|
1208
|
+
cirq_core-1.5.0.dev20250128200057.dist-info/top_level.txt,sha256=Sz9iOxHU0IEMLSFGwiwOCaN2e9K-jFbBbtpPN1hB73g,5
|
|
1209
|
+
cirq_core-1.5.0.dev20250128200057.dist-info/RECORD,,
|
{cirq_core-1.5.0.dev20250128015450.dist-info → cirq_core-1.5.0.dev20250128200057.dist-info}/LICENSE
RENAMED
|
File without changes
|
{cirq_core-1.5.0.dev20250128015450.dist-info → cirq_core-1.5.0.dev20250128200057.dist-info}/WHEEL
RENAMED
|
File without changes
|
|
File without changes
|