cirq-core 1.6.0.dev20250501231232__py3-none-any.whl → 1.6.0.dev20250502191313__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.dev20250501231232"
31
+ __version__ = "1.6.0.dev20250502191313"
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.dev20250501231232"
6
+ assert cirq.__version__ == "1.6.0.dev20250502191313"
@@ -51,7 +51,7 @@ def operations_to_part_lens(
51
51
  part_sort_key = lambda p: min(qubit_sort_key(q) for q in p)
52
52
  parts = tuple(tuple(part) for part in sorted(singletons + op_parts, key=part_sort_key))
53
53
 
54
- if sum(parts, ()) != tuple(qubit_order):
54
+ if tuple(itertools.chain.from_iterable(parts)) != tuple(qubit_order):
55
55
  raise ValueError('sum(parts, ()) != tuple(qubit_order)')
56
56
 
57
57
  return tuple(len(part) for part in parts)
@@ -211,7 +211,7 @@ def test_simplify_cnots_triplets(
211
211
  assert actual_output_cnots == expected_output_cnots
212
212
 
213
213
  # Check that the unitaries are the same.
214
- qubit_ids = set(sum(input_cnots, ()))
214
+ qubit_ids = set(itertools.chain.from_iterable(input_cnots))
215
215
  qubits = {qubit_id: cirq.NamedQubit(f"{qubit_id}") for qubit_id in qubit_ids}
216
216
 
217
217
  target, control = (0, 1) if input_flip_control_and_target else (1, 0)
cirq/study/sweeps.py CHANGED
@@ -237,7 +237,7 @@ class Product(Sweep):
237
237
 
238
238
  @property
239
239
  def keys(self) -> List[cirq.TParamKey]:
240
- return sum((factor.keys for factor in self.factors), [])
240
+ return list(itertools.chain.from_iterable(factor.keys for factor in self.factors))
241
241
 
242
242
  def __len__(self) -> int:
243
243
  length = 1
@@ -365,7 +365,7 @@ class Zip(Sweep):
365
365
 
366
366
  @property
367
367
  def keys(self) -> List[cirq.TParamKey]:
368
- return sum((sweep.keys for sweep in self.sweeps), [])
368
+ return list(itertools.chain.from_iterable(sweep.keys for sweep in self.sweeps))
369
369
 
370
370
  def __len__(self) -> int:
371
371
  if not self.sweeps:
@@ -14,6 +14,7 @@
14
14
 
15
15
  from __future__ import annotations
16
16
 
17
+ import itertools
17
18
  from typing import List, Tuple, TYPE_CHECKING
18
19
 
19
20
  import numpy as np
@@ -36,7 +37,7 @@ def _is_identity(matrix):
36
37
 
37
38
 
38
39
  def _flatten(x):
39
- return sum(x, [])
40
+ return list(itertools.chain.from_iterable(x))
40
41
 
41
42
 
42
43
  def _decompose_abc(matrix: np.ndarray) -> Tuple[np.ndarray, np.ndarray, np.ndarray, float]:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: cirq-core
3
- Version: 1.6.0.dev20250501231232
3
+ Version: 1.6.0.dev20250502191313
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=A1Q3pZC0Q7bB_vgobf71D8jfZOCjjZZzsMV86g5J2K4,1206
8
- cirq/_version_test.py,sha256=yrAKSgPL3X-cwPELPoppKh2xaGkiMQ82dgKn7ZCGqvU,147
7
+ cirq/_version.py,sha256=PYDX-58EPDpSkj_agXTAnqZKhV7z_u75QP6ZshYJGCI,1206
8
+ cirq/_version_test.py,sha256=TyJfLTAJWt91937_5DAvzXBZiMVEDAvhfBFD4CBqXF0,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
@@ -42,7 +42,7 @@ cirq/contrib/acquaintance/devices.py,sha256=5wnuG4IFrva4J3muqf81iOS3zlxuEZ81V2UA
42
42
  cirq/contrib/acquaintance/devices_test.py,sha256=RnNwPp1PHNrcygibMdrJEMViBCm4eTXZgI0PUqAeoCM,1207
43
43
  cirq/contrib/acquaintance/executor.py,sha256=a6SIaykIfZaIlxHxlgpwzqfvUb46O2V2i_qEJsEGlcI,8661
44
44
  cirq/contrib/acquaintance/executor_test.py,sha256=VxmGijgjAjuy6s-H5L9Ynu4CxYXFr9rPc2FfuoQjdXs,7903
45
- cirq/contrib/acquaintance/gates.py,sha256=WiIbIEvzIsw4ny9PMaL0yMSu9JSCJXq9TarWGpq41zs,13542
45
+ cirq/contrib/acquaintance/gates.py,sha256=Fkk7f0YwVLULh1hGXqjtGm5etb9xuhgvQlb3hrcMML0,13571
46
46
  cirq/contrib/acquaintance/gates_test.py,sha256=m_QMKqElKXqDbtviwJcgwYf8E1ZM7jcFmb2iPbAIrGM,15010
47
47
  cirq/contrib/acquaintance/inspection_utils.py,sha256=yTJ-ferTfvLst8Lm6mchsQV5qgFI-D6LtnQD_dG-B9Q,2636
48
48
  cirq/contrib/acquaintance/inspection_utils_test.py,sha256=_ksOZ1fBkRsylRWKHWa2-sNgqJdlQK5mb5xZx57--dI,1426
@@ -271,7 +271,7 @@ cirq/ops/__init__.py,sha256=Fvghj3MopLpeIdbpb6en855QgwperBs5esV1iszhBDA,8274
271
271
  cirq/ops/arithmetic_operation.py,sha256=j1RkP2gDX3n7xzEKNAoTQSmzfXBIAdov07AUlhdtVQw,10157
272
272
  cirq/ops/arithmetic_operation_test.py,sha256=iKjnwOvd1wCWk-byeUC14aGwYuHXOlkrtlOvNRUcMqs,4942
273
273
  cirq/ops/boolean_hamiltonian.py,sha256=2Z5iqrxHxMmFjRgY72uqedK2C6sfFtIFSGs8TGwyhKg,14946
274
- cirq/ops/boolean_hamiltonian_test.py,sha256=1ey5yfYZPKZDsfM3jpCPAOpbPs_y8i4K_WvDK2d5_4Y,8518
274
+ cirq/ops/boolean_hamiltonian_test.py,sha256=p0vm-hQKWJQdiLl6KyM-ylF3eIW1JgxBfiheFABKCig,8540
275
275
  cirq/ops/classically_controlled_operation.py,sha256=lRP-agJZBgGO5CL9OML3oZKaOZJAuAMqnHe4XRAC6Gk,10369
276
276
  cirq/ops/classically_controlled_operation_test.py,sha256=nIYyXfNH4E2IibZSLk6QDVHpfJQbuI_iWwirCH8rhi8,50209
277
277
  cirq/ops/clifford_gate.py,sha256=awiYS6M5HiFXZee1Y9ZouC6u92UjfTJsK7soelid0ng,39392
@@ -962,7 +962,7 @@ 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=lZj9ITkaZCorXha-KfGzcou1PMPk_uDIepeztSC-1fk,21707
965
+ cirq/study/sweeps.py,sha256=FB5qqkf6M_AAc0jw-PdvOMuq_gt5h5iF3m4ZtZDMILU,21759
966
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
@@ -1085,7 +1085,7 @@ cirq/transformers/transformer_primitives_test.py,sha256=oKGhuIv9Gr3cs5JX9V9Jotbe
1085
1085
  cirq/transformers/analytical_decompositions/__init__.py,sha256=hMsoQSQtSvEn5mNohSvGPjsmf58VN4jzmIFnchVhZi8,3760
1086
1086
  cirq/transformers/analytical_decompositions/clifford_decomposition.py,sha256=ZGniJDdKrIU_PD5yLw4S-ukQ2Tko9inggc5Vp2nu3iU,6749
1087
1087
  cirq/transformers/analytical_decompositions/clifford_decomposition_test.py,sha256=iIU5FhXlmnKoA0cIIp0lnYGcpyCJ4bevNheYNN-_FAc,7102
1088
- cirq/transformers/analytical_decompositions/controlled_gate_decomposition.py,sha256=mW_zxi09A2kRrGBTYU5sOXku9c0nczEU3AHvKgR7urM,8669
1088
+ cirq/transformers/analytical_decompositions/controlled_gate_decomposition.py,sha256=VVVgP1jsHW0CMVsChvowgchWM4qs7B_R7fYPRdjA814,8714
1089
1089
  cirq/transformers/analytical_decompositions/controlled_gate_decomposition_test.py,sha256=sZ2eDF5foEyNhTDqSzTYKkug4CMY7QmF4NCN-FaA530,5050
1090
1090
  cirq/transformers/analytical_decompositions/cphase_to_fsim.py,sha256=Xw6kQlnx_Qrduwy_BzFLkd37WQsGK6Nnl-Om364R9Ec,9135
1091
1091
  cirq/transformers/analytical_decompositions/cphase_to_fsim_test.py,sha256=RbtQKHz0uEtbfaUejfXGgi6ngjPQ0yQtgM1alxKJUr0,5568
@@ -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.dev20250501231232.dist-info/licenses/LICENSE,sha256=tAkwu8-AdEyGxGoSvJ2gVmQdcicWw3j1ZZueVV74M-E,11357
1213
- cirq_core-1.6.0.dev20250501231232.dist-info/METADATA,sha256=tJLjTAFl6fI7cJe2iMXNyEskoVXcxnu9JGqT4nPcISY,4908
1214
- cirq_core-1.6.0.dev20250501231232.dist-info/WHEEL,sha256=wXxTzcEDnjrTwFYjLPcsW_7_XihufBwmpiBeiXNBGEA,91
1215
- cirq_core-1.6.0.dev20250501231232.dist-info/top_level.txt,sha256=Sz9iOxHU0IEMLSFGwiwOCaN2e9K-jFbBbtpPN1hB73g,5
1216
- cirq_core-1.6.0.dev20250501231232.dist-info/RECORD,,
1212
+ cirq_core-1.6.0.dev20250502191313.dist-info/licenses/LICENSE,sha256=tAkwu8-AdEyGxGoSvJ2gVmQdcicWw3j1ZZueVV74M-E,11357
1213
+ cirq_core-1.6.0.dev20250502191313.dist-info/METADATA,sha256=k6cZYHsjHUz0V2e279oMfpHVGMK23nKraMrhpGR7U7A,4908
1214
+ cirq_core-1.6.0.dev20250502191313.dist-info/WHEEL,sha256=wXxTzcEDnjrTwFYjLPcsW_7_XihufBwmpiBeiXNBGEA,91
1215
+ cirq_core-1.6.0.dev20250502191313.dist-info/top_level.txt,sha256=Sz9iOxHU0IEMLSFGwiwOCaN2e9K-jFbBbtpPN1hB73g,5
1216
+ cirq_core-1.6.0.dev20250502191313.dist-info/RECORD,,