cirq-core 1.7.0.dev20250905003713__py3-none-any.whl → 1.7.0.dev20250906004127__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/circuits/circuit.py +4 -2
- cirq/circuits/circuit_test.py +18 -0
- cirq/contrib/paulistring/pauli_string_measurement_with_readout_mitigation_test.py +8 -8
- {cirq_core-1.7.0.dev20250905003713.dist-info → cirq_core-1.7.0.dev20250906004127.dist-info}/METADATA +1 -1
- {cirq_core-1.7.0.dev20250905003713.dist-info → cirq_core-1.7.0.dev20250906004127.dist-info}/RECORD +10 -10
- {cirq_core-1.7.0.dev20250905003713.dist-info → cirq_core-1.7.0.dev20250906004127.dist-info}/WHEEL +0 -0
- {cirq_core-1.7.0.dev20250905003713.dist-info → cirq_core-1.7.0.dev20250906004127.dist-info}/licenses/LICENSE +0 -0
- {cirq_core-1.7.0.dev20250905003713.dist-info → cirq_core-1.7.0.dev20250906004127.dist-info}/top_level.txt +0 -0
cirq/_version.py
CHANGED
cirq/_version_test.py
CHANGED
cirq/circuits/circuit.py
CHANGED
|
@@ -3002,13 +3002,15 @@ def get_earliest_accommodating_moment_index(
|
|
|
3002
3002
|
mop_index = last_conflict + 1
|
|
3003
3003
|
|
|
3004
3004
|
# Update our dicts with data from this `mop` placement. Note `mop_index` will always be greater
|
|
3005
|
-
# than the existing value for
|
|
3005
|
+
# than the existing value for qubits and measurement keys, by construction.
|
|
3006
3006
|
for qubit in mop_qubits:
|
|
3007
3007
|
qubit_indices[qubit] = mop_index
|
|
3008
3008
|
for key in mop_mkeys:
|
|
3009
3009
|
mkey_indices[key] = mop_index
|
|
3010
|
+
# For control keys, keep the maximum moment index seen so far because ops with the same control
|
|
3011
|
+
# keys can commute past each other.
|
|
3010
3012
|
for key in mop_ckeys:
|
|
3011
|
-
ckey_indices[key] = mop_index
|
|
3013
|
+
ckey_indices[key] = max(mop_index, ckey_indices.get(key, -1))
|
|
3012
3014
|
|
|
3013
3015
|
return mop_index
|
|
3014
3016
|
|
cirq/circuits/circuit_test.py
CHANGED
|
@@ -208,6 +208,24 @@ def test_append_control_key() -> None:
|
|
|
208
208
|
assert len(c) == 1
|
|
209
209
|
|
|
210
210
|
|
|
211
|
+
def test_append_control_key_before_measure() -> None:
|
|
212
|
+
c = cirq.Circuit()
|
|
213
|
+
q1, q2 = cirq.LineQubit.range(2)
|
|
214
|
+
c.append(cirq.X(q1))
|
|
215
|
+
c.append(cirq.X(q1))
|
|
216
|
+
c.append(cirq.X(q1).with_classical_controls('a'))
|
|
217
|
+
c.append(cirq.X(q2).with_classical_controls('a'))
|
|
218
|
+
c.append(cirq.measure(q2, key='a'))
|
|
219
|
+
assert c == cirq.Circuit(
|
|
220
|
+
[
|
|
221
|
+
cirq.Moment(cirq.X(q1), cirq.X(q2).with_classical_controls('a')),
|
|
222
|
+
cirq.Moment(cirq.X(q1)),
|
|
223
|
+
cirq.Moment(cirq.X(q1).with_classical_controls('a')),
|
|
224
|
+
cirq.Moment(cirq.measure(q2, key='a')),
|
|
225
|
+
]
|
|
226
|
+
)
|
|
227
|
+
|
|
228
|
+
|
|
211
229
|
def test_append_multiple() -> None:
|
|
212
230
|
a = cirq.NamedQubit('a')
|
|
213
231
|
b = cirq.NamedQubit('b')
|
|
@@ -141,7 +141,7 @@ def test_pauli_string_measurement_errors_no_noise() -> None:
|
|
|
141
141
|
_ideal_expectation_based_on_pauli_string(
|
|
142
142
|
pauli_string_measurement_results.pauli_string, final_state_vector
|
|
143
143
|
),
|
|
144
|
-
atol=
|
|
144
|
+
atol=10 * pauli_string_measurement_results.mitigated_stddev,
|
|
145
145
|
)
|
|
146
146
|
assert isinstance(
|
|
147
147
|
pauli_string_measurement_results.calibration_result,
|
|
@@ -189,7 +189,7 @@ def test_pauli_string_measurement_errors_with_coefficient_no_noise() -> None:
|
|
|
189
189
|
_ideal_expectation_based_on_pauli_string(
|
|
190
190
|
pauli_string_measurement_results.pauli_string, final_state_vector
|
|
191
191
|
),
|
|
192
|
-
atol=
|
|
192
|
+
atol=10 * pauli_string_measurement_results.mitigated_stddev,
|
|
193
193
|
)
|
|
194
194
|
assert isinstance(
|
|
195
195
|
pauli_string_measurement_results.calibration_result,
|
|
@@ -243,7 +243,7 @@ def test_group_pauli_string_measurement_errors_no_noise_with_coefficient() -> No
|
|
|
243
243
|
_ideal_expectation_based_on_pauli_string(
|
|
244
244
|
pauli_string_measurement_results.pauli_string, final_state_vector
|
|
245
245
|
),
|
|
246
|
-
atol=
|
|
246
|
+
atol=10 * pauli_string_measurement_results.mitigated_stddev,
|
|
247
247
|
)
|
|
248
248
|
assert isinstance(
|
|
249
249
|
pauli_string_measurement_results.calibration_result,
|
|
@@ -286,7 +286,7 @@ def test_pauli_string_measurement_errors_with_noise() -> None:
|
|
|
286
286
|
_ideal_expectation_based_on_pauli_string(
|
|
287
287
|
pauli_string_measurement_results.pauli_string, final_state_vector
|
|
288
288
|
),
|
|
289
|
-
atol=
|
|
289
|
+
atol=10 * pauli_string_measurement_results.mitigated_stddev,
|
|
290
290
|
)
|
|
291
291
|
|
|
292
292
|
assert isinstance(
|
|
@@ -337,7 +337,7 @@ def test_group_pauli_string_measurement_errors_with_noise() -> None:
|
|
|
337
337
|
_ideal_expectation_based_on_pauli_string(
|
|
338
338
|
pauli_string_measurement_results.pauli_string, final_state_vector
|
|
339
339
|
),
|
|
340
|
-
atol=
|
|
340
|
+
atol=10 * pauli_string_measurement_results.mitigated_stddev,
|
|
341
341
|
)
|
|
342
342
|
|
|
343
343
|
assert isinstance(
|
|
@@ -398,7 +398,7 @@ def test_many_circuits_input_measurement_with_noise() -> None:
|
|
|
398
398
|
_ideal_expectation_based_on_pauli_string(
|
|
399
399
|
pauli_string_measurement_results.pauli_string, final_state_vector
|
|
400
400
|
),
|
|
401
|
-
atol=
|
|
401
|
+
atol=10 * pauli_string_measurement_results.mitigated_stddev,
|
|
402
402
|
)
|
|
403
403
|
assert isinstance(
|
|
404
404
|
pauli_string_measurement_results.calibration_result,
|
|
@@ -517,7 +517,7 @@ def test_many_circuits_with_coefficient() -> None:
|
|
|
517
517
|
_ideal_expectation_based_on_pauli_string(
|
|
518
518
|
pauli_string_measurement_results.pauli_string, final_state_vector
|
|
519
519
|
),
|
|
520
|
-
atol=
|
|
520
|
+
atol=10 * pauli_string_measurement_results.mitigated_stddev,
|
|
521
521
|
)
|
|
522
522
|
assert isinstance(
|
|
523
523
|
pauli_string_measurement_results.calibration_result,
|
|
@@ -588,7 +588,7 @@ def test_many_group_pauli_in_circuits_with_coefficient() -> None:
|
|
|
588
588
|
_ideal_expectation_based_on_pauli_string(
|
|
589
589
|
pauli_string_measurement_results.pauli_string, final_state_vector
|
|
590
590
|
),
|
|
591
|
-
atol=
|
|
591
|
+
atol=10 * pauli_string_measurement_results.mitigated_stddev,
|
|
592
592
|
)
|
|
593
593
|
assert isinstance(
|
|
594
594
|
pauli_string_measurement_results.calibration_result,
|
{cirq_core-1.7.0.dev20250905003713.dist-info → cirq_core-1.7.0.dev20250906004127.dist-info}/METADATA
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: cirq-core
|
|
3
|
-
Version: 1.7.0.
|
|
3
|
+
Version: 1.7.0.dev20250906004127
|
|
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.7.0.dev20250905003713.dist-info → cirq_core-1.7.0.dev20250906004127.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=rHj9OxmoWEpsMNGhEk-7wm2NWOcOLEono0BGaeNBYww,1206
|
|
8
|
+
cirq/_version_test.py,sha256=V7vh-5Kz7DWCXo21ImJrEETtRujanSJSPPq1tc3nfaM,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,10 +16,10 @@ 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=
|
|
19
|
+
cirq/circuits/circuit.py,sha256=sBUG4Tm2KXYkwiPPJ_HDYBJM6fkhb_Qxfny93wXANCw,122960
|
|
20
20
|
cirq/circuits/circuit_operation.py,sha256=vvLk30okWhimdJRFhFOpwoHDkyOHzR2I9OIggZaqmVk,36338
|
|
21
21
|
cirq/circuits/circuit_operation_test.py,sha256=ZoYvAIsURx9yPWiLcPeX3--lkCOFJkXLxHafUJaZf1U,50425
|
|
22
|
-
cirq/circuits/circuit_test.py,sha256=
|
|
22
|
+
cirq/circuits/circuit_test.py,sha256=fT08nAEf-aiA5cvboBYnfLPGJHxauGIzJ2_Iw0fWT40,167182
|
|
23
23
|
cirq/circuits/frozen_circuit.py,sha256=UXwABQqBSnSKqSWmRluQPD09xZU0orSW3b3IHvDqxUw,7903
|
|
24
24
|
cirq/circuits/frozen_circuit_test.py,sha256=1Uk3g9St_nJFmu3IJ5hAcXWJjLfWFUXTCKQU1b0JJrE,5321
|
|
25
25
|
cirq/circuits/insert_strategy.py,sha256=3995vK4U6O9RV4BXMoFl9Tf3ekxIiqxv71IuX80JtYo,3237
|
|
@@ -109,7 +109,7 @@ cirq/contrib/paulistring/optimize_test.py,sha256=FsmwyYFIGyyiO115oYgmCfaSV3De55A
|
|
|
109
109
|
cirq/contrib/paulistring/pauli_string_dag.py,sha256=28bUVNsIS9WYKdyYCNIVrkRwqQOKlkpmCacWow6N6D0,1142
|
|
110
110
|
cirq/contrib/paulistring/pauli_string_dag_test.py,sha256=nH_1h5LQobV9rb5gitLmrvpIwWwrcRmNdUGDAhFMZtI,1168
|
|
111
111
|
cirq/contrib/paulistring/pauli_string_measurement_with_readout_mitigation.py,sha256=xrG4KNJaJjjhCG_0KvnOFdAOTbNRGJhYwyhCSBjWkWw,21288
|
|
112
|
-
cirq/contrib/paulistring/pauli_string_measurement_with_readout_mitigation_test.py,sha256=
|
|
112
|
+
cirq/contrib/paulistring/pauli_string_measurement_with_readout_mitigation_test.py,sha256=dMIjWKXxexxIJMn3OXa7dAT4e7PG0BAqTA9f9WspPkk,36839
|
|
113
113
|
cirq/contrib/paulistring/pauli_string_optimize.py,sha256=ejHf7Bo0iUvnNBeZ5IN0bT0SIXF79DSGr1NxoAyVfiQ,2960
|
|
114
114
|
cirq/contrib/paulistring/pauli_string_optimize_test.py,sha256=_14FS9TAvzRsmnTZxJUsMXPNcenv5mb0eD2gGTxvohE,2955
|
|
115
115
|
cirq/contrib/paulistring/recombine.py,sha256=phJ-SY4zdqZpIZca0iSsY0lK6NdXd0M0sOOWnUdGn5U,4353
|
|
@@ -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.
|
|
1238
|
-
cirq_core-1.7.0.
|
|
1239
|
-
cirq_core-1.7.0.
|
|
1240
|
-
cirq_core-1.7.0.
|
|
1241
|
-
cirq_core-1.7.0.
|
|
1237
|
+
cirq_core-1.7.0.dev20250906004127.dist-info/licenses/LICENSE,sha256=tAkwu8-AdEyGxGoSvJ2gVmQdcicWw3j1ZZueVV74M-E,11357
|
|
1238
|
+
cirq_core-1.7.0.dev20250906004127.dist-info/METADATA,sha256=dlyQUrjYr5M3XvxunX5uCHK0RCXrCTIe2fCuRVAj3AE,4758
|
|
1239
|
+
cirq_core-1.7.0.dev20250906004127.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
1240
|
+
cirq_core-1.7.0.dev20250906004127.dist-info/top_level.txt,sha256=Sz9iOxHU0IEMLSFGwiwOCaN2e9K-jFbBbtpPN1hB73g,5
|
|
1241
|
+
cirq_core-1.7.0.dev20250906004127.dist-info/RECORD,,
|
{cirq_core-1.7.0.dev20250905003713.dist-info → cirq_core-1.7.0.dev20250906004127.dist-info}/WHEEL
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|