cirq-core 1.6.0.dev20250410201400__py3-none-any.whl → 1.6.0.dev20250411012134__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_operation.py +34 -31
- cirq/circuits/circuit_operation_test.py +38 -31
- cirq/ops/classically_controlled_operation_test.py +70 -60
- cirq/protocols/json_test_data/CircuitOperation.json +6 -3
- cirq/protocols/json_test_data/CircuitOperation.repr_inward +4 -2
- {cirq_core-1.6.0.dev20250410201400.dist-info → cirq_core-1.6.0.dev20250411012134.dist-info}/METADATA +1 -1
- {cirq_core-1.6.0.dev20250410201400.dist-info → cirq_core-1.6.0.dev20250411012134.dist-info}/RECORD +12 -12
- {cirq_core-1.6.0.dev20250410201400.dist-info → cirq_core-1.6.0.dev20250411012134.dist-info}/WHEEL +0 -0
- {cirq_core-1.6.0.dev20250410201400.dist-info → cirq_core-1.6.0.dev20250411012134.dist-info}/licenses/LICENSE +0 -0
- {cirq_core-1.6.0.dev20250410201400.dist-info → cirq_core-1.6.0.dev20250411012134.dist-info}/top_level.txt +0 -0
cirq/_version.py
CHANGED
cirq/_version_test.py
CHANGED
|
@@ -22,7 +22,6 @@ component operations in order, including any nested CircuitOperations.
|
|
|
22
22
|
from __future__ import annotations
|
|
23
23
|
|
|
24
24
|
import math
|
|
25
|
-
import warnings
|
|
26
25
|
from functools import cached_property
|
|
27
26
|
from typing import (
|
|
28
27
|
Any,
|
|
@@ -49,6 +48,7 @@ from cirq._compat import proper_repr
|
|
|
49
48
|
if TYPE_CHECKING:
|
|
50
49
|
import cirq
|
|
51
50
|
|
|
51
|
+
|
|
52
52
|
INT_CLASSES = (int, np.integer)
|
|
53
53
|
INT_TYPE = Union[int, np.integer]
|
|
54
54
|
IntParam = Union[INT_TYPE, sympy.Expr]
|
|
@@ -123,9 +123,8 @@ class CircuitOperation(ops.Operation):
|
|
|
123
123
|
use_repetition_ids: When True, any measurement key in the subcircuit
|
|
124
124
|
will have its path prepended with the repetition id for each
|
|
125
125
|
repetition. When False, this will not happen and the measurement
|
|
126
|
-
key will be repeated.
|
|
127
|
-
|
|
128
|
-
``use_repetition_ids=True`` to preserve the current behavior.
|
|
126
|
+
key will be repeated. When None, default to False unless the caller
|
|
127
|
+
passes `repetition_ids` explicitly.
|
|
129
128
|
repeat_until: A condition that will be tested after each iteration of
|
|
130
129
|
the subcircuit. The subcircuit will repeat until condition returns
|
|
131
130
|
True, but will always run at least once, and the measurement key
|
|
@@ -162,18 +161,8 @@ class CircuitOperation(ops.Operation):
|
|
|
162
161
|
self._repetitions = repetitions
|
|
163
162
|
self._repetition_ids = None if repetition_ids is None else list(repetition_ids)
|
|
164
163
|
if use_repetition_ids is None:
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
"In cirq 1.6 the default value of `use_repetition_ids` will change to\n"
|
|
168
|
-
"`use_repetition_ids=False`. To make this warning go away, please pass\n"
|
|
169
|
-
"explicit `use_repetition_ids`, e.g., to preserve current behavior, use\n"
|
|
170
|
-
"\n"
|
|
171
|
-
" CircuitOperations(..., use_repetition_ids=True)"
|
|
172
|
-
)
|
|
173
|
-
warnings.warn(msg, FutureWarning)
|
|
174
|
-
self._use_repetition_ids = True
|
|
175
|
-
else:
|
|
176
|
-
self._use_repetition_ids = use_repetition_ids
|
|
164
|
+
use_repetition_ids = repetition_ids is not None
|
|
165
|
+
self._use_repetition_ids = use_repetition_ids
|
|
177
166
|
if isinstance(self._repetitions, float):
|
|
178
167
|
if math.isclose(self._repetitions, round(self._repetitions)):
|
|
179
168
|
self._repetitions = round(self._repetitions)
|
|
@@ -281,7 +270,9 @@ class CircuitOperation(ops.Operation):
|
|
|
281
270
|
'repetition_ids': self.repetition_ids,
|
|
282
271
|
'parent_path': self.parent_path,
|
|
283
272
|
'extern_keys': self._extern_keys,
|
|
284
|
-
'use_repetition_ids':
|
|
273
|
+
'use_repetition_ids': (
|
|
274
|
+
True if changes.get('repetition_ids') is not None else self.use_repetition_ids
|
|
275
|
+
),
|
|
285
276
|
'repeat_until': self.repeat_until,
|
|
286
277
|
**changes,
|
|
287
278
|
}
|
|
@@ -485,11 +476,9 @@ class CircuitOperation(ops.Operation):
|
|
|
485
476
|
args += f'param_resolver={proper_repr(self.param_resolver)},\n'
|
|
486
477
|
if self.parent_path:
|
|
487
478
|
args += f'parent_path={proper_repr(self.parent_path)},\n'
|
|
488
|
-
if self.
|
|
479
|
+
if self.use_repetition_ids:
|
|
489
480
|
# Default repetition_ids need not be specified.
|
|
490
481
|
args += f'repetition_ids={proper_repr(self.repetition_ids)},\n'
|
|
491
|
-
if not self.use_repetition_ids:
|
|
492
|
-
args += 'use_repetition_ids=False,\n'
|
|
493
482
|
if self.repeat_until:
|
|
494
483
|
args += f'repeat_until={self.repeat_until!r},\n'
|
|
495
484
|
indented_args = args.replace('\n', '\n ')
|
|
@@ -514,14 +503,15 @@ class CircuitOperation(ops.Operation):
|
|
|
514
503
|
args.append(f'params={self.param_resolver.param_dict}')
|
|
515
504
|
if self.parent_path:
|
|
516
505
|
args.append(f'parent_path={self.parent_path}')
|
|
517
|
-
if self.
|
|
518
|
-
|
|
519
|
-
|
|
506
|
+
if self.use_repetition_ids:
|
|
507
|
+
if self.repetition_ids != self._default_repetition_ids():
|
|
508
|
+
args.append(f'repetition_ids={self.repetition_ids}')
|
|
509
|
+
else:
|
|
510
|
+
# Default repetition_ids need not be specified.
|
|
511
|
+
args.append(f'loops={self.repetitions}, use_repetition_ids=True')
|
|
520
512
|
elif self.repetitions != 1:
|
|
521
|
-
#
|
|
513
|
+
# Add loops if not using repetition_ids.
|
|
522
514
|
args.append(f'loops={self.repetitions}')
|
|
523
|
-
if not self.use_repetition_ids:
|
|
524
|
-
args.append('no_rep_ids')
|
|
525
515
|
if self.repeat_until:
|
|
526
516
|
args.append(f'until={self.repeat_until}')
|
|
527
517
|
if not args:
|
|
@@ -566,10 +556,9 @@ class CircuitOperation(ops.Operation):
|
|
|
566
556
|
'measurement_key_map': self.measurement_key_map,
|
|
567
557
|
'param_resolver': self.param_resolver,
|
|
568
558
|
'repetition_ids': self.repetition_ids,
|
|
559
|
+
'use_repetition_ids': self.use_repetition_ids,
|
|
569
560
|
'parent_path': self.parent_path,
|
|
570
561
|
}
|
|
571
|
-
if not self.use_repetition_ids:
|
|
572
|
-
resp['use_repetition_ids'] = False
|
|
573
562
|
if self.repeat_until:
|
|
574
563
|
resp['repeat_until'] = self.repeat_until
|
|
575
564
|
return resp
|
|
@@ -603,7 +592,10 @@ class CircuitOperation(ops.Operation):
|
|
|
603
592
|
# Methods for constructing a similar object with one field modified.
|
|
604
593
|
|
|
605
594
|
def repeat(
|
|
606
|
-
self,
|
|
595
|
+
self,
|
|
596
|
+
repetitions: Optional[IntParam] = None,
|
|
597
|
+
repetition_ids: Optional[Sequence[str]] = None,
|
|
598
|
+
use_repetition_ids: Optional[bool] = None,
|
|
607
599
|
) -> CircuitOperation:
|
|
608
600
|
"""Returns a copy of this operation repeated 'repetitions' times.
|
|
609
601
|
Each repetition instance will be identified by a single repetition_id.
|
|
@@ -614,6 +606,10 @@ class CircuitOperation(ops.Operation):
|
|
|
614
606
|
defaults to the length of `repetition_ids`.
|
|
615
607
|
repetition_ids: List of IDs, one for each repetition. If unset,
|
|
616
608
|
defaults to `default_repetition_ids(repetitions)`.
|
|
609
|
+
use_repetition_ids: If given, this specifies the value for `use_repetition_ids`
|
|
610
|
+
of the resulting circuit operation. If not given, we enable ids if
|
|
611
|
+
`repetition_ids` is not None, and otherwise fall back to
|
|
612
|
+
`self.use_repetition_ids`.
|
|
617
613
|
|
|
618
614
|
Returns:
|
|
619
615
|
A copy of this operation repeated `repetitions` times with the
|
|
@@ -628,6 +624,9 @@ class CircuitOperation(ops.Operation):
|
|
|
628
624
|
ValueError: Unexpected length of `repetition_ids`.
|
|
629
625
|
ValueError: Both `repetitions` and `repetition_ids` are None.
|
|
630
626
|
"""
|
|
627
|
+
if use_repetition_ids is None:
|
|
628
|
+
use_repetition_ids = True if repetition_ids is not None else self.use_repetition_ids
|
|
629
|
+
|
|
631
630
|
if repetitions is None:
|
|
632
631
|
if repetition_ids is None:
|
|
633
632
|
raise ValueError('At least one of repetitions and repetition_ids must be set')
|
|
@@ -641,7 +640,7 @@ class CircuitOperation(ops.Operation):
|
|
|
641
640
|
expected_repetition_id_length: int = np.abs(repetitions)
|
|
642
641
|
|
|
643
642
|
if repetition_ids is None:
|
|
644
|
-
if
|
|
643
|
+
if use_repetition_ids:
|
|
645
644
|
repetition_ids = default_repetition_ids(expected_repetition_id_length)
|
|
646
645
|
elif len(repetition_ids) != expected_repetition_id_length:
|
|
647
646
|
raise ValueError(
|
|
@@ -654,7 +653,11 @@ class CircuitOperation(ops.Operation):
|
|
|
654
653
|
|
|
655
654
|
# The eventual number of repetitions of the returned CircuitOperation.
|
|
656
655
|
final_repetitions = protocols.mul(self.repetitions, repetitions)
|
|
657
|
-
return self.replace(
|
|
656
|
+
return self.replace(
|
|
657
|
+
repetitions=final_repetitions,
|
|
658
|
+
repetition_ids=repetition_ids,
|
|
659
|
+
use_repetition_ids=use_repetition_ids,
|
|
660
|
+
)
|
|
658
661
|
|
|
659
662
|
def __pow__(self, power: IntParam) -> cirq.CircuitOperation:
|
|
660
663
|
return self.repeat(power)
|
|
@@ -294,15 +294,15 @@ def test_repeat(add_measurements: bool, use_default_ids_for_initial_rep: bool) -
|
|
|
294
294
|
op_with_reps: Optional[cirq.CircuitOperation] = None
|
|
295
295
|
rep_ids = []
|
|
296
296
|
if use_default_ids_for_initial_rep:
|
|
297
|
-
op_with_reps = op_base.repeat(initial_repetitions)
|
|
298
297
|
rep_ids = ['0', '1', '2']
|
|
299
|
-
|
|
298
|
+
op_with_reps = op_base.repeat(initial_repetitions, use_repetition_ids=True)
|
|
300
299
|
else:
|
|
301
300
|
rep_ids = ['a', 'b', 'c']
|
|
302
301
|
op_with_reps = op_base.repeat(initial_repetitions, rep_ids)
|
|
303
|
-
|
|
304
|
-
|
|
302
|
+
assert op_base**initial_repetitions != op_with_reps
|
|
303
|
+
assert (op_base**initial_repetitions).replace(repetition_ids=rep_ids) == op_with_reps
|
|
305
304
|
assert op_with_reps.repetitions == initial_repetitions
|
|
305
|
+
assert op_with_reps.use_repetition_ids
|
|
306
306
|
assert op_with_reps.repetition_ids == rep_ids
|
|
307
307
|
assert op_with_reps.repeat(1) is op_with_reps
|
|
308
308
|
|
|
@@ -332,8 +332,6 @@ def test_repeat(add_measurements: bool, use_default_ids_for_initial_rep: bool) -
|
|
|
332
332
|
assert op_base.repeat(2.99999999999).repetitions == 3
|
|
333
333
|
|
|
334
334
|
|
|
335
|
-
# TODO: #7232 - enable and fix immediately after the 1.5.0 release
|
|
336
|
-
@pytest.mark.xfail(reason='broken by rollback of use_repetition_ids for #7232')
|
|
337
335
|
def test_replace_repetition_ids() -> None:
|
|
338
336
|
a, b = cirq.LineQubit.range(2)
|
|
339
337
|
circuit = cirq.Circuit(cirq.H(a), cirq.CX(a, b), cirq.M(b, key='mb'), cirq.M(a, key='ma'))
|
|
@@ -460,6 +458,7 @@ def test_parameterized_repeat_side_effects():
|
|
|
460
458
|
op = cirq.CircuitOperation(
|
|
461
459
|
cirq.FrozenCircuit(cirq.X(q).with_classical_controls('c'), cirq.measure(q, key='m')),
|
|
462
460
|
repetitions=sympy.Symbol('a'),
|
|
461
|
+
use_repetition_ids=True,
|
|
463
462
|
)
|
|
464
463
|
|
|
465
464
|
# Control keys can be calculated because they only "lift" if there's a matching
|
|
@@ -713,7 +712,6 @@ cirq.CircuitOperation(
|
|
|
713
712
|
),
|
|
714
713
|
),
|
|
715
714
|
]),
|
|
716
|
-
use_repetition_ids=False,
|
|
717
715
|
)"""
|
|
718
716
|
)
|
|
719
717
|
op7 = cirq.CircuitOperation(
|
|
@@ -730,7 +728,6 @@ cirq.CircuitOperation(
|
|
|
730
728
|
cirq.measure(cirq.LineQubit(0), key=cirq.MeasurementKey(name='a')),
|
|
731
729
|
),
|
|
732
730
|
]),
|
|
733
|
-
use_repetition_ids=False,
|
|
734
731
|
repeat_until=cirq.KeyCondition(cirq.MeasurementKey(name='a')),
|
|
735
732
|
)"""
|
|
736
733
|
)
|
|
@@ -761,6 +758,7 @@ def test_json_dict():
|
|
|
761
758
|
'param_resolver': op.param_resolver,
|
|
762
759
|
'parent_path': op.parent_path,
|
|
763
760
|
'repetition_ids': None,
|
|
761
|
+
'use_repetition_ids': False,
|
|
764
762
|
}
|
|
765
763
|
|
|
766
764
|
|
|
@@ -867,6 +865,26 @@ def test_decompose_loops_with_measurements():
|
|
|
867
865
|
circuit = cirq.FrozenCircuit(cirq.H(a), cirq.CX(a, b), cirq.measure(a, b, key='m'))
|
|
868
866
|
base_op = cirq.CircuitOperation(circuit)
|
|
869
867
|
|
|
868
|
+
op = base_op.with_qubits(b, a).repeat(3)
|
|
869
|
+
expected_circuit = cirq.Circuit(
|
|
870
|
+
cirq.H(b),
|
|
871
|
+
cirq.CX(b, a),
|
|
872
|
+
cirq.measure(b, a, key=cirq.MeasurementKey.parse_serialized('m')),
|
|
873
|
+
cirq.H(b),
|
|
874
|
+
cirq.CX(b, a),
|
|
875
|
+
cirq.measure(b, a, key=cirq.MeasurementKey.parse_serialized('m')),
|
|
876
|
+
cirq.H(b),
|
|
877
|
+
cirq.CX(b, a),
|
|
878
|
+
cirq.measure(b, a, key=cirq.MeasurementKey.parse_serialized('m')),
|
|
879
|
+
)
|
|
880
|
+
assert cirq.Circuit(cirq.decompose_once(op)) == expected_circuit
|
|
881
|
+
|
|
882
|
+
|
|
883
|
+
def test_decompose_loops_with_measurements_use_rep_ids():
|
|
884
|
+
a, b = cirq.LineQubit.range(2)
|
|
885
|
+
circuit = cirq.FrozenCircuit(cirq.H(a), cirq.CX(a, b), cirq.measure(a, b, key='m'))
|
|
886
|
+
base_op = cirq.CircuitOperation(circuit, use_repetition_ids=True)
|
|
887
|
+
|
|
870
888
|
op = base_op.with_qubits(b, a).repeat(3)
|
|
871
889
|
expected_circuit = cirq.Circuit(
|
|
872
890
|
cirq.H(b),
|
|
@@ -1023,7 +1041,9 @@ def test_keys_under_parent_path():
|
|
|
1023
1041
|
op3 = cirq.with_key_path_prefix(op2, ('C',))
|
|
1024
1042
|
assert cirq.measurement_key_names(op3) == {'C:B:A'}
|
|
1025
1043
|
op4 = op3.repeat(2)
|
|
1026
|
-
assert cirq.measurement_key_names(op4) == {'C:B:
|
|
1044
|
+
assert cirq.measurement_key_names(op4) == {'C:B:A'}
|
|
1045
|
+
op4_rep = op3.repeat(2).replace(use_repetition_ids=True)
|
|
1046
|
+
assert cirq.measurement_key_names(op4_rep) == {'C:B:0:A', 'C:B:1:A'}
|
|
1027
1047
|
|
|
1028
1048
|
|
|
1029
1049
|
def test_mapped_circuit_preserves_moments():
|
|
@@ -1101,12 +1121,8 @@ def test_mapped_circuit_allows_repeated_keys():
|
|
|
1101
1121
|
def test_simulate_no_repetition_ids_both_levels(sim):
|
|
1102
1122
|
q = cirq.LineQubit(0)
|
|
1103
1123
|
inner = cirq.Circuit(cirq.measure(q, key='a'))
|
|
1104
|
-
middle = cirq.Circuit(
|
|
1105
|
-
|
|
1106
|
-
)
|
|
1107
|
-
outer_subcircuit = cirq.CircuitOperation(
|
|
1108
|
-
middle.freeze(), repetitions=2, use_repetition_ids=False
|
|
1109
|
-
)
|
|
1124
|
+
middle = cirq.Circuit(cirq.CircuitOperation(inner.freeze(), repetitions=2))
|
|
1125
|
+
outer_subcircuit = cirq.CircuitOperation(middle.freeze(), repetitions=2)
|
|
1110
1126
|
circuit = cirq.Circuit(outer_subcircuit)
|
|
1111
1127
|
result = sim.run(circuit)
|
|
1112
1128
|
assert result.records['a'].shape == (1, 4, 1)
|
|
@@ -1116,10 +1132,10 @@ def test_simulate_no_repetition_ids_both_levels(sim):
|
|
|
1116
1132
|
def test_simulate_no_repetition_ids_outer(sim):
|
|
1117
1133
|
q = cirq.LineQubit(0)
|
|
1118
1134
|
inner = cirq.Circuit(cirq.measure(q, key='a'))
|
|
1119
|
-
middle = cirq.Circuit(
|
|
1120
|
-
|
|
1121
|
-
middle.freeze(), repetitions=2, use_repetition_ids=False
|
|
1135
|
+
middle = cirq.Circuit(
|
|
1136
|
+
cirq.CircuitOperation(inner.freeze(), repetitions=2, use_repetition_ids=True)
|
|
1122
1137
|
)
|
|
1138
|
+
outer_subcircuit = cirq.CircuitOperation(middle.freeze(), repetitions=2)
|
|
1123
1139
|
circuit = cirq.Circuit(outer_subcircuit)
|
|
1124
1140
|
result = sim.run(circuit)
|
|
1125
1141
|
assert result.records['0:a'].shape == (1, 2, 1)
|
|
@@ -1130,10 +1146,10 @@ def test_simulate_no_repetition_ids_outer(sim):
|
|
|
1130
1146
|
def test_simulate_no_repetition_ids_inner(sim):
|
|
1131
1147
|
q = cirq.LineQubit(0)
|
|
1132
1148
|
inner = cirq.Circuit(cirq.measure(q, key='a'))
|
|
1133
|
-
middle = cirq.Circuit(
|
|
1134
|
-
|
|
1149
|
+
middle = cirq.Circuit(cirq.CircuitOperation(inner.freeze(), repetitions=2))
|
|
1150
|
+
outer_subcircuit = cirq.CircuitOperation(
|
|
1151
|
+
middle.freeze(), repetitions=2, use_repetition_ids=True
|
|
1135
1152
|
)
|
|
1136
|
-
outer_subcircuit = cirq.CircuitOperation(middle.freeze(), repetitions=2)
|
|
1137
1153
|
circuit = cirq.Circuit(outer_subcircuit)
|
|
1138
1154
|
result = sim.run(circuit)
|
|
1139
1155
|
assert result.records['0:a'].shape == (1, 2, 1)
|
|
@@ -1148,7 +1164,6 @@ def test_repeat_until(sim):
|
|
|
1148
1164
|
cirq.X(q),
|
|
1149
1165
|
cirq.CircuitOperation(
|
|
1150
1166
|
cirq.FrozenCircuit(cirq.X(q), cirq.measure(q, key=key)),
|
|
1151
|
-
use_repetition_ids=False,
|
|
1152
1167
|
repeat_until=cirq.KeyCondition(key),
|
|
1153
1168
|
),
|
|
1154
1169
|
)
|
|
@@ -1163,7 +1178,6 @@ def test_repeat_until_sympy(sim):
|
|
|
1163
1178
|
q1, q2 = cirq.LineQubit.range(2)
|
|
1164
1179
|
circuitop = cirq.CircuitOperation(
|
|
1165
1180
|
cirq.FrozenCircuit(cirq.X(q2), cirq.measure(q2, key='b')),
|
|
1166
|
-
use_repetition_ids=False,
|
|
1167
1181
|
repeat_until=cirq.SympyCondition(sympy.Eq(sympy.Symbol('a'), sympy.Symbol('b'))),
|
|
1168
1182
|
)
|
|
1169
1183
|
c = cirq.Circuit(cirq.measure(q1, key='a'), circuitop)
|
|
@@ -1183,7 +1197,6 @@ def test_post_selection(sim):
|
|
|
1183
1197
|
c = cirq.Circuit(
|
|
1184
1198
|
cirq.CircuitOperation(
|
|
1185
1199
|
cirq.FrozenCircuit(cirq.X(q) ** 0.2, cirq.measure(q, key=key)),
|
|
1186
|
-
use_repetition_ids=False,
|
|
1187
1200
|
repeat_until=cirq.KeyCondition(key),
|
|
1188
1201
|
)
|
|
1189
1202
|
)
|
|
@@ -1199,14 +1212,13 @@ def test_repeat_until_diagram():
|
|
|
1199
1212
|
c = cirq.Circuit(
|
|
1200
1213
|
cirq.CircuitOperation(
|
|
1201
1214
|
cirq.FrozenCircuit(cirq.X(q) ** 0.2, cirq.measure(q, key=key)),
|
|
1202
|
-
use_repetition_ids=False,
|
|
1203
1215
|
repeat_until=cirq.KeyCondition(key),
|
|
1204
1216
|
)
|
|
1205
1217
|
)
|
|
1206
1218
|
cirq.testing.assert_has_diagram(
|
|
1207
1219
|
c,
|
|
1208
1220
|
"""
|
|
1209
|
-
0: ───[ 0: ───X^0.2───M('m')─── ](
|
|
1221
|
+
0: ───[ 0: ───X^0.2───M('m')─── ](until=m)───
|
|
1210
1222
|
""",
|
|
1211
1223
|
use_unicode_characters=True,
|
|
1212
1224
|
)
|
|
@@ -1223,7 +1235,6 @@ def test_repeat_until_error():
|
|
|
1223
1235
|
with pytest.raises(ValueError, match='Infinite loop'):
|
|
1224
1236
|
cirq.CircuitOperation(
|
|
1225
1237
|
cirq.FrozenCircuit(cirq.measure(q, key='m')),
|
|
1226
|
-
use_repetition_ids=False,
|
|
1227
1238
|
repeat_until=cirq.KeyCondition(cirq.MeasurementKey('a')),
|
|
1228
1239
|
)
|
|
1229
1240
|
|
|
@@ -1233,8 +1244,6 @@ def test_repeat_until_protocols():
|
|
|
1233
1244
|
op = cirq.CircuitOperation(
|
|
1234
1245
|
cirq.FrozenCircuit(cirq.H(q) ** sympy.Symbol('p'), cirq.measure(q, key='a')),
|
|
1235
1246
|
repeat_until=cirq.SympyCondition(sympy.Eq(sympy.Symbol('a'), 0)),
|
|
1236
|
-
# TODO: #7232 - remove immediately after the 1.5.0 release
|
|
1237
|
-
use_repetition_ids=False,
|
|
1238
1247
|
)
|
|
1239
1248
|
scoped = cirq.with_rescoped_keys(op, ('0',))
|
|
1240
1249
|
# Ensure the _repeat_until has been mapped, the measurement has been mapped to the same key,
|
|
@@ -1267,8 +1276,6 @@ def test_inner_repeat_until_simulate():
|
|
|
1267
1276
|
inner_loop = cirq.CircuitOperation(
|
|
1268
1277
|
cirq.FrozenCircuit(cirq.H(q), cirq.measure(q, key="inner_loop")),
|
|
1269
1278
|
repeat_until=cirq.SympyCondition(sympy.Eq(sympy.Symbol("inner_loop"), 0)),
|
|
1270
|
-
# TODO: #7232 - remove immediately after the 1.5.0 release
|
|
1271
|
-
use_repetition_ids=False,
|
|
1272
1279
|
)
|
|
1273
1280
|
outer_loop = cirq.Circuit(inner_loop, cirq.X(q), cirq.measure(q, key="outer_loop"))
|
|
1274
1281
|
circuit = cirq.Circuit(
|
|
@@ -358,7 +358,9 @@ def test_subcircuit_key_unset(sim):
|
|
|
358
358
|
cirq.measure(q1, key='b'),
|
|
359
359
|
)
|
|
360
360
|
circuit = cirq.Circuit(
|
|
361
|
-
cirq.CircuitOperation(
|
|
361
|
+
cirq.CircuitOperation(
|
|
362
|
+
inner.freeze(), repetitions=2, use_repetition_ids=True, measurement_key_map={'c': 'a'}
|
|
363
|
+
)
|
|
362
364
|
)
|
|
363
365
|
result = sim.run(circuit)
|
|
364
366
|
assert result.measurements['0:a'] == 0
|
|
@@ -377,7 +379,9 @@ def test_subcircuit_key_set(sim):
|
|
|
377
379
|
cirq.measure(q1, key='b'),
|
|
378
380
|
)
|
|
379
381
|
circuit = cirq.Circuit(
|
|
380
|
-
cirq.CircuitOperation(
|
|
382
|
+
cirq.CircuitOperation(
|
|
383
|
+
inner.freeze(), repetitions=4, use_repetition_ids=True, measurement_key_map={'c': 'a'}
|
|
384
|
+
)
|
|
381
385
|
)
|
|
382
386
|
result = sim.run(circuit)
|
|
383
387
|
assert result.measurements['0:a'] == 1
|
|
@@ -486,8 +490,12 @@ def test_str():
|
|
|
486
490
|
def test_scope_local():
|
|
487
491
|
q = cirq.LineQubit(0)
|
|
488
492
|
inner = cirq.Circuit(cirq.measure(q, key='a'), cirq.X(q).with_classical_controls('a'))
|
|
489
|
-
middle = cirq.Circuit(
|
|
490
|
-
|
|
493
|
+
middle = cirq.Circuit(
|
|
494
|
+
cirq.CircuitOperation(inner.freeze(), repetitions=2, use_repetition_ids=True)
|
|
495
|
+
)
|
|
496
|
+
outer_subcircuit = cirq.CircuitOperation(
|
|
497
|
+
middle.freeze(), repetitions=2, use_repetition_ids=True
|
|
498
|
+
)
|
|
491
499
|
circuit = outer_subcircuit.mapped_circuit(deep=True)
|
|
492
500
|
internal_control_keys = [
|
|
493
501
|
str(condition) for op in circuit.all_operations() for condition in cirq.control_keys(op)
|
|
@@ -495,15 +503,17 @@ def test_scope_local():
|
|
|
495
503
|
assert internal_control_keys == ['0:0:a', '0:1:a', '1:0:a', '1:1:a']
|
|
496
504
|
assert not cirq.control_keys(outer_subcircuit)
|
|
497
505
|
assert not cirq.control_keys(circuit)
|
|
506
|
+
# pylint: disable=line-too-long
|
|
498
507
|
cirq.testing.assert_has_diagram(
|
|
499
508
|
cirq.Circuit(outer_subcircuit),
|
|
500
509
|
"""
|
|
501
|
-
[ [ 0: ───M───X─── ]
|
|
502
|
-
0: ───[ 0: ───[ ║ ║ ]
|
|
503
|
-
[ [ a: ═══@═══^═══ ](loops=2) ](loops=2)
|
|
510
|
+
[ [ 0: ───M───X─── ] ]
|
|
511
|
+
0: ───[ 0: ───[ ║ ║ ]───────────────────────────────────── ]─────────────────────────────────────
|
|
512
|
+
[ [ a: ═══@═══^═══ ](loops=2, use_repetition_ids=True) ](loops=2, use_repetition_ids=True)
|
|
504
513
|
""",
|
|
505
514
|
use_unicode_characters=True,
|
|
506
515
|
)
|
|
516
|
+
# pylint: enable=line-too-long
|
|
507
517
|
cirq.testing.assert_has_diagram(
|
|
508
518
|
circuit,
|
|
509
519
|
"""
|
|
@@ -541,9 +551,9 @@ def test_scope_flatten_both():
|
|
|
541
551
|
cirq.testing.assert_has_diagram(
|
|
542
552
|
cirq.Circuit(outer_subcircuit),
|
|
543
553
|
"""
|
|
544
|
-
[ [ 0: ───M───X─── ]
|
|
545
|
-
0: ───[ 0: ───[ ║ ║ ]
|
|
546
|
-
[ [ a: ═══@═══^═══ ](loops=2
|
|
554
|
+
[ [ 0: ───M───X─── ] ]
|
|
555
|
+
0: ───[ 0: ───[ ║ ║ ]──────────── ]────────────
|
|
556
|
+
[ [ a: ═══@═══^═══ ](loops=2) ](loops=2)
|
|
547
557
|
""",
|
|
548
558
|
use_unicode_characters=True,
|
|
549
559
|
)
|
|
@@ -561,10 +571,10 @@ a: ═══@═══^═══@═══^═══@═══^═══@══
|
|
|
561
571
|
def test_scope_flatten_inner():
|
|
562
572
|
q = cirq.LineQubit(0)
|
|
563
573
|
inner = cirq.Circuit(cirq.measure(q, key='a'), cirq.X(q).with_classical_controls('a'))
|
|
564
|
-
middle = cirq.Circuit(
|
|
565
|
-
|
|
574
|
+
middle = cirq.Circuit(cirq.CircuitOperation(inner.freeze(), repetitions=2))
|
|
575
|
+
outer_subcircuit = cirq.CircuitOperation(
|
|
576
|
+
middle.freeze(), repetitions=2, use_repetition_ids=True
|
|
566
577
|
)
|
|
567
|
-
outer_subcircuit = cirq.CircuitOperation(middle.freeze(), repetitions=2)
|
|
568
578
|
circuit = outer_subcircuit.mapped_circuit(deep=True)
|
|
569
579
|
internal_control_keys = [
|
|
570
580
|
str(condition) for op in circuit.all_operations() for condition in cirq.control_keys(op)
|
|
@@ -575,9 +585,9 @@ def test_scope_flatten_inner():
|
|
|
575
585
|
cirq.testing.assert_has_diagram(
|
|
576
586
|
cirq.Circuit(outer_subcircuit),
|
|
577
587
|
"""
|
|
578
|
-
[ [ 0: ───M───X─── ]
|
|
579
|
-
0: ───[ 0: ───[ ║ ║ ]
|
|
580
|
-
[ [ a: ═══@═══^═══ ](loops=2
|
|
588
|
+
[ [ 0: ───M───X─── ] ]
|
|
589
|
+
0: ───[ 0: ───[ ║ ║ ]──────────── ]─────────────────────────────────────
|
|
590
|
+
[ [ a: ═══@═══^═══ ](loops=2) ](loops=2, use_repetition_ids=True)
|
|
581
591
|
""",
|
|
582
592
|
use_unicode_characters=True,
|
|
583
593
|
)
|
|
@@ -597,10 +607,10 @@ def test_scope_flatten_inner():
|
|
|
597
607
|
def test_scope_flatten_outer():
|
|
598
608
|
q = cirq.LineQubit(0)
|
|
599
609
|
inner = cirq.Circuit(cirq.measure(q, key='a'), cirq.X(q).with_classical_controls('a'))
|
|
600
|
-
middle = cirq.Circuit(
|
|
601
|
-
|
|
602
|
-
middle.freeze(), repetitions=2, use_repetition_ids=False
|
|
610
|
+
middle = cirq.Circuit(
|
|
611
|
+
cirq.CircuitOperation(inner.freeze(), repetitions=2, use_repetition_ids=True)
|
|
603
612
|
)
|
|
613
|
+
outer_subcircuit = cirq.CircuitOperation(middle.freeze(), repetitions=2)
|
|
604
614
|
circuit = outer_subcircuit.mapped_circuit(deep=True)
|
|
605
615
|
internal_control_keys = [
|
|
606
616
|
str(condition) for op in circuit.all_operations() for condition in cirq.control_keys(op)
|
|
@@ -611,9 +621,9 @@ def test_scope_flatten_outer():
|
|
|
611
621
|
cirq.testing.assert_has_diagram(
|
|
612
622
|
cirq.Circuit(outer_subcircuit),
|
|
613
623
|
"""
|
|
614
|
-
[ [ 0: ───M───X─── ]
|
|
615
|
-
0: ───[ 0: ───[ ║ ║ ]
|
|
616
|
-
[ [ a: ═══@═══^═══ ](loops=2) ](loops=2
|
|
624
|
+
[ [ 0: ───M───X─── ] ]
|
|
625
|
+
0: ───[ 0: ───[ ║ ║ ]───────────────────────────────────── ]────────────
|
|
626
|
+
[ [ a: ═══@═══^═══ ](loops=2, use_repetition_ids=True) ](loops=2)
|
|
617
627
|
""",
|
|
618
628
|
use_unicode_characters=True,
|
|
619
629
|
)
|
|
@@ -635,9 +645,11 @@ def test_scope_extern():
|
|
|
635
645
|
inner = cirq.Circuit(cirq.measure(q, key='a'), cirq.X(q).with_classical_controls('b'))
|
|
636
646
|
middle = cirq.Circuit(
|
|
637
647
|
cirq.measure(q, key=cirq.MeasurementKey('b')),
|
|
638
|
-
cirq.CircuitOperation(inner.freeze(), repetitions=2),
|
|
648
|
+
cirq.CircuitOperation(inner.freeze(), repetitions=2, use_repetition_ids=True),
|
|
649
|
+
)
|
|
650
|
+
outer_subcircuit = cirq.CircuitOperation(
|
|
651
|
+
middle.freeze(), repetitions=2, use_repetition_ids=True
|
|
639
652
|
)
|
|
640
|
-
outer_subcircuit = cirq.CircuitOperation(middle.freeze(), repetitions=2)
|
|
641
653
|
circuit = outer_subcircuit.mapped_circuit(deep=True)
|
|
642
654
|
internal_control_keys = [
|
|
643
655
|
str(condition) for op in circuit.all_operations() for condition in cirq.control_keys(op)
|
|
@@ -645,17 +657,19 @@ def test_scope_extern():
|
|
|
645
657
|
assert internal_control_keys == ['0:b', '0:b', '1:b', '1:b']
|
|
646
658
|
assert not cirq.control_keys(outer_subcircuit)
|
|
647
659
|
assert not cirq.control_keys(circuit)
|
|
660
|
+
# pylint: disable=line-too-long
|
|
648
661
|
cirq.testing.assert_has_diagram(
|
|
649
662
|
cirq.Circuit(outer_subcircuit),
|
|
650
663
|
"""
|
|
651
|
-
[ [ 0: ───M('a')───X─── ]
|
|
652
|
-
[ 0: ───M───[ ║ ]
|
|
653
|
-
0: ───[ ║ [ b: ════════════^═══ ](loops=2) ]
|
|
654
|
-
[ ║ ║
|
|
655
|
-
[ b:
|
|
664
|
+
[ [ 0: ───M('a')───X─── ] ]
|
|
665
|
+
[ 0: ───M───[ ║ ]───────────────────────────────────── ]
|
|
666
|
+
0: ───[ ║ [ b: ════════════^═══ ](loops=2, use_repetition_ids=True) ]─────────────────────────────────────
|
|
667
|
+
[ ║ ║ ]
|
|
668
|
+
[ b: ═══@═══╩═══════════════════════════════════════════════════════════ ](loops=2, use_repetition_ids=True)
|
|
656
669
|
""",
|
|
657
670
|
use_unicode_characters=True,
|
|
658
671
|
)
|
|
672
|
+
# pylint: enable=line-too-long
|
|
659
673
|
cirq.testing.assert_has_diagram(
|
|
660
674
|
circuit,
|
|
661
675
|
"""
|
|
@@ -683,9 +697,9 @@ def test_scope_extern_wrapping_with_non_repeating_subcircuits():
|
|
|
683
697
|
)
|
|
684
698
|
middle = wrap_frozen(
|
|
685
699
|
wrap(cirq.measure(q, key=cirq.MeasurementKey('b'))),
|
|
686
|
-
wrap(cirq.CircuitOperation(inner, repetitions=2)),
|
|
700
|
+
wrap(cirq.CircuitOperation(inner, repetitions=2, use_repetition_ids=True)),
|
|
687
701
|
)
|
|
688
|
-
outer_subcircuit = cirq.CircuitOperation(middle, repetitions=2)
|
|
702
|
+
outer_subcircuit = cirq.CircuitOperation(middle, repetitions=2, use_repetition_ids=True)
|
|
689
703
|
circuit = outer_subcircuit.mapped_circuit(deep=True)
|
|
690
704
|
internal_control_keys = [
|
|
691
705
|
str(condition) for op in circuit.all_operations() for condition in cirq.control_keys(op)
|
|
@@ -738,9 +752,9 @@ b: ═══╩═════════════════════
|
|
|
738
752
|
cirq.testing.assert_has_diagram(
|
|
739
753
|
circuit,
|
|
740
754
|
"""
|
|
741
|
-
0: ───M('
|
|
742
|
-
|
|
743
|
-
b:
|
|
755
|
+
0: ───M('c')───M('a')───X───M('a')───X───M('c')───M('a')───X───M('a')───X───
|
|
756
|
+
║ ║ ║ ║
|
|
757
|
+
b: ═════════════════════^════════════^═════════════════════^════════════^═══
|
|
744
758
|
""",
|
|
745
759
|
use_unicode_characters=True,
|
|
746
760
|
)
|
|
@@ -752,9 +766,11 @@ def test_scope_extern_mismatch():
|
|
|
752
766
|
inner = cirq.Circuit(cirq.measure(q, key='a'), cirq.X(q).with_classical_controls('b'))
|
|
753
767
|
middle = cirq.Circuit(
|
|
754
768
|
cirq.measure(q, key=cirq.MeasurementKey('b', ('0',))),
|
|
755
|
-
cirq.CircuitOperation(inner.freeze(), repetitions=2),
|
|
769
|
+
cirq.CircuitOperation(inner.freeze(), repetitions=2, use_repetition_ids=True),
|
|
770
|
+
)
|
|
771
|
+
outer_subcircuit = cirq.CircuitOperation(
|
|
772
|
+
middle.freeze(), repetitions=2, use_repetition_ids=True
|
|
756
773
|
)
|
|
757
|
-
outer_subcircuit = cirq.CircuitOperation(middle.freeze(), repetitions=2)
|
|
758
774
|
circuit = outer_subcircuit.mapped_circuit(deep=True)
|
|
759
775
|
internal_control_keys = [
|
|
760
776
|
str(condition) for op in circuit.all_operations() for condition in cirq.control_keys(op)
|
|
@@ -762,19 +778,21 @@ def test_scope_extern_mismatch():
|
|
|
762
778
|
assert internal_control_keys == ['b', 'b', 'b', 'b']
|
|
763
779
|
assert cirq.control_keys(outer_subcircuit) == {cirq.MeasurementKey('b')}
|
|
764
780
|
assert cirq.control_keys(circuit) == {cirq.MeasurementKey('b')}
|
|
781
|
+
# pylint: disable=line-too-long
|
|
765
782
|
cirq.testing.assert_has_diagram(
|
|
766
783
|
cirq.Circuit(outer_subcircuit),
|
|
767
784
|
"""
|
|
768
|
-
[ [ 0: ───M('a')───X─── ]
|
|
769
|
-
[ 0: ───M('0:b')───[ ║ ]
|
|
770
|
-
0: ───[ [ b: ════════════^═══ ](loops=2) ]
|
|
771
|
-
[ ║
|
|
772
|
-
[ b:
|
|
785
|
+
[ [ 0: ───M('a')───X─── ] ]
|
|
786
|
+
[ 0: ───M('0:b')───[ ║ ]───────────────────────────────────── ]
|
|
787
|
+
0: ───[ [ b: ════════════^═══ ](loops=2, use_repetition_ids=True) ]─────────────────────────────────────
|
|
788
|
+
[ ║ ]
|
|
789
|
+
[ b: ══════════════╩═══════════════════════════════════════════════════════════ ](loops=2, use_repetition_ids=True)
|
|
773
790
|
║
|
|
774
|
-
b:
|
|
791
|
+
b: ═══╩═════════════════════════════════════════════════════════════════════════════════════════════════════════════════════
|
|
775
792
|
""",
|
|
776
793
|
use_unicode_characters=True,
|
|
777
794
|
)
|
|
795
|
+
# pylint: enable=line-too-long
|
|
778
796
|
cirq.testing.assert_has_diagram(
|
|
779
797
|
circuit,
|
|
780
798
|
"""
|
|
@@ -934,7 +952,7 @@ def test_sympy_scope():
|
|
|
934
952
|
outer_subcircuit = cirq.CircuitOperation(middle.freeze(), repetitions=2)
|
|
935
953
|
circuit = outer_subcircuit.mapped_circuit(deep=True)
|
|
936
954
|
internal_controls = [str(k) for op in circuit.all_operations() for k in cirq.control_keys(op)]
|
|
937
|
-
assert set(internal_controls) == {'
|
|
955
|
+
assert set(internal_controls) == {'a', 'b', 'c', 'd'}
|
|
938
956
|
assert cirq.control_keys(outer_subcircuit) == {'c', 'd'}
|
|
939
957
|
assert cirq.control_keys(circuit) == {'c', 'd'}
|
|
940
958
|
assert circuit == cirq.Circuit(cirq.decompose(outer_subcircuit))
|
|
@@ -968,23 +986,15 @@ d: ═══╩═════════════════════
|
|
|
968
986
|
cirq.testing.assert_has_diagram(
|
|
969
987
|
circuit,
|
|
970
988
|
"""
|
|
971
|
-
0:
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
║ ║ ║ ║ ║ ║
|
|
981
|
-
1:1:a: ════════════════════════╬════════════════════════════════════════╬════════════════════════════════════╬════════════════════╬════════════════════════════════════@═══^════════════════════════════════════
|
|
982
|
-
║ ║ ║ ║ ║
|
|
983
|
-
1:b: ══════════════════════════╬════════════════════════════════════════╬════════════════════════════════════@════════════════════^════════════════════════════════════════^════════════════════════════════════
|
|
984
|
-
║ ║ ║ ║
|
|
985
|
-
c: ════════════════════════════^════════════════════════════════════════^═════════════════════════════════════════════════════════^════════════════════════════════════════^════════════════════════════════════
|
|
986
|
-
║ ║ ║ ║
|
|
987
|
-
d: ════════════════════════════^════════════════════════════════════════^═════════════════════════════════════════════════════════^════════════════════════════════════════^════════════════════════════════════
|
|
989
|
+
0: ───M───M('0:c')───M───X(conditions=[c | d, a & b])───M───X(conditions=[c | d, a & b])───M───M('0:c')───M───X(conditions=[c | d, a & b])───M───X(conditions=[c | d, a & b])───
|
|
990
|
+
║ ║ ║ ║ ║ ║ ║ ║ ║ ║
|
|
991
|
+
a: ═══╬══════════════@═══^══════════════════════════════@═══^══════════════════════════════╬══════════════@═══^══════════════════════════════@═══^══════════════════════════════
|
|
992
|
+
║ ║ ║ ║ ║ ║
|
|
993
|
+
b: ═══@══════════════════^══════════════════════════════════^══════════════════════════════@══════════════════^══════════════════════════════════^══════════════════════════════
|
|
994
|
+
║ ║ ║ ║
|
|
995
|
+
c: ══════════════════════^══════════════════════════════════^═════════════════════════════════════════════════^══════════════════════════════════^══════════════════════════════
|
|
996
|
+
║ ║ ║ ║
|
|
997
|
+
d: ══════════════════════^══════════════════════════════════^═════════════════════════════════════════════════^══════════════════════════════════^══════════════════════════════
|
|
988
998
|
""",
|
|
989
999
|
use_unicode_characters=True,
|
|
990
1000
|
)
|
|
@@ -133,7 +133,8 @@
|
|
|
133
133
|
"parent_path": [],
|
|
134
134
|
"repetition_ids": [
|
|
135
135
|
"0"
|
|
136
|
-
]
|
|
136
|
+
],
|
|
137
|
+
"use_repetition_ids": true
|
|
137
138
|
},
|
|
138
139
|
{
|
|
139
140
|
"cirq_type": "CircuitOperation",
|
|
@@ -187,7 +188,8 @@
|
|
|
187
188
|
"repetition_ids": [
|
|
188
189
|
"a",
|
|
189
190
|
"b"
|
|
190
|
-
]
|
|
191
|
+
],
|
|
192
|
+
"use_repetition_ids": true
|
|
191
193
|
},
|
|
192
194
|
{
|
|
193
195
|
"cirq_type": "CircuitOperation",
|
|
@@ -217,7 +219,8 @@
|
|
|
217
219
|
"repetition_ids": [
|
|
218
220
|
"a",
|
|
219
221
|
"b"
|
|
220
|
-
]
|
|
222
|
+
],
|
|
223
|
+
"use_repetition_ids": true
|
|
221
224
|
},
|
|
222
225
|
{
|
|
223
226
|
"cirq_type": "CircuitOperation",
|
|
@@ -25,10 +25,12 @@ cirq.CircuitOperation(circuit=cirq.FrozenCircuit([
|
|
|
25
25
|
(cirq.X**sympy.Symbol('theta')).on(cirq.LineQubit(0)),
|
|
26
26
|
),
|
|
27
27
|
]),
|
|
28
|
-
param_resolver={sympy.Symbol('theta'): 1.5}
|
|
28
|
+
param_resolver={sympy.Symbol('theta'): 1.5},
|
|
29
|
+
use_repetition_ids=True),
|
|
29
30
|
cirq.CircuitOperation(circuit=cirq.FrozenCircuit([
|
|
30
31
|
cirq.Moment(
|
|
31
32
|
(cirq.X**sympy.Symbol('theta')).on(cirq.LineQubit(0)),
|
|
32
33
|
),
|
|
33
34
|
]),
|
|
34
|
-
param_resolver={sympy.Symbol('theta'): 1.5}
|
|
35
|
+
param_resolver={sympy.Symbol('theta'): 1.5},
|
|
36
|
+
use_repetition_ids=True)]
|
{cirq_core-1.6.0.dev20250410201400.dist-info → cirq_core-1.6.0.dev20250411012134.dist-info}/METADATA
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: cirq-core
|
|
3
|
-
Version: 1.6.0.
|
|
3
|
+
Version: 1.6.0.dev20250411012134
|
|
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.6.0.dev20250410201400.dist-info → cirq_core-1.6.0.dev20250411012134.dist-info}/RECORD
RENAMED
|
@@ -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=
|
|
8
|
-
cirq/_version_test.py,sha256=
|
|
7
|
+
cirq/_version.py,sha256=zX7XCu4kNlPkS6JEKkvepOEFSSzh1XabjTWDhyFWPpo,1206
|
|
8
|
+
cirq/_version_test.py,sha256=UR0yr8YBlS2K-c9Ru_qRLxtJFNoXx1kmHuL8egCWe4c,147
|
|
9
9
|
cirq/conftest.py,sha256=X7yLFL8GLhg2CjPw0hp5e_dGASfvHx1-QT03aUbhKJw,1168
|
|
10
10
|
cirq/json_resolver_cache.py,sha256=YVamU72nCUT5dG0bhAvRKVX5lXcZMNTwP3H36v-cYag,13615
|
|
11
11
|
cirq/py.typed,sha256=VFSlmh_lNwnaXzwY-ZuW-C2Ws5PkuDoVgBdNCs0jXJE,63
|
|
@@ -17,8 +17,8 @@ cirq/circuits/_box_drawing_character_data_test.py,sha256=b3BN-iVUkQENi2Ja-RYQ_-_
|
|
|
17
17
|
cirq/circuits/_bucket_priority_queue.py,sha256=ml98_VAwGXzASUS0hE7lT7PeA0Hugz-qAZtjtAdBsvw,6744
|
|
18
18
|
cirq/circuits/_bucket_priority_queue_test.py,sha256=1FnB39rJKODvXP3SpSD6B8Tu02yQWCWOUQSPmR-22Pw,5288
|
|
19
19
|
cirq/circuits/circuit.py,sha256=reDLqLMj3SZM-z-7vLZhvy4XRTnmkK0HigbknFtMDLA,119141
|
|
20
|
-
cirq/circuits/circuit_operation.py,sha256=
|
|
21
|
-
cirq/circuits/circuit_operation_test.py,sha256=
|
|
20
|
+
cirq/circuits/circuit_operation.py,sha256=8zeK57Xjkavt_ur9ESqocMURTcqD-f2T3hAe95gVB-g,36395
|
|
21
|
+
cirq/circuits/circuit_operation_test.py,sha256=CcIX8n_aASmKR2iqWKyoCbyarEVN9WAl5VSHdBVznKg,48862
|
|
22
22
|
cirq/circuits/circuit_test.py,sha256=KjRYRwUgC65vxf_3hdZLgid7sNm5Fn_lcIp15Q4yWyk,162757
|
|
23
23
|
cirq/circuits/frozen_circuit.py,sha256=TLjw_UmbnV-Lhtn63RqTnCBbQiZPvsJdS-s99-aMRGI,9232
|
|
24
24
|
cirq/circuits/frozen_circuit_test.py,sha256=rHyii8hLhOQ6jdA8dC1OcYPGnyeBC4uY5Q53XspkkCk,4133
|
|
@@ -273,7 +273,7 @@ cirq/ops/arithmetic_operation_test.py,sha256=iKjnwOvd1wCWk-byeUC14aGwYuHXOlkrtlO
|
|
|
273
273
|
cirq/ops/boolean_hamiltonian.py,sha256=li003lNq6zS8pNPTobqzfzYJvyvaIpCVo3wkliI6Hzk,14930
|
|
274
274
|
cirq/ops/boolean_hamiltonian_test.py,sha256=1ey5yfYZPKZDsfM3jpCPAOpbPs_y8i4K_WvDK2d5_4Y,8518
|
|
275
275
|
cirq/ops/classically_controlled_operation.py,sha256=ePhBPrHymodrsztJFk_g2IGI3QSbFnpQ54d-6AH9CN4,10374
|
|
276
|
-
cirq/ops/classically_controlled_operation_test.py,sha256=
|
|
276
|
+
cirq/ops/classically_controlled_operation_test.py,sha256=nIYyXfNH4E2IibZSLk6QDVHpfJQbuI_iWwirCH8rhi8,50209
|
|
277
277
|
cirq/ops/clifford_gate.py,sha256=hBuNKKE5kmB3W4oQxwdG1SF_NFblkcSIAUeacECRAVY,39495
|
|
278
278
|
cirq/ops/clifford_gate_test.py,sha256=dqghYb7_afYxCLceBarX56Tn9y_dSWCKF75W-Qrzvcw,40341
|
|
279
279
|
cirq/ops/common_channels.py,sha256=lGDOSdstoK57DingL-lo2n49-a51MshhJOl4LOcpQfg,37126
|
|
@@ -491,10 +491,10 @@ cirq/protocols/json_test_data/Circuit.json,sha256=pQNIcjuIYBfXnGkqQnn4xuSLoHysFE
|
|
|
491
491
|
cirq/protocols/json_test_data/Circuit.json_inward,sha256=z62hEHwGtkVXrZNfxHX71_lDQ43wk12qtPO0Q0i5qwc,4574
|
|
492
492
|
cirq/protocols/json_test_data/Circuit.repr,sha256=i5fwYWIi64pmupNvqEEjUn_mHKp_vVGH2ozw65_EOuw,689
|
|
493
493
|
cirq/protocols/json_test_data/Circuit.repr_inward,sha256=i5fwYWIi64pmupNvqEEjUn_mHKp_vVGH2ozw65_EOuw,689
|
|
494
|
-
cirq/protocols/json_test_data/CircuitOperation.json,sha256=
|
|
494
|
+
cirq/protocols/json_test_data/CircuitOperation.json,sha256=7khipsZjJJnQQU53DgMlhG-FYzdLUCmAJcmTubby3jA,7045
|
|
495
495
|
cirq/protocols/json_test_data/CircuitOperation.json_inward,sha256=EP3fiuDhxStcshrJC_Uot1hzYxEmlKk4dW66DMK9ALg,7951
|
|
496
496
|
cirq/protocols/json_test_data/CircuitOperation.repr,sha256=zjkjsVG9m3jedRYhKVJG_gqhwYycaqRRCcOuk1EKWvE,1711
|
|
497
|
-
cirq/protocols/json_test_data/CircuitOperation.repr_inward,sha256=
|
|
497
|
+
cirq/protocols/json_test_data/CircuitOperation.repr_inward,sha256=1Ml4liM9PWg_hJ2Dr-y93XTDNklNty1RvEUwewmTdEg,1133
|
|
498
498
|
cirq/protocols/json_test_data/ClassicalDataDictionaryStore.json,sha256=G09lSA5vshMhiXz_jgFw0STHjc08pJ0UczVCz8SGYLE,1185
|
|
499
499
|
cirq/protocols/json_test_data/ClassicalDataDictionaryStore.repr,sha256=bOLOBw-nLRvdkd7oYcLzkh5r-cBZAxwo7H6xdDgtOHw,404
|
|
500
500
|
cirq/protocols/json_test_data/ClassicallyControlledOperation.json,sha256=7t_Yyjhk8Ig-XyfOboE92K149csQbwvLoEwIsuDVHDw,669
|
|
@@ -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.
|
|
1213
|
-
cirq_core-1.6.0.
|
|
1214
|
-
cirq_core-1.6.0.
|
|
1215
|
-
cirq_core-1.6.0.
|
|
1216
|
-
cirq_core-1.6.0.
|
|
1212
|
+
cirq_core-1.6.0.dev20250411012134.dist-info/licenses/LICENSE,sha256=tAkwu8-AdEyGxGoSvJ2gVmQdcicWw3j1ZZueVV74M-E,11357
|
|
1213
|
+
cirq_core-1.6.0.dev20250411012134.dist-info/METADATA,sha256=94Om24_IhWCE4tsmZWO4EOFbPA6guJ8VNKei8Sqww3U,4908
|
|
1214
|
+
cirq_core-1.6.0.dev20250411012134.dist-info/WHEEL,sha256=CmyFI0kx5cdEMTLiONQRbGQwjIoR1aIYB7eCAQ4KPJ0,91
|
|
1215
|
+
cirq_core-1.6.0.dev20250411012134.dist-info/top_level.txt,sha256=Sz9iOxHU0IEMLSFGwiwOCaN2e9K-jFbBbtpPN1hB73g,5
|
|
1216
|
+
cirq_core-1.6.0.dev20250411012134.dist-info/RECORD,,
|
{cirq_core-1.6.0.dev20250410201400.dist-info → cirq_core-1.6.0.dev20250411012134.dist-info}/WHEEL
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|