cirq-core 1.6.0.dev20250429173645__py3-none-any.whl → 1.6.0.dev20250429201501__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.6.0.dev20250429173645"
31
+ __version__ = "1.6.0.dev20250429201501"
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.6.0.dev20250429173645"
6
+ assert cirq.__version__ == "1.6.0.dev20250429201501"
cirq/ops/raw_types.py CHANGED
@@ -203,8 +203,10 @@ class Gate(metaclass=value.ABCMetaImplementAnyOneOf):
203
203
  to create an Operation on q1 and q2 is equivalent to MyGate(q1,q2).
204
204
 
205
205
  Gates operate on a certain number of qubits. All implementations of gate
206
- must implement the `num_qubits` method declaring how many qubits they
207
- act on.
206
+ must implement a method to declare the number of qubits (if a gate acting
207
+ on qubits) or the qid shape (if acting on qudits). In general, this means
208
+ that a Gate subclass should implement only `_qid_shape_` if it can act on
209
+ qudits, otherwise it should define only `_num_qubits_`.
208
210
 
209
211
  Linear combinations of gates can be created by adding gates together and
210
212
  multiplying them by scalars.
cirq/study/sweeps.py CHANGED
@@ -375,7 +375,7 @@ class Zip(Sweep):
375
375
  def param_tuples(self) -> Iterator[Params]:
376
376
  iters = [sweep.param_tuples() for sweep in self.sweeps]
377
377
  for values in zip(*iters):
378
- yield sum(values, ())
378
+ yield tuple(itertools.chain.from_iterable(values))
379
379
 
380
380
  def __repr__(self) -> str:
381
381
  sweeps_repr = ', '.join(repr(s) for s in self.sweeps)
cirq/study/sweeps_test.py CHANGED
@@ -76,6 +76,11 @@ def test_zip():
76
76
  assert len(sweep) == 3
77
77
  assert _values(sweep, 'a') == [1, 2, 3]
78
78
  assert _values(sweep, 'b') == [4, 5, 6]
79
+ assert list(sweep.param_tuples()) == [
80
+ (('a', 1), ('b', 4)),
81
+ (('a', 2), ('b', 5)),
82
+ (('a', 3), ('b', 6)),
83
+ ]
79
84
 
80
85
 
81
86
  def test_zip_longest():
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: cirq-core
3
- Version: 1.6.0.dev20250429173645
3
+ Version: 1.6.0.dev20250429201501
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=0m3sYIyxRNv9jvAo6rzJ-cnbpny3KGnAByrbU7bApgQ,34720
4
4
  cirq/_doc.py,sha256=yDyWUD_2JDS0gShfGRb-rdqRt9-WeL7DhkqX7np0Nko,2879
5
5
  cirq/_import.py,sha256=cfocxtT1BJ4HkfZ-VO8YyIhPP-xfqHDkLrzz6eeO5U0,8421
6
6
  cirq/_import_test.py,sha256=6K_v0riZJXOXUphHNkGA8MY-JcmGlezFaGmvrNhm3OQ,1015
7
- cirq/_version.py,sha256=t-vdDTjnW6myG_4IUYllOdz-FNzkBMzQrmcTFqJPvQY,1206
8
- cirq/_version_test.py,sha256=gj_F6T6WlhaR0fFlTzlB0o8Z7RbhyRwsnYNyc4L3GG0,147
7
+ cirq/_version.py,sha256=DGBK08QEDxTbuIvEpF3kiRItGzu5lnOeXZfbiyyluZM,1206
8
+ cirq/_version_test.py,sha256=AZO4Ny59ZZChp7DWi8UW6BFiUKgcojXJz40EtSF-2RE,147
9
9
  cirq/conftest.py,sha256=X7yLFL8GLhg2CjPw0hp5e_dGASfvHx1-QT03aUbhKJw,1168
10
10
  cirq/json_resolver_cache.py,sha256=-4KqEEYb6aps-seafnFTHTp3SZc0D8mr4O-pCKIajn8,13653
11
11
  cirq/py.typed,sha256=VFSlmh_lNwnaXzwY-ZuW-C2Ws5PkuDoVgBdNCs0jXJE,63
@@ -363,7 +363,7 @@ cirq/ops/qubit_order_or_list.py,sha256=WVnhQcOYCgAhiB4t47Kji-pN1tnvs--X5deCQwwGV
363
363
  cirq/ops/qubit_order_test.py,sha256=B9xMIxlaI7YjRUNA6AkHJuUCFejGYw-lT7ZaSl31yTU,4238
364
364
  cirq/ops/random_gate_channel.py,sha256=HqE7wWehH6cNPEcsqNIFj99lL7iNzK-YAyXXJrzQxkk,5141
365
365
  cirq/ops/random_gate_channel_test.py,sha256=6pJgavUZAw9WSxgcDPNwQk1Wzt4ffD-1dED2IcpKUcg,8398
366
- cirq/ops/raw_types.py,sha256=L1cyblfPsBwIOh8dW1RAFsS4GRrnIFln8pOWgD9_gqY,43728
366
+ cirq/ops/raw_types.py,sha256=MfOTIYszz0PuedZss2u9aA3cwqtfyEv30FtwtkJx2io,43937
367
367
  cirq/ops/raw_types_test.py,sha256=YyyR1UDyW4Vail8Zsvz-nCLlqRsnjCnuzQEBn2oEZyM,34751
