cirq-core 1.7.0.dev20250824200454__py3-none-any.whl → 1.7.0.dev20250825174419__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.
- cirq/_version.py +1 -1
- cirq/_version_test.py +1 -1
- cirq/protocols/unitary_protocol.py +0 -4
- cirq/protocols/unitary_protocol_test.py +2 -5
- {cirq_core-1.7.0.dev20250824200454.dist-info → cirq_core-1.7.0.dev20250825174419.dist-info}/METADATA +1 -1
- {cirq_core-1.7.0.dev20250824200454.dist-info → cirq_core-1.7.0.dev20250825174419.dist-info}/RECORD +9 -9
- {cirq_core-1.7.0.dev20250824200454.dist-info → cirq_core-1.7.0.dev20250825174419.dist-info}/WHEEL +0 -0
- {cirq_core-1.7.0.dev20250824200454.dist-info → cirq_core-1.7.0.dev20250825174419.dist-info}/licenses/LICENSE +0 -0
- {cirq_core-1.7.0.dev20250824200454.dist-info → cirq_core-1.7.0.dev20250825174419.dist-info}/top_level.txt +0 -0
cirq/_version.py
CHANGED
cirq/_version_test.py
CHANGED
|
@@ -19,7 +19,6 @@ from typing import Any, Protocol, TypeVar
|
|
|
19
19
|
|
|
20
20
|
import numpy as np
|
|
21
21
|
|
|
22
|
-
from cirq import linalg
|
|
23
22
|
from cirq._doc import doc_private
|
|
24
23
|
from cirq.protocols import qid_shape_protocol
|
|
25
24
|
from cirq.protocols.apply_unitary_protocol import apply_unitaries, ApplyUnitaryArgs
|
|
@@ -111,11 +110,8 @@ def unitary(
|
|
|
111
110
|
Raises:
|
|
112
111
|
TypeError: `val` doesn't have a unitary effect and no default value was
|
|
113
112
|
specified.
|
|
114
|
-
ValueError: `val` is a numpy array that is not unitary.
|
|
115
113
|
"""
|
|
116
114
|
if isinstance(val, np.ndarray):
|
|
117
|
-
if not linalg.is_unitary(val):
|
|
118
|
-
raise ValueError("The provided numpy array is not unitary.")
|
|
119
115
|
return val
|
|
120
116
|
|
|
121
117
|
strats = [
|
|
@@ -163,12 +163,9 @@ def test_unitary():
|
|
|
163
163
|
|
|
164
164
|
# Test that numpy arrays are handled directly
|
|
165
165
|
test_matrix = np.array([[1, 0], [0, 1]])
|
|
166
|
-
assert cirq.unitary(test_matrix
|
|
167
|
-
|
|
168
|
-
# Test that non-unitary numpy arrays raise ValueError
|
|
166
|
+
assert cirq.unitary(test_matrix) is test_matrix
|
|
169
167
|
non_unitary_matrix = np.array([[1, 1], [0, 1]])
|
|
170
|
-
|
|
171
|
-
_ = cirq.unitary(non_unitary_matrix)
|
|
168
|
+
assert cirq.unitary(non_unitary_matrix) is non_unitary_matrix
|
|
172
169
|
|
|
173
170
|
assert cirq.unitary(NoMethod(), None) is None
|
|
174
171
|
assert cirq.unitary(ReturnsNotImplemented(), None) is None
|
{cirq_core-1.7.0.dev20250824200454.dist-info → cirq_core-1.7.0.dev20250825174419.dist-info}/METADATA
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: cirq-core
|
|
3
|
-
Version: 1.7.0.
|
|
3
|
+
Version: 1.7.0.dev20250825174419
|
|
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.7.0.dev20250824200454.dist-info → cirq_core-1.7.0.dev20250825174419.dist-info}/RECORD
RENAMED
|
@@ -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=
|
|
8
|
-
cirq/_version_test.py,sha256=
|
|
7
|
+
cirq/_version.py,sha256=YIvBpq_l5SLKoWa186LrENBpt1M757ZL_SWUU3va528,1206
|
|
8
|
+
cirq/_version_test.py,sha256=222LlxGJYKlSh0nN-Yy_DG8HY35rqZRmH4QDAEujyjk,155
|
|
9
9
|
cirq/conftest.py,sha256=wSDKNdIQRDfLnXvOCWD3erheOw8JHRhdfQ53EyTUIXg,1239
|
|
10
10
|
cirq/json_resolver_cache.py,sha256=A5DIgFAY1hUNt9vai_C3-gGBv24116CJMzQxMcXOax4,13726
|
|
11
11
|
cirq/py.typed,sha256=VFSlmh_lNwnaXzwY-ZuW-C2Ws5PkuDoVgBdNCs0jXJE,63
|
|
@@ -446,8 +446,8 @@ cirq/protocols/resolve_parameters.py,sha256=N1NJJ672v3ISQRusO-t6nwm1hOmOqMVBeXtq
|
|
|
446
446
|
cirq/protocols/resolve_parameters_test.py,sha256=2R2T2p4NkbD4IV2_4i8WkvSHu3OqjXo-Bf856Rwb-3w,4933
|
|
447
447
|
cirq/protocols/trace_distance_bound.py,sha256=xF_qfkFV_T7O3-5lBITupq6ulBYuzFXDHaYDv7it96E,4150
|
|
448
448
|
cirq/protocols/trace_distance_bound_test.py,sha256=0bI9uYttJj5eayM05kShPh9qkxeKG1egcZ9fXJPZWNU,1980
|
|
449
|
-
cirq/protocols/unitary_protocol.py,sha256=
|
|
450
|
-
cirq/protocols/unitary_protocol_test.py,sha256=
|
|
449
|
+
cirq/protocols/unitary_protocol.py,sha256=KsXGUA7bkHOkL9GqJXpyFmhA0HVQeLdZfypZJC7yU6g,8233
|
|
450
|
+
cirq/protocols/unitary_protocol_test.py,sha256=oj31ZmeGylf4wh2jv_EwsXmJ7YYgsu3YM43A-yXrPps,10480
|
|
451
451
|
cirq/protocols/json_test_data/AmplitudeDampingChannel.json,sha256=x3szAuG8j_1uAK5ghFapaB410g0twQ83aQNsvItXVdo,60
|
|
452
452
|
cirq/protocols/json_test_data/AmplitudeDampingChannel.repr,sha256=n_tJNGHkWlxYunXGMFtFO6-RuIv0y8Ki0YqE8w3hOl0,30
|
|
453
453
|
cirq/protocols/json_test_data/AnyIntegerPowerGateFamily.json,sha256=Qf8FTwvPV7en7WcPbhP1kvjLUUPYgbICoPFqT6w86hw,68
|
|
@@ -1234,8 +1234,8 @@ cirq/work/sampler.py,sha256=rxbMWvrhu3gfNSBjZKozw28lLKVvBAS_1EGyPdYe8Xg,19041
|
|
|
1234
1234
|
cirq/work/sampler_test.py,sha256=SsMrRvLDYELyOAWLKISjkdEfrBwLYWRsT6D8WrsLM3Q,13533
|
|
1235
1235
|
cirq/work/zeros_sampler.py,sha256=Fs2JWwq0n9zv7_G5Rm-9vPeHUag7uctcMOHg0JTkZpc,2371
|
|
1236
1236
|
cirq/work/zeros_sampler_test.py,sha256=lQLgQDGBLtfImryys2HzQ2jOSGxHgc7-koVBUhv8qYk,3345
|
|
1237
|
-
cirq_core-1.7.0.
|
|
1238
|
-
cirq_core-1.7.0.
|
|
1239
|
-
cirq_core-1.7.0.
|
|
1240
|
-
cirq_core-1.7.0.
|
|
1241
|
-
cirq_core-1.7.0.
|
|
1237
|
+
cirq_core-1.7.0.dev20250825174419.dist-info/licenses/LICENSE,sha256=tAkwu8-AdEyGxGoSvJ2gVmQdcicWw3j1ZZueVV74M-E,11357
|
|
1238
|
+
cirq_core-1.7.0.dev20250825174419.dist-info/METADATA,sha256=HDtfPmc5sbaI5AMAN1fSFVDxaZynP1vayAB05Ci0CfE,4819
|
|
1239
|
+
cirq_core-1.7.0.dev20250825174419.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
1240
|
+
cirq_core-1.7.0.dev20250825174419.dist-info/top_level.txt,sha256=Sz9iOxHU0IEMLSFGwiwOCaN2e9K-jFbBbtpPN1hB73g,5
|
|
1241
|
+
cirq_core-1.7.0.dev20250825174419.dist-info/RECORD,,
|
{cirq_core-1.7.0.dev20250824200454.dist-info → cirq_core-1.7.0.dev20250825174419.dist-info}/WHEEL
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|