cirq-core 1.7.0.dev20250821232720__py3-none-any.whl → 1.7.0.dev20250822234503__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, 11, 0): # pragma: no cover
28
28
  'of Cirq (e.g. "python -m pip install cirq==1.5.0")'
29
29
  )
30
30
 
31
- __version__ = "1.7.0.dev20250821232720"
31
+ __version__ = "1.7.0.dev20250822234503"
cirq/_version_test.py CHANGED
@@ -3,4 +3,4 @@ import cirq
3
3
 
4
4
 
5
5
  def test_version() -> None:
6
- assert cirq.__version__ == "1.7.0.dev20250821232720"
6
+ assert cirq.__version__ == "1.7.0.dev20250822234503"
cirq/circuits/circuit.py CHANGED
@@ -844,7 +844,9 @@ class AbstractCircuit(abc.ABC):
844
844
  return protocols.is_measurement(self)
845
845
 
846
846
  def _is_measurement_(self) -> bool:
847
- return any(protocols.is_measurement(op) for op in self.all_operations())
847
+ # Measurements are most likely at the end of the circuit,
848
+ # so iterate from the end of the circuit
849
+ return any(protocols.is_measurement(op) for moment in reversed(self) for op in moment)
848
850
 
849
851
  def are_all_measurements_terminal(self) -> bool:
850
852
  """Whether all measurement gates are at the end of the circuit.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: cirq-core
3
- Version: 1.7.0.dev20250821232720
3
+ Version: 1.7.0.dev20250822234503
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=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=JHwdwi0b7Y9iqDy_xOti520b8zJjGYHxrYL8R5A_mng,1206
8
- cirq/_version_test.py,sha256=gbez_n7HdxqD8q-iL0pfxKgKfYIUYPrzZW50jzsXgto,155
7
+ cirq/_version.py,sha256=9sk98eFrqkZdh2pajWBYVAT6xe10_-VFoLDeJBaxHEM,1206
8
+ cirq/_version_test.py,sha256=RyBYbYG4CO7D2dyeDmz49YTTEED6QxHhq5aLbk1KJ9I,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
@@ -16,7 +16,7 @@ cirq/circuits/_box_drawing_character_data.py,sha256=hExbMJHm9LGORhlhNiUvPiHquv4p
16
16
  cirq/circuits/_box_drawing_character_data_test.py,sha256=GyiNQDtiu_drzEe_y8DOXCFRYDKr2k8KetXN5RVDp18,1668
17
17
  cirq/circuits/_bucket_priority_queue.py,sha256=U564r2mou4aZsOlpVYiZCgirqS6mVznG3ESyawBt4gE,6749
18
18
  cirq/circuits/_bucket_priority_queue_test.py,sha256=MOby-UKYZQMe2n4KhqkfDCPrz-T_3eBbWDEa0_nadJQ,5627
19
- cirq/circuits/circuit.py,sha256=Jap7Aner1fZBIiEX0vUqjSss_kjFdqEtJdZE8Xa0qNA,122644
19
+ cirq/circuits/circuit.py,sha256=_5i3X0ICHZInOgPbK98v0usdHDr6YU7ONxgr9DXLGkM,122773
20
20
  cirq/circuits/circuit_operation.py,sha256=vvLk30okWhimdJRFhFOpwoHDkyOHzR2I9OIggZaqmVk,36338
21
21
  cirq/circuits/circuit_operation_test.py,sha256=ZoYvAIsURx9yPWiLcPeX3--lkCOFJkXLxHafUJaZf1U,50425
22
22
  cirq/circuits/circuit_test.py,sha256=Q1ywfvVp6ThmtkAKTk-5bq0cVKctncL0d1qoWxTL_r4,166579
@@ -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.dev20250821232720.dist-info/licenses/LICENSE,sha256=tAkwu8-AdEyGxGoSvJ2gVmQdcicWw3j1ZZueVV74M-E,11357
1238
- cirq_core-1.7.0.dev20250821232720.dist-info/METADATA,sha256=f6QWegMy6Jb8Jkgq9TXndJEOZ27-J56RM6yuSbBl9NQ,4819
1239
- cirq_core-1.7.0.dev20250821232720.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
1240
- cirq_core-1.7.0.dev20250821232720.dist-info/top_level.txt,sha256=Sz9iOxHU0IEMLSFGwiwOCaN2e9K-jFbBbtpPN1hB73g,5
1241
- cirq_core-1.7.0.dev20250821232720.dist-info/RECORD,,
1237
+ cirq_core-1.7.0.dev20250822234503.dist-info/licenses/LICENSE,sha256=tAkwu8-AdEyGxGoSvJ2gVmQdcicWw3j1ZZueVV74M-E,11357
1238
+ cirq_core-1.7.0.dev20250822234503.dist-info/METADATA,sha256=VPi6Jnuvy00FeXs55xMwyKghxf8ucx2X4uriYfhJhLc,4819
1239
+ cirq_core-1.7.0.dev20250822234503.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
1240
+ cirq_core-1.7.0.dev20250822234503.dist-info/top_level.txt,sha256=Sz9iOxHU0IEMLSFGwiwOCaN2e9K-jFbBbtpPN1hB73g,5
1241
+ cirq_core-1.7.0.dev20250822234503.dist-info/RECORD,,