cirq-core 1.5.0.dev20250123022814__py3-none-any.whl → 1.5.0.dev20250124083125__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/phased_iswap_gate.py +3 -4
- cirq/ops/phased_iswap_gate_test.py +21 -5
- {cirq_core-1.5.0.dev20250123022814.dist-info → cirq_core-1.5.0.dev20250124083125.dist-info}/METADATA +1 -1
- {cirq_core-1.5.0.dev20250123022814.dist-info → cirq_core-1.5.0.dev20250124083125.dist-info}/RECORD +9 -9
- {cirq_core-1.5.0.dev20250123022814.dist-info → cirq_core-1.5.0.dev20250124083125.dist-info}/LICENSE +0 -0
- {cirq_core-1.5.0.dev20250123022814.dist-info → cirq_core-1.5.0.dev20250124083125.dist-info}/WHEEL +0 -0
- {cirq_core-1.5.0.dev20250123022814.dist-info → cirq_core-1.5.0.dev20250124083125.dist-info}/top_level.txt +0 -0
cirq/_version.py
CHANGED
cirq/_version_test.py
CHANGED
cirq/ops/phased_iswap_gate.py
CHANGED
|
@@ -93,15 +93,14 @@ class PhasedISwapPowGate(eigen_gate.EigenGate):
|
|
|
93
93
|
}
|
|
94
94
|
|
|
95
95
|
def _value_equality_values_cls_(self):
|
|
96
|
-
if self.phase_exponent == 0:
|
|
97
|
-
return swap_gates.ISwapPowGate
|
|
98
96
|
return PhasedISwapPowGate
|
|
99
97
|
|
|
100
98
|
def _value_equality_values_(self):
|
|
101
|
-
if self.phase_exponent == 0:
|
|
102
|
-
return self._iswap._value_equality_values_()
|
|
103
99
|
return (self.phase_exponent, *self._iswap._value_equality_values_())
|
|
104
100
|
|
|
101
|
+
def _value_equality_approximate_values_(self):
|
|
102
|
+
return (self.phase_exponent, *self._iswap._value_equality_approximate_values_())
|
|
103
|
+
|
|
105
104
|
def _is_parameterized_(self) -> bool:
|
|
106
105
|
return protocols.is_parameterized(self._iswap) or protocols.is_parameterized(
|
|
107
106
|
self._phase_exponent
|
|
@@ -34,11 +34,10 @@ def test_phased_iswap_init():
|
|
|
34
34
|
|
|
35
35
|
def test_phased_iswap_equality():
|
|
36
36
|
eq = cirq.testing.EqualsTester()
|
|
37
|
-
eq.add_equality_group(cirq.PhasedISwapPowGate(phase_exponent=0, exponent=0.4)
|
|
38
|
-
eq.add_equality_group(
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
)
|
|
37
|
+
eq.add_equality_group(cirq.PhasedISwapPowGate(phase_exponent=0, exponent=0.4))
|
|
38
|
+
eq.add_equality_group(cirq.ISWAP**0.4)
|
|
39
|
+
eq.add_equality_group(cirq.PhasedISwapPowGate(phase_exponent=0, exponent=0.4, global_shift=0.3))
|
|
40
|
+
eq.add_equality_group(cirq.ISwapPowGate(global_shift=0.3) ** 0.4)
|
|
42
41
|
|
|
43
42
|
|
|
44
43
|
def test_repr():
|
|
@@ -204,3 +203,20 @@ def test_givens_rotation_equivalent_circuit():
|
|
|
204
203
|
@pytest.mark.parametrize('angle_rads', (-np.pi / 5, 0.4, 2, np.pi))
|
|
205
204
|
def test_givens_rotation_has_consistent_protocols(angle_rads):
|
|
206
205
|
cirq.testing.assert_implements_consistent_protocols(cirq.givens(angle_rads))
|
|
206
|
+
|
|
207
|
+
|
|
208
|
+
def test_approx_eq():
|
|
209
|
+
gate0 = cirq.PhasedISwapPowGate(phase_exponent=0)
|
|
210
|
+
gate1 = cirq.PhasedISwapPowGate(phase_exponent=1e-12)
|
|
211
|
+
gate2 = cirq.PhasedISwapPowGate(phase_exponent=2e-12)
|
|
212
|
+
gate3 = cirq.PhasedISwapPowGate(phase_exponent=0.345)
|
|
213
|
+
gate4 = cirq.ISwapPowGate()
|
|
214
|
+
|
|
215
|
+
assert cirq.approx_eq(gate1, gate2)
|
|
216
|
+
assert cirq.approx_eq(gate1, gate0)
|
|
217
|
+
assert not cirq.approx_eq(gate1, gate3)
|
|
218
|
+
assert not cirq.approx_eq(gate0, gate4)
|
|
219
|
+
|
|
220
|
+
assert cirq.equal_up_to_global_phase(gate1, gate2)
|
|
221
|
+
assert cirq.equal_up_to_global_phase(gate1, gate0)
|
|
222
|
+
assert not cirq.equal_up_to_global_phase(gate1, gate3)
|
{cirq_core-1.5.0.dev20250123022814.dist-info → cirq_core-1.5.0.dev20250124083125.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.dev20250124083125
|
|
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.dev20250123022814.dist-info → cirq_core-1.5.0.dev20250124083125.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=JHzy1sBc8gxV0tc2C6keMIRShBtpgrGSEp7liraq2DU,1206
|
|
8
|
+
cirq/_version_test.py,sha256=6gCIKSIrQjkIsGLbNAytGUQNjpfyatTFUpwJ_OmIJj8,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
|
|
@@ -343,8 +343,8 @@ cirq/ops/pauli_sum_exponential.py,sha256=n3fhKWJVMudzGuOcdPHskVNx3fHE2MAblVdkzbD
|
|
|
343
343
|
cirq/ops/pauli_sum_exponential_test.py,sha256=wVnJ3FSpEimHT8ERVkmljALrgSuuDYo6GRg91uJ7ztk,5370
|
|
344
344
|
cirq/ops/permutation_gate.py,sha256=2h8n76N2M3nu5MA8JkRQgVLByq5cOEluKUN042ClSRs,4196
|
|
345
345
|
cirq/ops/permutation_gate_test.py,sha256=SwXRgsZNLn5jnGhfcKPJ0J0CIssNzElbFaqylV2TXD8,3281
|
|
346
|
-
cirq/ops/phased_iswap_gate.py,sha256=
|
|
347
|
-
cirq/ops/phased_iswap_gate_test.py,sha256=
|
|
346
|
+
cirq/ops/phased_iswap_gate.py,sha256=Q-1PuSc4F3gsZL9UUN8EgrO31Ix6mA-7HoUIndvePbk,8990
|
|
347
|
+
cirq/ops/phased_iswap_gate_test.py,sha256=tB1MqH8Y0Kgr0QIxs1kq1yl2g0mKYI7Q_AaadBhFe2U,7360
|
|
348
348
|
cirq/ops/phased_x_gate.py,sha256=qjlkdbj7SWMvgTJkTqEqsLe2XDgAGioA6ayanns-apg,9983
|
|
349
349
|
cirq/ops/phased_x_gate_test.py,sha256=IpY-Z-MsqtYbyIEdxWu1NqgAJF2B7nddxPc2Hxafr4s,10202
|
|
350
350
|
cirq/ops/phased_x_z_gate.py,sha256=uVmROoiKYxGPs_QZbpwoi7EmVHV4J2-LRa7jyLeIbCM,11563
|
|
@@ -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.dev20250124083125.dist-info/LICENSE,sha256=tAkwu8-AdEyGxGoSvJ2gVmQdcicWw3j1ZZueVV74M-E,11357
|
|
1206
|
+
cirq_core-1.5.0.dev20250124083125.dist-info/METADATA,sha256=Ygd4x48Fml3TYoTGIMPuS7MJxEz0XEbqwsp-G6E-Umw,2105
|
|
1207
|
+
cirq_core-1.5.0.dev20250124083125.dist-info/WHEEL,sha256=tZoeGjtWxWRfdplE7E3d45VPlLNQnvbKiYnx7gwAy8A,92
|
|
1208
|
+
cirq_core-1.5.0.dev20250124083125.dist-info/top_level.txt,sha256=Sz9iOxHU0IEMLSFGwiwOCaN2e9K-jFbBbtpPN1hB73g,5
|
|
1209
|
+
cirq_core-1.5.0.dev20250124083125.dist-info/RECORD,,
|
{cirq_core-1.5.0.dev20250123022814.dist-info → cirq_core-1.5.0.dev20250124083125.dist-info}/LICENSE
RENAMED
|
File without changes
|
{cirq_core-1.5.0.dev20250123022814.dist-info → cirq_core-1.5.0.dev20250124083125.dist-info}/WHEEL
RENAMED
|
File without changes
|
|
File without changes
|