cirq-core 1.6.0.dev20250617175947__py3-none-any.whl → 1.6.0.dev20250617235202__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, 11, 0): # pragma: no cover
28
28
  'of cirq (e.g. "python -m pip install cirq==1.5.0")'
29
29
  )
30
30
 
31
- __version__ = "1.6.0.dev20250617175947"
31
+ __version__ = "1.6.0.dev20250617235202"
cirq/_version_test.py CHANGED
@@ -3,4 +3,4 @@ import cirq
3
3
 
4
4
 
5
5
  def test_version() -> None:
6
- assert cirq.__version__ == "1.6.0.dev20250617175947"
6
+ assert cirq.__version__ == "1.6.0.dev20250617235202"
cirq/linalg/predicates.py CHANGED
@@ -115,8 +115,12 @@ def is_unitary(matrix: np.ndarray, *, rtol: float = 1e-5, atol: float = 1e-8) ->
115
115
  Returns:
116
116
  Whether the matrix is unitary within the given tolerance.
117
117
  """
118
- return matrix.shape[0] == matrix.shape[1] and np.allclose(
119
- matrix.dot(np.conj(matrix.T)), np.eye(matrix.shape[0]), rtol=rtol, atol=atol
118
+ return (
119
+ matrix.ndim == 2
120
+ and matrix.shape[0] == matrix.shape[1]
121
+ and np.allclose(
122
+ matrix.dot(np.conj(matrix.T)), np.eye(matrix.shape[0]), rtol=rtol, atol=atol
123
+ )
120
124
  )
121
125
 
122
126
 
@@ -103,10 +103,13 @@ def test_is_hermitian_tolerance():
103
103
 
104
104
 
105
105
  def test_is_unitary():
106
+ assert not cirq.is_unitary(np.empty((0,)))
106
107
  assert cirq.is_unitary(np.empty((0, 0)))
107
108
  assert not cirq.is_unitary(np.empty((1, 0)))
108
109
  assert not cirq.is_unitary(np.empty((0, 1)))
110
+ assert not cirq.is_unitary(np.empty((0, 0, 0)))
109
111
 
112
+ assert not cirq.is_unitary(np.array(1))
110
113
  assert cirq.is_unitary(np.array([[1]]))
111
114
  assert cirq.is_unitary(np.array([[-1]]))
112
115
  assert cirq.is_unitary(np.array([[1j]]))
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: cirq-core
3
- Version: 1.6.0.dev20250617175947
3
+ Version: 1.6.0.dev20250617235202
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=emXpdD5ZvwLRlFAoQB8YatmZyU3b4e9jg6FppMTUhkU,33900
4
4
  cirq/_doc.py,sha256=BrnoABo1hk5RgB3Cgww4zLHUfiyFny0F1V-tOMCbdaU,2909
5
5
  cirq/_import.py,sha256=ixBu4EyGl46Ram2cP3p5eZVEFDW5L2DS-VyTjz4N9iw,8429
6
6
  cirq/_import_test.py,sha256=oF4izzOVZLc7NZ0aZHFcGv-r01eiFFt_JORx_x7_D4s,1089
7
- cirq/_version.py,sha256=sPjCxyCGVPBtNaanMNK5YPM7bJjdFU0zyOTghXTDVsI,1206
8
- cirq/_version_test.py,sha256=yxnoWIoKoM0BDqnJAQ4a4WunJj9OU8ztjncuV8Zno6g,155
7
+ cirq/_version.py,sha256=DAW8LEf4vLpC1OOxWWHw_ReVqUpFny2UOAMlWahuEq0,1206
8
+ cirq/_version_test.py,sha256=Hwfvm55CewQiFvDuFWqKAiI7kh3IptDdP7Uyugq8V0w,155
9
9
  cirq/conftest.py,sha256=X7yLFL8GLhg2CjPw0hp5e_dGASfvHx1-QT03aUbhKJw,1168
10
10
  cirq/json_resolver_cache.py,sha256=hYyG53VJeV61X0oukK5ndZYega8lkL2FyaL1m0j6h5M,13556
11
11
  cirq/py.typed,sha256=VFSlmh_lNwnaXzwY-ZuW-C2Ws5PkuDoVgBdNCs0jXJE,63
@@ -260,8 +260,8 @@ cirq/linalg/diagonalize.py,sha256=3PpGmlI7CCkQS3JKr0AkgdHOZedXLniZkxmUtpCNQPk,10
260
260
  cirq/linalg/diagonalize_test.py,sha256=c6-ksL2PDZ5hqr2ib2iS0uEnJuCHSv16cuiJK4PLjok,9161
261
261
  cirq/linalg/operator_spaces.py,sha256=jUU-OYL8Lnn58kbhLskDyhkBeXZXPXVmR-hcIkq60JQ,4132
262
262
  cirq/linalg/operator_spaces_test.py,sha256=9puH8uqMhWVF4QvJImX0WvcxsxBMvvroUZUSNNvaTDQ,10729
263
- cirq/linalg/predicates.py,sha256=uVyZjCPlUpQnl8nwxIVVgdnHdjzGneeUfZqNwT-qUUc,12103
264
- cirq/linalg/predicates_test.py,sha256=lNtaVVbPhDFD1yXWZb2Ncz5ZsgSdkVxv-prBBXsvk0k,21540
263
+ cirq/linalg/predicates.py,sha256=z4f7eHM7rQIYucpjlRoM-ZoY6ObxQFTuD9XruaYK6kI,12164
264
+ cirq/linalg/predicates_test.py,sha256=ZEIqb3fPWFsAaY49HUBRwN3oGShM0k0YHq22WX149Sg,21683
265
265
  cirq/linalg/tolerance.py,sha256=4TZ_BjldOhPuP2CwYvMdzHCc9Lzfwi9ZkndSKObyyBg,1893
266
266
  cirq/linalg/tolerance_test.py,sha256=uAqJk--Rhxr9XXLh3dAvK_BDcbJUccEAFIFdLHiMEHU,2423
267
267
  cirq/linalg/transformations.py,sha256=YiQdLe2BNHupPxV9Gxt3VRSWKTRmqt4yObV0Wwij2Dw,32526
@@ -1220,8 +1220,8 @@ cirq/work/sampler.py,sha256=rxbMWvrhu3gfNSBjZKozw28lLKVvBAS_1EGyPdYe8Xg,19041
1220
1220
  cirq/work/sampler_test.py,sha256=SsMrRvLDYELyOAWLKISjkdEfrBwLYWRsT6D8WrsLM3Q,13533
1221
1221
  cirq/work/zeros_sampler.py,sha256=Fs2JWwq0n9zv7_G5Rm-9vPeHUag7uctcMOHg0JTkZpc,2371
1222
1222
  cirq/work/zeros_sampler_test.py,sha256=lQLgQDGBLtfImryys2HzQ2jOSGxHgc7-koVBUhv8qYk,3345
1223
- cirq_core-1.6.0.dev20250617175947.dist-info/licenses/LICENSE,sha256=tAkwu8-AdEyGxGoSvJ2gVmQdcicWw3j1ZZueVV74M-E,11357
1224
- cirq_core-1.6.0.dev20250617175947.dist-info/METADATA,sha256=uGgKiRNg9095AJGWDcooZZTwLsIq5Enl4L27i5qfrXU,4857
1225
- cirq_core-1.6.0.dev20250617175947.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
1226
- cirq_core-1.6.0.dev20250617175947.dist-info/top_level.txt,sha256=Sz9iOxHU0IEMLSFGwiwOCaN2e9K-jFbBbtpPN1hB73g,5
1227
- cirq_core-1.6.0.dev20250617175947.dist-info/RECORD,,
1223
+ cirq_core-1.6.0.dev20250617235202.dist-info/licenses/LICENSE,sha256=tAkwu8-AdEyGxGoSvJ2gVmQdcicWw3j1ZZueVV74M-E,11357
1224
+ cirq_core-1.6.0.dev20250617235202.dist-info/METADATA,sha256=0Mkz-_pWOE6ULwSvbecsNQMwJ72cNZqTuQoG4G0-1Rk,4857
1225
+ cirq_core-1.6.0.dev20250617235202.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
1226
+ cirq_core-1.6.0.dev20250617235202.dist-info/top_level.txt,sha256=Sz9iOxHU0IEMLSFGwiwOCaN2e9K-jFbBbtpPN1hB73g,5
1227
+ cirq_core-1.6.0.dev20250617235202.dist-info/RECORD,,