cirq-core 1.7.0.dev20250925223930__py3-none-any.whl → 1.7.0.dev20250926000855__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.dev20250925223930"
31
+ __version__ = "1.7.0.dev20250926000855"
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.dev20250925223930"
6
+ assert cirq.__version__ == "1.7.0.dev20250926000855"
@@ -21,8 +21,26 @@ from cirq.contrib.paulistring.clifford_target_gateset import CliffordTargetGates
21
21
 
22
22
 
23
23
  def clifford_optimized_circuit(circuit: circuits.Circuit, atol: float = 1e-8) -> circuits.Circuit:
24
- # Convert to a circuit with SingleQubitCliffordGates,
25
- # CZs and other ignored gates
24
+ """Optimizes a circuit composed of Clifford and CZ gates.
25
+
26
+ This function attempts to simplify a circuit by finding local optimizations.
27
+ It works in two stages:
28
+ 1. It converts the circuit to a target gateset consisting of
29
+ `cirq.SingleQubitCliffordGate` and `cirq.CZPowGate` gates.
30
+ 2. It then iterates through the circuit, applying the following rules:
31
+ - Merges adjacent single-qubit Clifford gates.
32
+ - Commutes single-qubit Clifford gates past CZ gates, attempting to
33
+ merge them with other single-qubit Clifford gates.
34
+ - Cancels pairs of identical CZ gates.
35
+
36
+ Args:
37
+ circuit: The circuit to optimize.
38
+ atol: A limit on the amount of absolute error introduced by the decomposition.
39
+
40
+ Returns:
41
+ The optimized circuit.
42
+ """
43
+ # Convert to a circuit with SingleQubitCliffordGates, CZs and other ignored gates.
26
44
  c_cliff = transformers.optimize_for_target_gateset(
27
45
  circuit, gateset=CliffordTargetGateset(atol=atol)
28
46
  )
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: cirq-core
3
- Version: 1.7.0.dev20250925223930
3
+ Version: 1.7.0.dev20250926000855
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=AyP-jMhCZv_doo5pZ3O-KjdOP8Z_Cxx8QHomagnS1Zo,1206
8
- cirq/_version_test.py,sha256=n9bB5uKZnc7YbY1pmlqMyhfKJ5iaqM6QOAbIDskSx9s,155
7
+ cirq/_version.py,sha256=e0hRNDzWL1dC5broxpqJmLUmXKOfY7sXG0fKBLlKHsQ,1206
8
+ cirq/_version_test.py,sha256=TlhFCdORMWJpq5Go53KjFXL5wzkTx851AY9NHqwUFu0,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
@@ -100,7 +100,7 @@ cirq/contrib/noise_models/__init__.py,sha256=O3wvaQ6kyNZzwsCnMMZvr2EyS76LpO9xnVZ
100
100
  cirq/contrib/noise_models/noise_models.py,sha256=CJcvVQTaah5t6AC2nFTbaiSL-nTR1jtYV3ftO7nTbyo,11404
101
101
  cirq/contrib/noise_models/noise_models_test.py,sha256=htDTYcWeMtgtLIo_4DaTIidoHCxPMVIAKtS80R4OmDs,11472
102
102
  cirq/contrib/paulistring/__init__.py,sha256=1k2_MYLTMPn8AFoJvSgpN-F-6xgmDjKXRhb-FdDsFoQ,1761
103
- cirq/contrib/paulistring/clifford_optimize.py,sha256=VMdivMpQnPQhgqtasce6dOPGx6x6eIZ6Z4f1H666j-I,7859
103
+ cirq/contrib/paulistring/clifford_optimize.py,sha256=UDJ9aIJ-iFBFM5MV8n6ec7wsGluC6diC4UFXYSfep1g,8675
104
104
  cirq/contrib/paulistring/clifford_optimize_test.py,sha256=8FFLg9gb1HmHHMdXPa-vCr1zyxvgdlciRH8qyfTWQRw,3964
105
105
  cirq/contrib/paulistring/clifford_target_gateset.py,sha256=5QP4A1gC1rsTbWXB0L00ZuSGy2VZvYer63UyydCj1W0,6311
106
106
  cirq/contrib/paulistring/clifford_target_gateset_test.py,sha256=LUkfj_cahaclu2iByO3YsX-db-DLEWrAxZfxeKuJPdI,8792
@@ -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.dev20250925223930.dist-info/licenses/LICENSE,sha256=tAkwu8-AdEyGxGoSvJ2gVmQdcicWw3j1ZZueVV74M-E,11357
1240
- cirq_core-1.7.0.dev20250925223930.dist-info/METADATA,sha256=O9e_dgU7CNoZFdvYpels3Z5_mQUuIrivsf_xau9GE2o,4758
1241
- cirq_core-1.7.0.dev20250925223930.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
1242
- cirq_core-1.7.0.dev20250925223930.dist-info/top_level.txt,sha256=Sz9iOxHU0IEMLSFGwiwOCaN2e9K-jFbBbtpPN1hB73g,5
1243
- cirq_core-1.7.0.dev20250925223930.dist-info/RECORD,,
1239
+ cirq_core-1.7.0.dev20250926000855.dist-info/licenses/LICENSE,sha256=tAkwu8-AdEyGxGoSvJ2gVmQdcicWw3j1ZZueVV74M-E,11357
1240
+ cirq_core-1.7.0.dev20250926000855.dist-info/METADATA,sha256=9GnjUvTv5yNU9J0VwDGrtjMZRvbsY80VSKwQNStczc8,4758
1241
+ cirq_core-1.7.0.dev20250926000855.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
1242
+ cirq_core-1.7.0.dev20250926000855.dist-info/top_level.txt,sha256=Sz9iOxHU0IEMLSFGwiwOCaN2e9K-jFbBbtpPN1hB73g,5
1243
+ cirq_core-1.7.0.dev20250926000855.dist-info/RECORD,,