368
368
  cirq/ops/state_preparation_channel.py,sha256=ypePZSkI2WiXR4Z0K4PbqZe5pA8YzB0lScFZEHccixA,4794
369
369
  cirq/ops/state_preparation_channel_test.py,sha256=tSjrd5cCkd0nEV26WzJN-IVVHtm7HjfHGImYcvhYec8,5923
@@ -962,8 +962,8 @@ cirq/study/result.py,sha256=U4bsSZ0D78p4DJOkcpiJk-Ow0U4pi90Z-sPXSv6x0bI,19314
962
962
  cirq/study/result_test.py,sha256=fq5BH78RswfTiYjMchJ4wEDDyaJu0QdJoGobMjKDeSI,15591
963
963
  cirq/study/sweepable.py,sha256=TXry4R8jDqhbq_FXPFdLlF9vEHA0MQrmFbJd4K6PlPc,4358
964
964
  cirq/study/sweepable_test.py,sha256=ENv03_GJmbUc_ukJoqfgG-H5C_yyx1jCcvxohSMyQVU,5502
965
- cirq/study/sweeps.py,sha256=UWMMylvn-0X0kqLYWgxfleJxcCDlc0YrmE7kHuoQcT4,21678
966
- cirq/study/sweeps_test.py,sha256=1DZboNgbOMvnP-UYzjVN8uPCbkuj0vw7gKi2FW7fMzQ,16160
965
+ cirq/study/sweeps.py,sha256=lZj9ITkaZCorXha-KfGzcou1PMPk_uDIepeztSC-1fk,21707
966
+ cirq/study/sweeps_test.py,sha256=wd8nkxKaCb8i5FqSanyGbcMMiyigpGaY3tqKeVoT-x8,16299
967
967
  cirq/testing/__init__.py,sha256=m_HUdHcJ3HcKpGQBKCwZ6E6QSkKpIN-dUGr4e75o4tY,6217
968
968
  cirq/testing/circuit_compare.py,sha256=7Y9agOcdxDnOvigN58OH9NNvlW-HGTGLjZaj0tRVep4,19175
969
969
  cirq/testing/circuit_compare_test.py,sha256=yGf1ZqiYzvEj_mepbwHo230d3mwb_4N7K0E_Lhxms_Q,19702
@@ -1209,8 +1209,8 @@ cirq/work/sampler.py,sha256=sW0RhIelGABAKbqTM58shwyyCPgf86JIv9IGdJe__js,19186
1209
1209
  cirq/work/sampler_test.py,sha256=mdk1J-WrvbPUYhY41VhWf9_te4DnXr_XMPcugWwc4-I,13281
1210
1210
  cirq/work/zeros_sampler.py,sha256=8_Ne6dBkDANtTZuql7Eb0Qg_E_P3-_gu-ybFzxTbKAQ,2356
1211
1211
  cirq/work/zeros_sampler_test.py,sha256=JIkpBBFPJe5Ba4142vzogyWyboG1Q1ZAm0UVGgOoZn8,3279
1212
- cirq_core-1.6.0.dev20250429173645.dist-info/licenses/LICENSE,sha256=tAkwu8-AdEyGxGoSvJ2gVmQdcicWw3j1ZZueVV74M-E,11357
1213
- cirq_core-1.6.0.dev20250429173645.dist-info/METADATA,sha256=HI3PbZoPlS6yhtZNkdvGBOyp_QqRiRTS3qN_7Dc4Dqo,4908
1214
- cirq_core-1.6.0.dev20250429173645.dist-info/WHEEL,sha256=ck4Vq1_RXyvS4Jt6SI0Vz6fyVs4GWg7AINwpsaGEgPE,91
1215
- cirq_core-1.6.0.dev20250429173645.dist-info/top_level.txt,sha256=Sz9iOxHU0IEMLSFGwiwOCaN2e9K-jFbBbtpPN1hB73g,5
1216
- cirq_core-1.6.0.dev20250429173645.dist-info/RECORD,,
1212
+ cirq_core-1.6.0.dev20250429201501.dist-info/licenses/LICENSE,sha256=tAkwu8-AdEyGxGoSvJ2gVmQdcicWw3j1ZZueVV74M-E,11357
1213
+ cirq_core-1.6.0.dev20250429201501.dist-info/METADATA,sha256=FFMtWrImPH-RESS6y2NeyXYICZ0INm_2Cphc3dmzF_0,4908
1214
+ cirq_core-1.6.0.dev20250429201501.dist-info/WHEEL,sha256=ck4Vq1_RXyvS4Jt6SI0Vz6fyVs4GWg7AINwpsaGEgPE,91
1215
+ cirq_core-1.6.0.dev20250429201501.dist-info/top_level.txt,sha256=Sz9iOxHU0IEMLSFGwiwOCaN2e9K-jFbBbtpPN1hB73g,5
1216
+ cirq_core-1.6.0.dev20250429201501.dist-info/RECORD,,