cirq-core 1.5.0.dev20240718000937__py3-none-any.whl → 1.5.0.dev20240719161626__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.dev20240718000937"
31
+ __version__ = "1.5.0.dev20240719161626"
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.dev20240718000937"
6
+ assert cirq.__version__ == "1.5.0.dev20240719161626"
@@ -899,8 +899,6 @@ def test_cphase_unitary(angle_rads, expected_unitary):
899
899
  np.testing.assert_allclose(cirq.unitary(cirq.cphase(angle_rads)), expected_unitary)
900
900
 
901
901
 
902
- # TODO(#6663): fix this use case.
903
- @pytest.mark.xfail
904
902
  def test_parameterized_cphase():
905
903
  assert cirq.cphase(sympy.pi) == cirq.CZ
906
904
  assert cirq.cphase(sympy.pi / 2) == cirq.CZ**0.5
cirq/ops/eigen_gate.py CHANGED
@@ -309,8 +309,12 @@ class EigenGate(raw_types.Gate):
309
309
  def _canonical_exponent(self):
310
310
  if self._canonical_exponent_cached is None:
311
311
  period = self._period()
312
- if not period or protocols.is_parameterized(self._exponent):
312
+ if not period:
313
313
  self._canonical_exponent_cached = self._exponent
314
+ elif protocols.is_parameterized(self._exponent):
315
+ self._canonical_exponent_cached = self._exponent
316
+ if isinstance(self._exponent, sympy.Expr) and self._exponent.is_constant():
317
+ self._canonical_exponent_cached = float(self._exponent)
314
318
  else:
315
319
  self._canonical_exponent_cached = self._exponent % period
316
320
  return self._canonical_exponent_cached
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: cirq-core
3
- Version: 1.5.0.dev20240718000937
3
+ Version: 1.5.0.dev20240719161626
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,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=Bl_c1ibn6TlivdrGoRinVKP3fETl9rzDPa7zTj3j61c,1206
8
- cirq/_version_test.py,sha256=kxtQqZ0O8rcduhpinxfcBl3zdbrNKJOQtG_Ry7UAZ5g,147
7
+ cirq/_version.py,sha256=hDaTHYUaOXDUv32cDWayaItat3GB98lMjz457GiUhFQ,1206
8
+ cirq/_version_test.py,sha256=gvlzYdHuwICPgfi307mSqDYVhR6RlM32_iQtgDrwar8,147
9
9
  cirq/conftest.py,sha256=X7yLFL8GLhg2CjPw0hp5e_dGASfvHx1-QT03aUbhKJw,1168
10
10
  cirq/json_resolver_cache.py,sha256=ytePZtNZgKjOF2NiVpUTuotB-JKZmQNOFIFdvXqsxHw,13271
11
11
  cirq/py.typed,sha256=VFSlmh_lNwnaXzwY-ZuW-C2Ws5PkuDoVgBdNCs0jXJE,63
@@ -276,7 +276,7 @@ cirq/ops/common_channels_test.py,sha256=EL_PxbqD3KPC8ioihiukhmW8bUdclqqigKoFyUQp
276
276
  cirq/ops/common_gate_families.py,sha256=e5M8wlDYtdrpWBrhdns6iizIvSqzfxDyIsBdxt8hVMc,8611
277
277
  cirq/ops/common_gate_families_test.py,sha256=Oo3C7BPO3gt3ePuqwsI_lx_lY38et8Ps4AuVydX2Aww,5275
278
278
  cirq/ops/common_gates.py,sha256=YMcadPVRhrvkwYwm6-_TNYM9sz9TY7KSi0g7FvBTeCk,58075
279
- cirq/ops/common_gates_test.py,sha256=n4Ud_5t-iB2RzMpPSwXngeU1rR198gk0-J7R2xUxp6Q,46271
279
+ cirq/ops/common_gates_test.py,sha256=XCVswZbd_k9Y2k5n-2TXnS8CnJoLoC3VmBQN0QijIKw,46218
280
280
  cirq/ops/control_values.py,sha256=nNDN6pgz_aWkUfrpOZ9zHHD42AGFaplWhVQj9rmJwbQ,13410
