cirq-core 1.6.0.dev20250716215951__py3-none-any.whl → 1.6.0.dev20250717042623__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/study/sweeps.py +4 -10
- cirq/study/sweeps_test.py +14 -0
- {cirq_core-1.6.0.dev20250716215951.dist-info → cirq_core-1.6.0.dev20250717042623.dist-info}/METADATA +1 -1
- {cirq_core-1.6.0.dev20250716215951.dist-info → cirq_core-1.6.0.dev20250717042623.dist-info}/RECORD +9 -9
- {cirq_core-1.6.0.dev20250716215951.dist-info → cirq_core-1.6.0.dev20250717042623.dist-info}/WHEEL +0 -0
- {cirq_core-1.6.0.dev20250716215951.dist-info → cirq_core-1.6.0.dev20250717042623.dist-info}/licenses/LICENSE +0 -0
- {cirq_core-1.6.0.dev20250716215951.dist-info → cirq_core-1.6.0.dev20250717042623.dist-info}/top_level.txt +0 -0
cirq/_version.py
CHANGED
cirq/_version_test.py
CHANGED
cirq/study/sweeps.py
CHANGED
|
@@ -230,16 +230,10 @@ class Product(Sweep):
|
|
|
230
230
|
return length
|
|
231
231
|
|
|
232
232
|
def param_tuples(self) -> Iterator[Params]:
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
first, rest = factors[0], factors[1:]
|
|
238
|
-
for first_values in first.param_tuples():
|
|
239
|
-
for rest_values in _gen(rest):
|
|
240
|
-
yield first_values + rest_values
|
|
241
|
-
|
|
242
|
-
return _gen(self.factors)
|
|
233
|
+
yield from map(
|
|
234
|
+
itertools.chain.from_iterable,
|
|
235
|
+
itertools.product(*(factor.param_tuples() for factor in self.factors)),
|
|
236
|
+
)
|
|
243
237
|
|
|
244
238
|
def __repr__(self) -> str:
|
|
245
239
|
factors_repr = ', '.join(repr(f) for f in self.factors)
|
cirq/study/sweeps_test.py
CHANGED
|
@@ -158,6 +158,19 @@ def test_product():
|
|
|
158
158
|
assert _values(sweep, 'b') == [3, 3, 4, 4, 3, 3, 4, 4]
|
|
159
159
|
assert _values(sweep, 'c') == [5, 6, 5, 6, 5, 6, 5, 6]
|
|
160
160
|
|
|
161
|
+
sweep = cirq.Points('a', [1, 2]) * (cirq.Points('b', [3, 4, 5]))
|
|
162
|
+
assert list(map(list, sweep.param_tuples())) == [
|
|
163
|
+
[('a', 1), ('b', 3)],
|
|
164
|
+
[('a', 1), ('b', 4)],
|
|
165
|
+
[('a', 1), ('b', 5)],
|
|
166
|
+
[('a', 2), ('b', 3)],
|
|
167
|
+
[('a', 2), ('b', 4)],
|
|
168
|
+
[('a', 2), ('b', 5)],
|
|
169
|
+
]
|
|
170
|
+
|
|
171
|
+
sweep = cirq.Product(*[cirq.Points(str(i), [0]) for i in range(1025)])
|
|
172
|
+
assert list(map(list, sweep.param_tuples())) == [[(str(i), 0) for i in range(1025)]]
|
|
173
|
+
|
|
161
174
|
|
|
162
175
|
def test_zip_addition():
|
|
163
176
|
zip_sweep = cirq.Zip(cirq.Points('a', [1, 2]), cirq.Points('b', [3, 4]))
|
|
@@ -172,6 +185,7 @@ def test_empty_product():
|
|
|
172
185
|
sweep = cirq.Product()
|
|
173
186
|
assert len(sweep) == len(list(sweep)) == 1
|
|
174
187
|
assert str(sweep) == 'Product()'
|
|
188
|
+
assert list(map(list, sweep.param_tuples())) == [[]]
|
|
175
189
|
|
|
176
190
|
|
|
177
191
|
def test_slice_access_error():
|
{cirq_core-1.6.0.dev20250716215951.dist-info → cirq_core-1.6.0.dev20250717042623.dist-info}/METADATA
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: cirq-core
|
|
3
|
-
Version: 1.6.0.
|
|
3
|
+
Version: 1.6.0.dev20250717042623
|
|
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.6.0.dev20250716215951.dist-info → cirq_core-1.6.0.dev20250717042623.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=BS88J6KthtgdBSkBn3S-OPK450OX8hykRLWYCm2H-bU,1206
|
|
8
|
+
cirq/_version_test.py,sha256=tf_Pl6OaqqhPz32v7C0GwDh_wCz3M013DajeE-MGjGg,155
|
|
9
9
|
cirq/conftest.py,sha256=wSDKNdIQRDfLnXvOCWD3erheOw8JHRhdfQ53EyTUIXg,1239
|
|
10
10
|
cirq/json_resolver_cache.py,sha256=hYyG53VJeV61X0oukK5ndZYega8lkL2FyaL1m0j6h5M,13556
|
|
11
11
|
cirq/py.typed,sha256=VFSlmh_lNwnaXzwY-ZuW-C2Ws5PkuDoVgBdNCs0jXJE,63
|
|
@@ -969,8 +969,8 @@ cirq/study/result.py,sha256=ci9Pg9IW4OMR4aZ4SaQ7TPVTgoSU-1WarjKEXBv2F2g,19214
|
|
|
969
969
|
cirq/study/result_test.py,sha256=Safhg93E1x7NA--bxvkMwOnTPAlT0VkfF6hdsEKvhEM,15627
|
|
970
970
|
cirq/study/sweepable.py,sha256=lVzlkF9d_PaT1RSLponKzwXebGoDXQ56zwd1XEMa6h0,4338
|
|
971
971
|
cirq/study/sweepable_test.py,sha256=gMKkCoy8JxaCDeMTiDLdmcbBrioWs-teYOnqrri_2rI,5539
|
|
972
|
-
cirq/study/sweeps.py,sha256=
|
|
973
|
-
cirq/study/sweeps_test.py,sha256=
|
|
972
|
+
cirq/study/sweeps.py,sha256=JpqiJTJXpTHwX06Db5L3k9jWdsBoNBueX6QcpSD6Uw8,21373
|
|
973
|
+
cirq/study/sweeps_test.py,sha256=Rj0diWWTNhYbPANWwqenDMZX-AlHFWF0pzKpjaxkVGY,16868
|
|
974
974
|
cirq/testing/__init__.py,sha256=QNkOC_QdYkiNrIxYuNjPsB_iWmTW8zUrUwOSiz_8LPg,6171
|
|
975
975
|
cirq/testing/circuit_compare.py,sha256=3vgAfXZoqfpR58dGDzYTfkitzW7zs7wVq4OsW5LrBUU,18723
|
|
976
976
|
cirq/testing/circuit_compare_test.py,sha256=4ov58dOiez9HSQUJDP5hW1Li2tL75Gkevts2PiyyfSU,19738
|
|
@@ -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.
|
|
1224
|
-
cirq_core-1.6.0.
|
|
1225
|
-
cirq_core-1.6.0.
|
|
1226
|
-
cirq_core-1.6.0.
|
|
1227
|
-
cirq_core-1.6.0.
|
|
1223
|
+
cirq_core-1.6.0.dev20250717042623.dist-info/licenses/LICENSE,sha256=tAkwu8-AdEyGxGoSvJ2gVmQdcicWw3j1ZZueVV74M-E,11357
|
|
1224
|
+
cirq_core-1.6.0.dev20250717042623.dist-info/METADATA,sha256=DvCRUIXAJW5kOZ6lDcmE3s-nbGvffkQWFag2GvSFgbY,4857
|
|
1225
|
+
cirq_core-1.6.0.dev20250717042623.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
1226
|
+
cirq_core-1.6.0.dev20250717042623.dist-info/top_level.txt,sha256=Sz9iOxHU0IEMLSFGwiwOCaN2e9K-jFbBbtpPN1hB73g,5
|
|
1227
|
+
cirq_core-1.6.0.dev20250717042623.dist-info/RECORD,,
|
{cirq_core-1.6.0.dev20250716215951.dist-info → cirq_core-1.6.0.dev20250717042623.dist-info}/WHEEL
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|