cirq-core 1.7.0.dev20250926000855__py3-none-any.whl → 1.7.0.dev20250926201022__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/wait_gate.py +7 -2
- cirq/value/duration.py +3 -3
- {cirq_core-1.7.0.dev20250926000855.dist-info → cirq_core-1.7.0.dev20250926201022.dist-info}/METADATA +1 -1
- {cirq_core-1.7.0.dev20250926000855.dist-info → cirq_core-1.7.0.dev20250926201022.dist-info}/RECORD +9 -9
- {cirq_core-1.7.0.dev20250926000855.dist-info → cirq_core-1.7.0.dev20250926201022.dist-info}/WHEEL +0 -0
- {cirq_core-1.7.0.dev20250926000855.dist-info → cirq_core-1.7.0.dev20250926201022.dist-info}/licenses/LICENSE +0 -0
- {cirq_core-1.7.0.dev20250926000855.dist-info → cirq_core-1.7.0.dev20250926201022.dist-info}/top_level.txt +0 -0
cirq/_version.py
CHANGED
cirq/_version_test.py
CHANGED
cirq/ops/wait_gate.py
CHANGED
|
@@ -16,6 +16,8 @@ from __future__ import annotations
|
|
|
16
16
|
|
|
17
17
|
from typing import AbstractSet, Any, TYPE_CHECKING
|
|
18
18
|
|
|
19
|
+
import sympy
|
|
20
|
+
|
|
19
21
|
from cirq import protocols, value
|
|
20
22
|
from cirq.ops import raw_types
|
|
21
23
|
|
|
@@ -51,8 +53,11 @@ class WaitGate(raw_types.Gate):
|
|
|
51
53
|
ValueError: If the `qid_shape` provided is empty or `num_qubits` contradicts
|
|
52
54
|
`qid_shape`.
|
|
53
55
|
"""
|
|
54
|
-
self._duration =
|
|
55
|
-
|
|
56
|
+
self._duration = (
|
|
57
|
+
duration if isinstance(duration, value.Duration) else value.Duration(duration)
|
|
58
|
+
)
|
|
59
|
+
total_picos = self.duration.total_picos()
|
|
60
|
+
if not isinstance(total_picos, sympy.Basic) and total_picos < 0:
|
|
56
61
|
raise ValueError('duration < 0')
|
|
57
62
|
if qid_shape is None:
|
|
58
63
|
if num_qubits is None:
|
cirq/value/duration.py
CHANGED
|
@@ -84,19 +84,19 @@ class Duration:
|
|
|
84
84
|
"""
|
|
85
85
|
self._time_vals: list[_NUMERIC_INPUT_TYPE] = [0, 0, 0, 0]
|
|
86
86
|
self._multipliers = [1, 1000, 1000_000, 1000_000_000]
|
|
87
|
-
if value is not None
|
|
87
|
+
if value is not None:
|
|
88
88
|
if isinstance(value, datetime.timedelta):
|
|
89
89
|
# timedelta has microsecond resolution.
|
|
90
90
|
self._time_vals[2] = int(value / datetime.timedelta(microseconds=1))
|
|
91
91
|
elif isinstance(value, Duration):
|
|
92
92
|
self._time_vals = value._time_vals
|
|
93
|
-
|
|
93
|
+
elif value != 0:
|
|
94
94
|
raise TypeError(f'Not a `cirq.DURATION_LIKE`: {repr(value)}.')
|
|
95
95
|
input_vals = [picos, nanos, micros, millis]
|
|
96
96
|
self._time_vals = _add_time_vals(self._time_vals, input_vals)
|
|
97
97
|
|
|
98
98
|
def _is_parameterized_(self) -> bool:
|
|
99
|
-
return
|
|
99
|
+
return any(isinstance(val, sympy.Basic) for val in self._time_vals)
|
|
100
100
|
|
|
101
101
|
def _parameter_names_(self) -> AbstractSet[str]:
|
|
102
102
|
return protocols.parameter_names(self._time_vals)
|
{cirq_core-1.7.0.dev20250926000855.dist-info → cirq_core-1.7.0.dev20250926201022.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.dev20250926201022
|
|
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.dev20250926000855.dist-info → cirq_core-1.7.0.dev20250926201022.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=fjaZ2di0NR7whUNcwGkmF3IOgPG3Wu6l1eD3zeQbTVA,1206
|
|
8
|
+
cirq/_version_test.py,sha256=wnUqgraEp8DfxNmFHlL6yecd_SRp3Y3LL-Az55wGXo4,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
|
|
@@ -392,7 +392,7 @@ cirq/ops/two_qubit_diagonal_gate.py,sha256=m2wnFpi0sHA9cxMa2cqwRYGQIlbyTGohMTLdV
|
|
|
392
392
|
cirq/ops/two_qubit_diagonal_gate_test.py,sha256=pv24VMf2yQ-2gaHg_EUwWx5tAFvXo47_sKzdbdCPhRY,4100
|
|
393
393
|
cirq/ops/uniform_superposition_gate.py,sha256=LiB_Aft5mQY5aVhe4S8DR4ugMREwXEFTVO1MCU1s0zU,4751
|
|
394
394
|
cirq/ops/uniform_superposition_gate_test.py,sha256=Sd0Ty3-Tidsa0ANjn4oSNdNSfkLP6V1LauURBEmyR84,3612
|
|
395
|
-
cirq/ops/wait_gate.py,sha256=
|
|
395
|
+
cirq/ops/wait_gate.py,sha256=zSD1ZVDXeKeZM9s0tvv2386C820-bs9hdEl6ex1QV0k,5710
|
|
396
396
|
cirq/ops/wait_gate_test.py,sha256=BkRLYMTETWoTYh8LA1S9Yvh8u7wX4-YNVhXhiCOQIAo,3628
|
|
397
397
|
cirq/protocols/__init__.py,sha256=SZCBRpL2YbYWMVcvJVR6FGkBv9aGv01oY2skSBvtNcg,6015
|
|
398
398
|
cirq/protocols/act_on_protocol.py,sha256=MSwEUu8dccf05wrNmataAdIaPE1Qp6zdT1RjFiuOk5I,6858
|
|
@@ -1187,7 +1187,7 @@ cirq/value/condition.py,sha256=lJJcFiqG-r68DhhS01DS6HhQw0pDwbNq71bvH1Famec,11916
|
|
|
1187
1187
|
cirq/value/condition_test.py,sha256=oEdim5nOYYY8UPU91H2xhb9MH8EC2WbMXTQ_DruHVO0,12949
|
|
1188
1188
|
cirq/value/digits.py,sha256=-3HTHqEQqy5evUz8aLE6ruw0NV3ncuPrc5asRMQ-sQ4,6063
|
|
1189
1189
|
cirq/value/digits_test.py,sha256=WDeUQTnDqZXh4JjWu_qEkzCFAtd8x1UlN9I2yjdDV3g,3848
|
|
1190
|
-
cirq/value/duration.py,sha256=
|
|
1190
|
+
cirq/value/duration.py,sha256=4K-eiCoFfzm2SM3K1OhV__YrW1GmzgA7QSkBpxOkTp8,10402
|
|
1191
1191
|
cirq/value/duration_test.py,sha256=xQd5-dE8zZddsZru1P6ClV3PoeJncqLAQr3ivgZIXdQ,8281
|
|
1192
1192
|
cirq/value/linear_dict.py,sha256=-wtYnPpg5X8MbaJq8xbkmDw48nTSItuhjj7Zdvwxp_A,12123
|
|
1193
1193
|
cirq/value/linear_dict_test.py,sha256=eZatVgAMonquI2qys4WJx6ddUc2KDea440qHIOxlTfQ,20061
|
|
@@ -1236,8 +1236,8 @@ cirq/work/sampler.py,sha256=rxbMWvrhu3gfNSBjZKozw28lLKVvBAS_1EGyPdYe8Xg,19041
|
|
|
1236
1236
|
cirq/work/sampler_test.py,sha256=SsMrRvLDYELyOAWLKISjkdEfrBwLYWRsT6D8WrsLM3Q,13533
|
|
1237
1237
|
cirq/work/zeros_sampler.py,sha256=Fs2JWwq0n9zv7_G5Rm-9vPeHUag7uctcMOHg0JTkZpc,2371
|
|
1238
1238
|
cirq/work/zeros_sampler_test.py,sha256=lQLgQDGBLtfImryys2HzQ2jOSGxHgc7-koVBUhv8qYk,3345
|
|
1239
|
-
cirq_core-1.7.0.
|
|
1240
|
-
cirq_core-1.7.0.
|
|
1241
|
-
cirq_core-1.7.0.
|
|
1242
|
-
cirq_core-1.7.0.
|
|
1243
|
-
cirq_core-1.7.0.
|
|
1239
|
+
cirq_core-1.7.0.dev20250926201022.dist-info/licenses/LICENSE,sha256=tAkwu8-AdEyGxGoSvJ2gVmQdcicWw3j1ZZueVV74M-E,11357
|
|
1240
|
+
cirq_core-1.7.0.dev20250926201022.dist-info/METADATA,sha256=9lwWfHkvg09FMfdzii9_T47nvQEsD_YFnEANCE33BeY,4758
|
|
1241
|
+
cirq_core-1.7.0.dev20250926201022.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
1242
|
+
cirq_core-1.7.0.dev20250926201022.dist-info/top_level.txt,sha256=Sz9iOxHU0IEMLSFGwiwOCaN2e9K-jFbBbtpPN1hB73g,5
|
|
1243
|
+
cirq_core-1.7.0.dev20250926201022.dist-info/RECORD,,
|
{cirq_core-1.7.0.dev20250926000855.dist-info → cirq_core-1.7.0.dev20250926201022.dist-info}/WHEEL
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|