281
281
  cirq/ops/control_values_test.py,sha256=iDtdQjL39u80MaR16XLp00LRZqWgJqC54cIeADWf0IY,12906
282
282
  cirq/ops/controlled_gate.py,sha256=uVTZk6pA1ZpEwbVggLeXyAFq18_QJ38hWYhk9GbvQnc,14253
@@ -287,7 +287,7 @@ cirq/ops/dense_pauli_string.py,sha256=SPrNsgeC2-ETqD2wbZ7R7lOltIUWITqBUHH02dVaMz
287
287
  cirq/ops/dense_pauli_string_test.py,sha256=duvgzhgTV9wuem4kDSwtL62SEUCThkz1tdP984-C4_s,21504
288
288
  cirq/ops/diagonal_gate.py,sha256=W_yXf4qZY_AeP32VN-0u4lS0-WsqjWTg2VSABaO06Wk,9024
289
289
  cirq/ops/diagonal_gate_test.py,sha256=cPHxjc7g2oTcXt5UFm470oo0eJupubSNzs4TccKHlSc,6223
290
- cirq/ops/eigen_gate.py,sha256=8AzZUZ6Km554GVdLLKJnaPiHoyChcFp4D5v5y4wHSXk,18133
290
+ cirq/ops/eigen_gate.py,sha256=CJCXX0hHqsgVWIYvhpEcUq6TH4gnDOdRO9TihmoaKhQ,18381
291
291
  cirq/ops/eigen_gate_test.py,sha256=-7l6GmAd1EYzHoGREQN1n7J1VOQKbThH2mA88TRODs8,13928
292
292
  cirq/ops/fourier_transform.py,sha256=pynO07OcZSVCeL8L0pNQ9m_y5_wrpTWOMf99BHpjXdU,7579
293
293
  cirq/ops/fourier_transform_test.py,sha256=PIK4bWnCIy2TuX0fgclHeU1CBDT6zRVoQpv1v1jt62c,6220
@@ -1181,8 +1181,8 @@ cirq/work/sampler.py,sha256=JEAeQQRF3bqlO9AkOf4XbrTATDI5f5JgyM_FAUCNxao,19751
1181
1181
  cirq/work/sampler_test.py,sha256=B2ZsuqGT854gQtBIAh8k0LiG9Vj5wSzcGvkxOUoTcW4,13217
1182
1182
  cirq/work/zeros_sampler.py,sha256=x1C7cup66a43n-3tm8QjhiqJa07qcJW10FxNp9jJ59Q,2356
1183
1183
  cirq/work/zeros_sampler_test.py,sha256=JIkpBBFPJe5Ba4142vzogyWyboG1Q1ZAm0UVGgOoZn8,3279
1184
- cirq_core-1.5.0.dev20240718000937.dist-info/LICENSE,sha256=tAkwu8-AdEyGxGoSvJ2gVmQdcicWw3j1ZZueVV74M-E,11357
1185
- cirq_core-1.5.0.dev20240718000937.dist-info/METADATA,sha256=fO-wpDwloy9E44tiQkEGy3-iAn7WKVkt3cpzheGjpmI,2007
1186
- cirq_core-1.5.0.dev20240718000937.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
1187
- cirq_core-1.5.0.dev20240718000937.dist-info/top_level.txt,sha256=Sz9iOxHU0IEMLSFGwiwOCaN2e9K-jFbBbtpPN1hB73g,5
1188
- cirq_core-1.5.0.dev20240718000937.dist-info/RECORD,,
1184
+ cirq_core-1.5.0.dev20240719161626.dist-info/LICENSE,sha256=tAkwu8-AdEyGxGoSvJ2gVmQdcicWw3j1ZZueVV74M-E,11357
1185
+ cirq_core-1.5.0.dev20240719161626.dist-info/METADATA,sha256=P1TP8sfO4d_7Td7f4QwPKOSgxtKUubcOWYhwkv6aiMI,2007
1186
+ cirq_core-1.5.0.dev20240719161626.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
1187
+ cirq_core-1.5.0.dev20240719161626.dist-info/top_level.txt,sha256=Sz9iOxHU0IEMLSFGwiwOCaN2e9K-jFbBbtpPN1hB73g,5
1188
+ cirq_core-1.5.0.dev20240719161626.dist-info/RECORD,,