cirq-core 1.6.0.dev20250505215959__py3-none-any.whl → 1.6.0.dev20250507172716__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.

Files changed (33) hide show
  1. cirq/_compat_test.py +4 -1
  2. cirq/_version.py +1 -1
  3. cirq/_version_test.py +1 -1
  4. cirq/circuits/insert_strategy.py +7 -5
  5. cirq/contrib/acquaintance/gates_test.py +3 -1
  6. cirq/contrib/graph_device/hypergraph.py +3 -1
  7. cirq/contrib/paulistring/pauli_string_measurement_with_readout_mitigation.py +9 -3
  8. cirq/contrib/paulistring/pauli_string_measurement_with_readout_mitigation_test.py +2 -0
  9. cirq/contrib/paulistring/pauli_string_optimize.py +2 -0
  10. cirq/contrib/qasm_import/qasm.py +2 -0
  11. cirq/contrib/quimb/density_matrix.py +4 -1
  12. cirq/contrib/quimb/state_vector.py +4 -1
  13. cirq/contrib/quirk/quirk_gate.py +3 -1
  14. cirq/contrib/routing/router.py +2 -0
  15. cirq/contrib/shuffle_circuits/shuffle_circuits_with_readout_benchmarking.py +4 -0
  16. cirq/experiments/fidelity_estimation.py +11 -5
  17. cirq/linalg/combinators.py +4 -2
  18. cirq/linalg/predicates.py +6 -1
  19. cirq/linalg/tolerance.py +4 -1
  20. cirq/neutral_atoms/convert_to_neutral_atom_gates.py +9 -3
  21. cirq/ops/clifford_gate_test.py +3 -1
  22. cirq/ops/projector.py +13 -8
  23. cirq/transformers/gauge_compiling/cphase_gauge.py +2 -0
  24. cirq/vis/heatmap.py +1 -1
  25. cirq/work/sampler.py +33 -34
  26. cirq/work/sampler_test.py +6 -2
  27. cirq/work/zeros_sampler.py +3 -1
  28. cirq/work/zeros_sampler_test.py +3 -1
  29. {cirq_core-1.6.0.dev20250505215959.dist-info → cirq_core-1.6.0.dev20250507172716.dist-info}/METADATA +1 -1
  30. {cirq_core-1.6.0.dev20250505215959.dist-info → cirq_core-1.6.0.dev20250507172716.dist-info}/RECORD +33 -33
  31. {cirq_core-1.6.0.dev20250505215959.dist-info → cirq_core-1.6.0.dev20250507172716.dist-info}/WHEEL +0 -0
  32. {cirq_core-1.6.0.dev20250505215959.dist-info → cirq_core-1.6.0.dev20250507172716.dist-info}/licenses/LICENSE +0 -0
  33. {cirq_core-1.6.0.dev20250505215959.dist-info → cirq_core-1.6.0.dev20250507172716.dist-info}/top_level.txt +0 -0
cirq/_compat_test.py CHANGED
@@ -11,6 +11,9 @@
11
11
  # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
12
  # See the License for the specific language governing permissions and
13
13
  # limitations under the License.
14
+
15
+ from __future__ import annotations
16
+
14
17
  import collections
15
18
  import dataclasses
16
19
  import importlib.metadata
@@ -635,7 +638,7 @@ _repeated_child_deprecation_msg = [
635
638
  ] + _deprecation_origin
636
639
 
637
640
 
638
- def _trace_unhandled_exceptions(*args, queue: 'multiprocessing.Queue', func: Callable):
641
+ def _trace_unhandled_exceptions(*args, queue: multiprocessing.Queue, func: Callable):
639
642
  try:
640
643
  func(*args)
641
644
  queue.put(None)
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.dev20250505215959"
31
+ __version__ = "1.6.0.dev20250507172716"
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.dev20250505215959"
6
+ assert cirq.__version__ == "1.6.0.dev20250507172716"
@@ -14,16 +14,18 @@
14
14
 
15
15
  """Hard-coded options for adding multiple operations to a circuit."""
16
16
 
17
+ from __future__ import annotations
18
+
17
19
 
18
20
  class InsertStrategy:
19
21
  """Indicates preferences on how to add multiple operations to a circuit."""
20
22
 
21
- NEW: 'InsertStrategy'
22
- NEW_THEN_INLINE: 'InsertStrategy'
23
- INLINE: 'InsertStrategy'
24
- EARLIEST: 'InsertStrategy'
23
+ NEW: InsertStrategy
24
+ NEW_THEN_INLINE: InsertStrategy
25
+ INLINE: InsertStrategy
26
+ EARLIEST: InsertStrategy
25
27
 
26
- def __new__(cls, name: str, doc: str) -> 'InsertStrategy':
28
+ def __new__(cls, name: str, doc: str) -> InsertStrategy:
27
29
  inst = getattr(cls, name, None)
28
30
  if not inst or not isinstance(inst, cls):
29
31
  inst = super().__new__(cls)
@@ -12,6 +12,8 @@
12
12
  # See the License for the specific language governing permissions and
13
13
  # limitations under the License.
14
14
 
15
+ from __future__ import annotations
16
+
15
17
  from itertools import combinations, product
16
18
  from random import randint
17
19
  from string import ascii_lowercase as alphabet
@@ -257,7 +259,7 @@ class OtherOperation(cirq.Operation):
257
259
  def qubits(self) -> Tuple[cirq.Qid, ...]:
258
260
  return self._qubits
259
261
 
260
- def with_qubits(self, *new_qubits: cirq.Qid) -> 'OtherOperation':
262
+ def with_qubits(self, *new_qubits: cirq.Qid) -> OtherOperation:
261
263
  return type(self)(self._qubits)
262
264
 
263
265
  def __eq__(self, other):
@@ -12,6 +12,8 @@
12
12
  # See the License for the specific language governing permissions and
13
13
  # limitations under the License.
14
14
 
15
+ from __future__ import annotations
16
+
15
17
  import itertools
16
18
  import random
17
19
  from typing import Any, Dict, FrozenSet, Hashable, Iterable, Mapping, Optional, Set, Tuple, Union
@@ -103,7 +105,7 @@ class UndirectedHypergraph:
103
105
  @classmethod
104
106
  def random(
105
107
  cls, vertices: Union[int, Iterable], edge_probs: Mapping[int, float]
106
- ) -> 'UndirectedHypergraph':
108
+ ) -> UndirectedHypergraph:
107
109
  """A random hypergraph.
108
110
 
109
111
  Every possible edge is included with probability edge_prob[len(edge)].
@@ -11,19 +11,25 @@
11
11
  # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
12
  # See the License for the specific language governing permissions and
13
13
  # limitations under the License.
14
+
14
15
  """Tools for measuring expectation values of Pauli strings with readout error mitigation."""
16
+
17
+ from __future__ import annotations
18
+
15
19
  import itertools
16
20
  import time
17
- from typing import cast, Dict, FrozenSet, List, Optional, Sequence, Tuple, Union
21
+ from typing import cast, Dict, FrozenSet, List, Optional, Sequence, Tuple, TYPE_CHECKING, Union
18
22
 
19
23
  import attrs
20
24
  import numpy as np
21
25
 
22
26
  from cirq import circuits, ops, work
23
27
  from cirq.contrib.shuffle_circuits import run_shuffled_with_readout_benchmarking
24
- from cirq.experiments import SingleQubitReadoutCalibrationResult
25
28
  from cirq.experiments.readout_confusion_matrix import TensoredConfusionMatrices
26
- from cirq.study import ResultDict
29
+
30
+ if TYPE_CHECKING:
31
+ from cirq.experiments import SingleQubitReadoutCalibrationResult
32
+ from cirq.study import ResultDict
27
33
 
28
34
 
29
35
  @attrs.frozen
@@ -12,6 +12,8 @@
12
12
  # See the License for the specific language governing permissions and
13
13
  # limitations under the License.
14
14
 
15
+ from __future__ import annotations
16
+
15
17
  import itertools
16
18
  import random
17
19
  from typing import Dict, Sequence
@@ -12,6 +12,8 @@
12
12
  # See the License for the specific language governing permissions and
13
13
  # limitations under the License.
14
14
 
15
+ from __future__ import annotations
16
+
15
17
  import networkx
16
18
 
17
19
  from cirq import circuits, linalg
@@ -12,6 +12,8 @@
12
12
  # See the License for the specific language governing permissions and
13
13
  # limitations under the License.
14
14
 
15
+ from __future__ import annotations
16
+
15
17
  from cirq import circuits
16
18
  from cirq.contrib.qasm_import._parser import QasmParser
17
19
 
@@ -1,4 +1,7 @@
1
1
  # pylint: disable=wrong-or-nonexistent-copyright-notice
2
+
3
+ from __future__ import annotations
4
+
2
5
  from functools import lru_cache
3
6
  from typing import Dict, List, Optional, Sequence, Tuple, Union
4
7
 
@@ -77,7 +80,7 @@ def _add_to_positions(
77
80
 
78
81
  def circuit_to_density_matrix_tensors(
79
82
  circuit: cirq.Circuit, qubits: Optional[Sequence[cirq.Qid]] = None
80
- ) -> Tuple[List[qtn.Tensor], Dict['cirq.Qid', int], Dict[Tuple[str, str], Tuple[float, float]]]:
83
+ ) -> Tuple[List[qtn.Tensor], Dict[cirq.Qid, int], Dict[Tuple[str, str], Tuple[float, float]]]:
81
84
  """Given a circuit with mixtures or channels, construct a tensor network
82
85
  representation of the density matrix.
83
86
 
@@ -1,4 +1,7 @@
1
1
  # pylint: disable=wrong-or-nonexistent-copyright-notice
2
+
3
+ from __future__ import annotations
4
+
2
5
  import warnings
3
6
  from typing import cast, Dict, List, Optional, Sequence, Tuple, Union
4
7
 
@@ -28,7 +31,7 @@ def circuit_to_tensors(
28
31
  circuit: cirq.Circuit,
29
32
  qubits: Optional[Sequence[cirq.Qid]] = None,
30
33
  initial_state: Union[int, None] = 0,
31
- ) -> Tuple[List[qtn.Tensor], Dict['cirq.Qid', int], None]:
34
+ ) -> Tuple[List[qtn.Tensor], Dict[cirq.Qid, int], None]:
32
35
  """Given a circuit, construct a tensor network representation.
33
36
 
34
37
  Indices are named "i{i}_q{x}" where i is a time index and x is a
@@ -12,6 +12,8 @@
12
12
  # See the License for the specific language governing permissions and
13
13
  # limitations under the License.
14
14
 
15
+ from __future__ import annotations
16
+
15
17
  from typing import Any, Callable, cast, Dict, Optional, Union
16
18
 
17
19
  import numpy as np
@@ -46,7 +48,7 @@ class QuirkOp:
46
48
  self.keys = keys
47
49
  self.can_merge = can_merge
48
50
 
49
- def controlled(self, control_count: int = 1) -> 'QuirkOp':
51
+ def controlled(self, control_count: int = 1) -> QuirkOp:
50
52
  return QuirkOp(*['•'] * control_count, *self.keys, can_merge=False)
51
53
 
52
54
 
@@ -12,6 +12,8 @@
12
12
  # See the License for the specific language governing permissions and
13
13
  # limitations under the License.
14
14
 
15
+ from __future__ import annotations
16
+
15
17
  from typing import Callable, Optional
16
18
 
17
19
  import networkx as nx
@@ -11,7 +11,11 @@
11
11
  # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
12
  # See the License for the specific language governing permissions and
13
13
  # limitations under the License.
14
+
14
15
  """Tools for running circuits in a shuffled order with readout error benchmarking."""
16
+
17
+ from __future__ import annotations
18
+
15
19
  import time
16
20
  from typing import Dict, List, Optional, Tuple, Union
17
21
 
@@ -11,16 +11,22 @@
11
11
  # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
12
  # See the License for the specific language governing permissions and
13
13
  # limitations under the License.
14
+
14
15
  """Estimation of fidelity associated with experimental circuit executions."""
15
- from typing import Callable, Mapping, Optional, Sequence
16
+
17
+ from __future__ import annotations
18
+
19
+ from typing import Callable, Mapping, Optional, Sequence, TYPE_CHECKING
16
20
 
17
21
  import numpy as np
18
22
 
19
- from cirq.circuits import Circuit
20
23
  from cirq.ops import QubitOrder, QubitOrderOrList
21
24
  from cirq.sim import final_state_vector
22
25
  from cirq.value import state_vector_to_probabilities
23
26
 
27
+ if TYPE_CHECKING:
28
+ import cirq
29
+
24
30
 
25
31
  def linear_xeb_fidelity_from_probabilities(
26
32
  hilbert_space_dimension: int, probabilities: Sequence[float]
@@ -132,7 +138,7 @@ def hog_score_xeb_fidelity_from_probabilities(
132
138
 
133
139
 
134
140
  def xeb_fidelity(
135
- circuit: Circuit,
141
+ circuit: cirq.Circuit,
136
142
  bitstrings: Sequence[int],
137
143
  qubit_order: QubitOrderOrList = QubitOrder.DEFAULT,
138
144
  amplitudes: Optional[Mapping[int, complex]] = None,
@@ -197,7 +203,7 @@ def xeb_fidelity(
197
203
 
198
204
 
199
205
  def linear_xeb_fidelity(
200
- circuit: Circuit,
206
+ circuit: cirq.Circuit,
201
207
  bitstrings: Sequence[int],
202
208
  qubit_order: QubitOrderOrList = QubitOrder.DEFAULT,
203
209
  amplitudes: Optional[Mapping[int, complex]] = None,
@@ -213,7 +219,7 @@ def linear_xeb_fidelity(
213
219
 
214
220
 
215
221
  def log_xeb_fidelity(
216
- circuit: Circuit,
222
+ circuit: cirq.Circuit,
217
223
  bitstrings: Sequence[int],
218
224
  qubit_order: QubitOrderOrList = QubitOrder.DEFAULT,
219
225
  amplitudes: Optional[Mapping[int, complex]] = None,
@@ -14,6 +14,8 @@
14
14
 
15
15
  """Utility methods for combining matrices."""
16
16
 
17
+ from __future__ import annotations
18
+
17
19
  import functools
18
20
  from typing import TYPE_CHECKING, Union
19
21
 
@@ -107,7 +109,7 @@ def kron_with_controls(*factors: Union[np.ndarray, complex]) -> np.ndarray:
107
109
  return product
108
110
 
109
111
 
110
- def dot(*values: 'ArrayLike') -> np.ndarray:
112
+ def dot(*values: ArrayLike) -> np.ndarray:
111
113
  """Computes the dot/matrix product of a sequence of values.
112
114
 
113
115
  Performs the computation in serial order without regard to the matrix
@@ -136,7 +138,7 @@ def dot(*values: 'ArrayLike') -> np.ndarray:
136
138
  return result
137
139
 
138
140
 
139
- def _merge_dtypes(dtype1: 'DTypeLike', dtype2: 'DTypeLike') -> np.dtype:
141
+ def _merge_dtypes(dtype1: DTypeLike, dtype2: DTypeLike) -> np.dtype:
140
142
  return (np.zeros(0, dtype1) + np.zeros(0, dtype2)).dtype
141
143
 
142
144
 
cirq/linalg/predicates.py CHANGED
@@ -11,7 +11,12 @@
11
11
  # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
12
  # See the License for the specific language governing permissions and
13
13
  # limitations under the License.
14
+
14
15
  """Utility methods for checking properties of matrices."""
16
+
17
+ from __future__ import annotations
18
+
19
+ from types import EllipsisType
15
20
  from typing import cast, List, Optional, Sequence, Tuple, Union
16
21
 
17
22
  import numpy as np
@@ -228,7 +233,7 @@ def slice_for_qubits_equal_to(
228
233
  big_endian_qureg_value: int = 0,
229
234
  num_qubits: Optional[int] = None,
230
235
  qid_shape: Optional[Tuple[int, ...]] = None,
231
- ) -> Tuple[Union[slice, int, 'ellipsis'], ...]:
236
+ ) -> Tuple[Union[slice, int, EllipsisType], ...]:
232
237
  """Returns an index corresponding to a desired subset of an np.ndarray.
233
238
 
234
239
  It is assumed that the np.ndarray's shape is of the form (2, 2, 2, ..., 2).
cirq/linalg/tolerance.py CHANGED
@@ -14,6 +14,9 @@
14
14
 
15
15
  """Utility for testing approximate equality of matrices and scalars within
16
16
  tolerances."""
17
+
18
+ from __future__ import annotations
19
+
17
20
  from typing import Iterable, TYPE_CHECKING, Union
18
21
 
19
22
  import numpy as np
@@ -22,7 +25,7 @@ if TYPE_CHECKING:
22
25
  from numpy.typing import ArrayLike
23
26
 
24
27
 
25
- def all_near_zero(a: 'ArrayLike', *, atol: float = 1e-8) -> bool:
28
+ def all_near_zero(a: ArrayLike, *, atol: float = 1e-8) -> bool:
26
29
  """Checks if the tensor's elements are all near zero.
27
30
 
28
31
  Args:
@@ -12,15 +12,21 @@
12
12
  # See the License for the specific language governing permissions and
13
13
  # limitations under the License.
14
14
 
15
- from cirq import ops
15
+ from __future__ import annotations
16
+
17
+ from typing import TYPE_CHECKING
18
+
16
19
  from cirq.neutral_atoms import neutral_atom_devices
17
20
 
21
+ if TYPE_CHECKING:
22
+ import cirq
23
+
18
24
 
19
- def is_native_neutral_atom_op(operation: ops.Operation) -> bool:
25
+ def is_native_neutral_atom_op(operation: cirq.Operation) -> bool:
20
26
  """Returns true if the operation is in the default neutral atom gateset."""
21
27
  return operation in neutral_atom_devices.neutral_atom_gateset()
22
28
 
23
29
 
24
- def is_native_neutral_atom_gate(gate: ops.Gate) -> bool:
30
+ def is_native_neutral_atom_gate(gate: cirq.Gate) -> bool:
25
31
  """Returns true if the gate is in the default neutral atom gateset."""
26
32
  return gate in neutral_atom_devices.neutral_atom_gateset()
@@ -12,6 +12,8 @@
12
12
  # See the License for the specific language governing permissions and
13
13
  # limitations under the License.
14
14
 
15
+ from __future__ import annotations
16
+
15
17
  import functools
16
18
  import itertools
17
19
  from typing import Tuple, Type
@@ -59,7 +61,7 @@ def _all_rotation_pairs():
59
61
 
60
62
 
61
63
  @functools.lru_cache()
62
- def _all_clifford_gates() -> Tuple['cirq.SingleQubitCliffordGate', ...]:
64
+ def _all_clifford_gates() -> Tuple[cirq.SingleQubitCliffordGate, ...]:
63
65
  return tuple(
64
66
  cirq.SingleQubitCliffordGate.from_xz_map(trans_x, trans_z)
65
67
  for trans_x, trans_z in _all_rotation_pairs()
cirq/ops/projector.py CHANGED
@@ -1,13 +1,18 @@
1
1
  # pylint: disable=wrong-or-nonexistent-copyright-notice
2
+
3
+ from __future__ import annotations
4
+
2
5
  import itertools
3
6
  import math
4
- from typing import Any, Dict, Iterable, List, Mapping, Optional
7
+ from typing import Any, Dict, Iterable, List, Mapping, Optional, TYPE_CHECKING
5
8
 
6
9
  import numpy as np
7
10
  from scipy.sparse import csr_matrix
8
11
 
9
12
  from cirq import value
10
- from cirq.ops import raw_types
13
+
14
+ if TYPE_CHECKING:
15
+ import cirq
11
16
 
12
17
 
13
18
  def _check_qids_dimension(qids):
@@ -21,7 +26,7 @@ def _check_qids_dimension(qids):
21
26
  class ProjectorString:
22
27
  """Mapping of `cirq.Qid` to measurement values (with a coefficient) representing a projector."""
23
28
 
24
- def __init__(self, projector_dict: Dict[raw_types.Qid, int], coefficient: complex = 1):
29
+ def __init__(self, projector_dict: Dict[cirq.Qid, int], coefficient: complex = 1):
25
30
  """Constructor for ProjectorString
26
31
 
27
32
  Args:
@@ -34,14 +39,14 @@ class ProjectorString:
34
39
  self._coefficient = complex(coefficient)
35
40
 
36
41
  @property
37
- def projector_dict(self) -> Dict[raw_types.Qid, int]:
42
+ def projector_dict(self) -> Dict[cirq.Qid, int]:
38
43
  return self._projector_dict
39
44
 
40
45
  @property
41
46
  def coefficient(self) -> complex:
42
47
  return self._coefficient
43
48
 
44
- def matrix(self, projector_qids: Optional[Iterable[raw_types.Qid]] = None) -> csr_matrix:
49
+ def matrix(self, projector_qids: Optional[Iterable[cirq.Qid]] = None) -> csr_matrix:
45
50
  """Returns the matrix of self in computational basis of qubits.
46
51
 
47
52
  Args:
@@ -75,7 +80,7 @@ class ProjectorString:
75
80
  ([self._coefficient] * len(ones_idx), (ones_idx, ones_idx)), shape=(total_d, total_d)
76
81
  )
77
82
 
78
- def _get_idx_to_keep(self, qid_map: Mapping[raw_types.Qid, int]):
83
+ def _get_idx_to_keep(self, qid_map: Mapping[cirq.Qid, int]):
79
84
  num_qubits = len(qid_map)
80
85
  idx_to_keep: List[Any] = [slice(0, 2)] * num_qubits
81
86
  for q in self.projector_dict.keys():
@@ -83,7 +88,7 @@ class ProjectorString:
83
88
  return tuple(idx_to_keep)
84
89
 
85
90
  def expectation_from_state_vector(
86
- self, state_vector: np.ndarray, qid_map: Mapping[raw_types.Qid, int]
91
+ self, state_vector: np.ndarray, qid_map: Mapping[cirq.Qid, int]
87
92
  ) -> complex:
88
93
  """Expectation of the projection from a state vector.
89
94
 
@@ -105,7 +110,7 @@ class ProjectorString:
105
110
  )
106
111
 
107
112
  def expectation_from_density_matrix(
108
- self, state: np.ndarray, qid_map: Mapping[raw_types.Qid, int]
113
+ self, state: np.ndarray, qid_map: Mapping[cirq.Qid, int]
109
114
  ) -> complex:
110
115
  """Expectation of the projection from a density matrix.
111
116
 
@@ -14,6 +14,8 @@
14
14
 
15
15
  """A Gauge Transformer for the cphase gate."""
16
16
 
17
+ from __future__ import annotations
18
+
17
19
  import numpy as np
18
20
 
19
21
  import cirq.transformers.gauge_compiling.sqrt_cz_gauge as sqrt_cz_gauge
cirq/vis/heatmap.py CHANGED
@@ -173,7 +173,7 @@ class Heatmap:
173
173
  invalid_args = ", ".join([k for k in kwargs if k not in valid_kwargs])
174
174
  raise ValueError(f"Received invalid argument(s): {invalid_args}")
175
175
 
176
- def update_config(self, **kwargs) -> 'Heatmap':
176
+ def update_config(self, **kwargs) -> Heatmap:
177
177
  """Add/Modify **kwargs args passed during initialisation."""
178
178
  self._validate_kwargs(kwargs)
179
179
  self._config.update(kwargs)
cirq/work/sampler.py CHANGED
@@ -11,8 +11,11 @@
11
11
  # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
12
  # See the License for the specific language governing permissions and
13
13
  # limitations under the License.
14
+
14
15
  """Abstract base class for things sampling quantum circuits."""
15
16
 
17
+ from __future__ import annotations
18
+
16
19
  import collections
17
20
  from typing import Dict, FrozenSet, List, Optional, Sequence, Tuple, TYPE_CHECKING, TypeVar, Union
18
21
 
@@ -38,10 +41,10 @@ class Sampler(metaclass=value.ABCMetaImplementAnyOneOf):
38
41
 
39
42
  def run(
40
43
  self,
41
- program: 'cirq.AbstractCircuit',
42
- param_resolver: 'cirq.ParamResolverOrSimilarType' = None,
44
+ program: cirq.AbstractCircuit,
45
+ param_resolver: cirq.ParamResolverOrSimilarType = None,
43
46
  repetitions: int = 1,
44
- ) -> 'cirq.Result':
47
+ ) -> cirq.Result:
45
48
  """Samples from the given `Circuit`.
46
49
 
47
50
  This mode of operation for a sampler will provide results
@@ -66,10 +69,10 @@ class Sampler(metaclass=value.ABCMetaImplementAnyOneOf):
66
69
 
67
70
  async def run_async(
68
71
  self,
69
- program: 'cirq.AbstractCircuit',
70
- param_resolver: 'cirq.ParamResolverOrSimilarType' = None,
72
+ program: cirq.AbstractCircuit,
73
+ param_resolver: cirq.ParamResolverOrSimilarType = None,
71
74
  repetitions: int = 1,
72
- ) -> 'cirq.Result':
75
+ ) -> cirq.Result:
73
76
  """Asynchronously samples from the given Circuit.
74
77
 
75
78
  Provides measurement outcomes as a `cirq.Result` object. This
@@ -88,12 +91,8 @@ class Sampler(metaclass=value.ABCMetaImplementAnyOneOf):
88
91
  return results[0]
89
92
 
90
93
  def sample(
91
- self,
92
- program: 'cirq.AbstractCircuit',
93
- *,
94
- repetitions: int = 1,
95
- params: 'cirq.Sweepable' = None,
96
- ) -> 'pd.DataFrame':
94
+ self, program: cirq.AbstractCircuit, *, repetitions: int = 1, params: cirq.Sweepable = None
95
+ ) -> pd.DataFrame:
97
96
  """Samples the given Circuit, producing a pandas data frame.
98
97
 
99
98
  This interface will operate in a similar way to the `run` method
@@ -180,21 +179,21 @@ class Sampler(metaclass=value.ABCMetaImplementAnyOneOf):
180
179
  return pd.concat(results)
181
180
 
182
181
  def _run_sweep_impl(
183
- self, program: 'cirq.AbstractCircuit', params: 'cirq.Sweepable', repetitions: int = 1
184
- ) -> Sequence['cirq.Result']:
182
+ self, program: cirq.AbstractCircuit, params: cirq.Sweepable, repetitions: int = 1
183
+ ) -> Sequence[cirq.Result]:
185
184
  """Implements run_sweep using run_sweep_async"""
186
185
  return duet.run(self.run_sweep_async, program, params, repetitions)
187
186
 
188
187
  async def _run_sweep_async_impl(
189
- self, program: 'cirq.AbstractCircuit', params: 'cirq.Sweepable', repetitions: int = 1
190
- ) -> Sequence['cirq.Result']:
188
+ self, program: cirq.AbstractCircuit, params: cirq.Sweepable, repetitions: int = 1
189
+ ) -> Sequence[cirq.Result]:
191
190
  """Implements run_sweep_async using run_sweep"""
192
191
  return self.run_sweep(program, params=params, repetitions=repetitions)
193
192
 
194
193
  @value.alternative(requires='run_sweep_async', implementation=_run_sweep_impl)
195
194
  def run_sweep(
196
- self, program: 'cirq.AbstractCircuit', params: 'cirq.Sweepable', repetitions: int = 1
197
- ) -> Sequence['cirq.Result']:
195
+ self, program: cirq.AbstractCircuit, params: cirq.Sweepable, repetitions: int = 1
196
+ ) -> Sequence[cirq.Result]:
198
197
  """Samples from the given Circuit.
199
198
 
200
199
  This allows for sweeping over different parameter values,
@@ -217,8 +216,8 @@ class Sampler(metaclass=value.ABCMetaImplementAnyOneOf):
217
216
 
218
217
  @value.alternative(requires='run_sweep', implementation=_run_sweep_async_impl)
219
218
  async def run_sweep_async(
220
- self, program: 'cirq.AbstractCircuit', params: 'cirq.Sweepable', repetitions: int = 1
221
- ) -> Sequence['cirq.Result']:
219
+ self, program: cirq.AbstractCircuit, params: cirq.Sweepable, repetitions: int = 1
220
+ ) -> Sequence[cirq.Result]:
222
221
  """Asynchronously samples from the given Circuit.
223
222
 
224
223
  By default, this method invokes `run_sweep` synchronously and simply
@@ -237,10 +236,10 @@ class Sampler(metaclass=value.ABCMetaImplementAnyOneOf):
237
236
 
238
237
  async def run_batch_async(
239
238
  self,
240
- programs: Sequence['cirq.AbstractCircuit'],
241
- params_list: Optional[Sequence['cirq.Sweepable']] = None,
239
+ programs: Sequence[cirq.AbstractCircuit],
240
+ params_list: Optional[Sequence[cirq.Sweepable]] = None,
242
241
  repetitions: Union[int, Sequence[int]] = 1,
243
- ) -> Sequence[Sequence['cirq.Result']]:
242
+ ) -> Sequence[Sequence[cirq.Result]]:
244
243
  """Runs the supplied circuits asynchronously.
245
244
 
246
245
  Each circuit provided in `programs` will pair with the optional
@@ -288,10 +287,10 @@ class Sampler(metaclass=value.ABCMetaImplementAnyOneOf):
288
287
 
289
288
  def _normalize_batch_args(
290
289
  self,
291
- programs: Sequence['cirq.AbstractCircuit'],
292
- params_list: Optional[Sequence['cirq.Sweepable']] = None,
290
+ programs: Sequence[cirq.AbstractCircuit],
291
+ params_list: Optional[Sequence[cirq.Sweepable]] = None,
293
292
  repetitions: Union[int, Sequence[int]] = 1,
294
- ) -> Tuple[Sequence['cirq.Sweepable'], Sequence[int]]:
293
+ ) -> Tuple[Sequence[cirq.Sweepable], Sequence[int]]:
295
294
  if params_list is None:
296
295
  params_list = [None] * len(programs)
297
296
  if len(programs) != len(params_list):
@@ -310,11 +309,11 @@ class Sampler(metaclass=value.ABCMetaImplementAnyOneOf):
310
309
 
311
310
  def sample_expectation_values(
312
311
  self,
313
- program: 'cirq.AbstractCircuit',
314
- observables: Union['cirq.PauliSumLike', List['cirq.PauliSumLike']],
312
+ program: cirq.AbstractCircuit,
313
+ observables: Union[cirq.PauliSumLike, List[cirq.PauliSumLike]],
315
314
  *,
316
315
  num_samples: int,
317
- params: 'cirq.Sweepable' = None,
316
+ params: cirq.Sweepable = None,
318
317
  permit_terminal_measurements: bool = False,
319
318
  ) -> Sequence[Sequence[float]]:
320
319
  """Calculates estimated expectation values from samples of a circuit.
@@ -360,7 +359,7 @@ class Sampler(metaclass=value.ABCMetaImplementAnyOneOf):
360
359
  )
361
360
 
362
361
  # Wrap input into a list of pauli sum
363
- pauli_sums: List['cirq.PauliSum'] = (
362
+ pauli_sums: List[cirq.PauliSum] = (
364
363
  [ops.PauliSum.wrap(o) for o in observables]
365
364
  if isinstance(observables, List)
366
365
  else [ops.PauliSum.wrap(observables)]
@@ -369,8 +368,8 @@ class Sampler(metaclass=value.ABCMetaImplementAnyOneOf):
369
368
 
370
369
  # Flatten Pauli Sum into one big list of Pauli String
371
370
  # Keep track of which Pauli Sum each one was from.
372
- flat_pstrings: List['cirq.PauliString'] = []
373
- pstring_to_psum_i: Dict['cirq.PauliString', int] = {}
371
+ flat_pstrings: List[cirq.PauliString] = []
372
+ pstring_to_psum_i: Dict[cirq.PauliString, int] = {}
374
373
  for psum_i, pauli_sum in enumerate(pauli_sums):
375
374
  for pstring in pauli_sum:
376
375
  flat_pstrings.append(pstring)
@@ -378,7 +377,7 @@ class Sampler(metaclass=value.ABCMetaImplementAnyOneOf):
378
377
 
379
378
  # Flatten Circuit Sweep into one big list of Params.
380
379
  # Keep track of their indices so we can map back.
381
- flat_params: List['cirq.ParamMappingType'] = [
380
+ flat_params: List[cirq.ParamMappingType] = [
382
381
  pr.param_dict for pr in study.to_resolvers(params)
383
382
  ]
384
383
  circuit_param_to_sweep_i: Dict[FrozenSet[Tuple[str, Union[int, Tuple[int, int]]]], int] = {
@@ -409,7 +408,7 @@ class Sampler(metaclass=value.ABCMetaImplementAnyOneOf):
409
408
 
410
409
  @staticmethod
411
410
  def _get_measurement_shapes(
412
- circuit: 'cirq.AbstractCircuit',
411
+ circuit: cirq.AbstractCircuit,
413
412
  ) -> Dict[str, Tuple[int, Tuple[int, ...]]]:
414
413
  """Gets the shapes of measurements in the given circuit.
415
414
 
cirq/work/sampler_test.py CHANGED
@@ -11,7 +11,11 @@
11
11
  # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
12
  # See the License for the specific language governing permissions and
13
13
  # limitations under the License.
14
+
14
15
  """Tests for cirq.Sampler."""
16
+
17
+ from __future__ import annotations
18
+
15
19
  from typing import Sequence
16
20
 
17
21
  import duet
@@ -285,8 +289,8 @@ def test_sampler_sample_expectation_values_calculation():
285
289
  """
286
290
 
287
291
  def run_sweep(
288
- self, program: 'cirq.AbstractCircuit', params: 'cirq.Sweepable', repetitions: int = 1
289
- ) -> Sequence['cirq.Result']:
292
+ self, program: cirq.AbstractCircuit, params: cirq.Sweepable, repetitions: int = 1
293
+ ) -> Sequence[cirq.Result]:
290
294
  results = np.zeros((repetitions, 1), dtype=bool)
291
295
  for idx in range(repetitions // 4):
292
296
  results[idx][0] = 1
@@ -12,6 +12,8 @@
12
12
  # See the License for the specific language governing permissions and
13
13
  # limitations under the License.
14
14
 
15
+ from __future__ import annotations
16
+
15
17
  import abc
16
18
  from typing import List, Optional, TYPE_CHECKING
17
19
 
@@ -36,7 +38,7 @@ class ZerosSampler(work.Sampler, metaclass=abc.ABCMeta):
36
38
  self.device = device
37
39
 
38
40
  def run_sweep(
39
- self, program: 'cirq.AbstractCircuit', params: study.Sweepable, repetitions: int = 1
41
+ self, program: cirq.AbstractCircuit, params: study.Sweepable, repetitions: int = 1
40
42
  ) -> List[study.Result]:
41
43
  """Samples circuit as if every measurement resulted in zero.
42
44
 
@@ -12,6 +12,8 @@
12
12
  # See the License for the specific language governing permissions and
13
13
  # limitations under the License.
14
14
 
15
+ from __future__ import annotations
16
+
15
17
  import numpy as np
16
18
  import pytest
17
19
  import sympy
@@ -72,7 +74,7 @@ def test_repeated_keys():
72
74
 
73
75
 
74
76
  class OnlyMeasurementsDevice(cirq.Device):
75
- def validate_operation(self, operation: 'cirq.Operation') -> None:
77
+ def validate_operation(self, operation: cirq.Operation) -> None:
76
78
  if not cirq.is_measurement(operation):
77
79
  raise ValueError(f'{operation} is not a measurement and this device only measures!')
78
80
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: cirq-core
3
- Version: 1.6.0.dev20250505215959
3
+ Version: 1.6.0.dev20250507172716
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
@@ -1,11 +1,11 @@
1
1
  cirq/__init__.py,sha256=rUfvQDtywCak2mJQoihOSyRjGxQahK-YOv909us0w5M,28132
2
2
  cirq/_compat.py,sha256=_DknO27XngcjEidNApRsCzLUWDS4QmDk9M12BaqP5Is,29531
3
- cirq/_compat_test.py,sha256=0m3sYIyxRNv9jvAo6rzJ-cnbpny3KGnAByrbU7bApgQ,34720
3
+ cirq/_compat_test.py,sha256=t51ZXkEuomg1SMI871Ws-5pk68DGBsAf2TGNjVXtZ8I,34755
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=fyp0MSaaj4W0ioi69LzAGW42XMYSl0Qpl1zS_dI0_zM,1206
8
- cirq/_version_test.py,sha256=9i8iz1L6DT_KAgYd2kflJzvQW3ZEQwx7a783BQbCW5A,147
7
+ cirq/_version.py,sha256=AlgIUe9cSvcXSaC_wG3KpjK_MoYOIokHORQMpjdCAo8,1206
8
+ cirq/_version_test.py,sha256=CNrADm0MI1iCUSMW43mxKZgonXXBw4OENMp_s3jqZmw,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
@@ -22,7 +22,7 @@ cirq/circuits/circuit_operation_test.py,sha256=CcIX8n_aASmKR2iqWKyoCbyarEVN9WAl5
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
25
- cirq/circuits/insert_strategy.py,sha256=JU_KPe74P3OpbVQei5iDPgEpOjpts5JFKXU5Xy1QYHE,3211
25
+ cirq/circuits/insert_strategy.py,sha256=3995vK4U6O9RV4BXMoFl9Tf3ekxIiqxv71IuX80JtYo,3237
26
26
  cirq/circuits/insert_strategy_test.py,sha256=ttqhNP1G1jrtwFd0KIlqkTj_1C8F1K7Jqnaz0rEWAiE,1185
27
27
  cirq/circuits/moment.py,sha256=g6gPgOvRx7sVcxlmjzPvd7UkdFlElCw7bHrahWhrK5M,25924
28
28
  cirq/circuits/moment_test.py,sha256=672QcwLSTuuJzXIISH9UyMIOX89aYZZD3odvhyzhxLo,31116
@@ -43,7 +43,7 @@ cirq/contrib/acquaintance/devices_test.py,sha256=RnNwPp1PHNrcygibMdrJEMViBCm4eTX
43
43
  cirq/contrib/acquaintance/executor.py,sha256=a6SIaykIfZaIlxHxlgpwzqfvUb46O2V2i_qEJsEGlcI,8661
44
44
  cirq/contrib/acquaintance/executor_test.py,sha256=VxmGijgjAjuy6s-H5L9Ynu4CxYXFr9rPc2FfuoQjdXs,7903
45
45
  cirq/contrib/acquaintance/gates.py,sha256=Fkk7f0YwVLULh1hGXqjtGm5etb9xuhgvQlb3hrcMML0,13571
46
- cirq/contrib/acquaintance/gates_test.py,sha256=m_QMKqElKXqDbtviwJcgwYf8E1ZM7jcFmb2iPbAIrGM,15010
46
+ cirq/contrib/acquaintance/gates_test.py,sha256=hKN3uX7ew4Sv8j0DTBbBm8n64NxHMC4s6kFTpaPspac,15044
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
49
49
  cirq/contrib/acquaintance/mutation_utils.py,sha256=q-aikSKFLGISgTNXYDGinFUW30mNLPjqTj00-SeDU80,4754
@@ -77,7 +77,7 @@ cirq/contrib/custom_simulators/custom_state_simulator_test.py,sha256=AJgs1HIkXQv
77
77
  cirq/contrib/graph_device/__init__.py,sha256=Q7tjzfme7cMypjdg8lPKxNrVHIv2e7WFabBwxj4VsCU,1343
78
78
  cirq/contrib/graph_device/graph_device.py,sha256=Hi7KZnV_lY_qNhPFyrzdbqvpTHYu7XNc2RC0w96KdV0,7942
79
79
  cirq/contrib/graph_device/graph_device_test.py,sha256=2Z0jTprCZL4V5-gnOblOpz3p6IRsei1VCNxqLWoWnSo,7203
80
- cirq/contrib/graph_device/hypergraph.py,sha256=6hdKri90qqU6ujmR2y8nVyk2pr5wHvFhHAhLYbg5T7o,4716
80
+ cirq/contrib/graph_device/hypergraph.py,sha256=QiqOsGLp4XpfpJhKXarnA2PJmAnhQvHc89ve4m5Y1oA,4750
81
81
  cirq/contrib/graph_device/hypergraph_test.py,sha256=ccwPqqHOWq-ZJ4abhyDrCjXQdrmY1Nb6lP9G_jdi6pw,3769
82
82
  cirq/contrib/graph_device/uniform_graph_device.py,sha256=ymG7X-wLzZE9hBc9P7Kixf4_Mg4ii6jxCWDiH2GJ3uI,2358
83
83
  cirq/contrib/graph_device/uniform_graph_device_test.py,sha256=b49Kx1pH_VvD5m-DV2TSI1qe2ZjQQaB76HJVboGyRYs,1616
@@ -96,9 +96,9 @@ cirq/contrib/paulistring/optimize.py,sha256=ArUWzXYpHq9SE7K9FdqsJ5WJg1ZvHs8DP6zH
96
96
  cirq/contrib/paulistring/optimize_test.py,sha256=jdZBpXIialcHQGsp8LIuIpU9M5wBQX9HgnqqiMv5l8U,3559
97
97
  cirq/contrib/paulistring/pauli_string_dag.py,sha256=vg0994h84zHIejSdwfqR-mdwmHOWWOAOOcGuStfKPdk,1106
98
98
  cirq/contrib/paulistring/pauli_string_dag_test.py,sha256=4XQ2IoXx-2g5OUU1SMCLbEvDWoGyDg9FMy3_rTTqfBk,1124
99
- cirq/contrib/paulistring/pauli_string_measurement_with_readout_mitigation.py,sha256=zn9Iakv-dGlZXkcEzonflGvEAdF-6wO6C_nIPSJ3Qvc,20084
100
- cirq/contrib/paulistring/pauli_string_measurement_with_readout_mitigation_test.py,sha256=R53mh_wnXuYsSJgnqWH5mSHGTivsYhEMnSemyFF6PYg,35465
101
- cirq/contrib/paulistring/pauli_string_optimize.py,sha256=KPFjsf_gzgvN7_hIcNslawcI2RGJKf5F0pDmYTHNAb8,2867
99
+ cirq/contrib/paulistring/pauli_string_measurement_with_readout_mitigation.py,sha256=FRCaB3Gi5fP5XF5nJankPw0IEIFp6ZlIFQ5OfFFYJvQ,20164
100
+ cirq/contrib/paulistring/pauli_string_measurement_with_readout_mitigation_test.py,sha256=yPFWcZiVkUcwwpjQQsT135JPmj9p5KOS9urzNqUWAfQ,35501
101
+ cirq/contrib/paulistring/pauli_string_optimize.py,sha256=QhowjgeI0vXg_XvF7FmpUgGgDJP9xCbsYS8_womA4Ho,2903
102
102
  cirq/contrib/paulistring/pauli_string_optimize_test.py,sha256=2wSpV7EVwuuK8wI_Pp31V4vCIkq-CEmQz3EjaFWi8fM,2895
103
103
  cirq/contrib/paulistring/recombine.py,sha256=zm5AJL80Xl4hgTe9U1YUEgWfcHZys_YcWNpnv02DcL0,4355
104
104
  cirq/contrib/paulistring/recombine_test.py,sha256=ClvleI2hVVBOA7sbi3yTth-fErJQYYCw-6ebAvXt-Ns,1915
@@ -110,7 +110,7 @@ cirq/contrib/qasm_import/_lexer_test.py,sha256=q-NgTZMeXFbBa1s6Q66qu0oHHO_f2Tscz
110
110
  cirq/contrib/qasm_import/_parser.py,sha256=lcXWip0si5ZI8iCEQ-oQQcKj08pPSDnk2Y3u55JiWys,26052
111
111
  cirq/contrib/qasm_import/_parser_test.py,sha256=aQZhZAjE8J7QH7fHk1RoFTKSsOn7PFhLcA4cQDuD7ls,39723
112
112
  cirq/contrib/qasm_import/exception.py,sha256=Wm6cwUPIkNMPjkv-ELpQ-zSoXaiLOddOQ4iYybwuS6I,695
113
- cirq/contrib/qasm_import/qasm.py,sha256=CP444IWCw4zlDNA7HxsTJ2xIak4mZhQv62ZiLlUc2zo,914
113
+ cirq/contrib/qasm_import/qasm.py,sha256=Ve1oJZEFezeIVam9rsbGwCUzqEXoXrkQbV5CO28G-Fc,950
114
114
  cirq/contrib/qasm_import/qasm_test.py,sha256=Co2ksl14dBvYtBUB9-9DONjjyV7uTdZqNP8k8dBLS-Y,1861
115
115
  cirq/contrib/qcircuit/__init__.py,sha256=6-pIZQUK3LlPVGiPFI7HJTl2_O1P-Rts0MsdDgQZaZ0,1000
116
116
  cirq/contrib/qcircuit/qcircuit_diagram.py,sha256=pwaqM9CERfePRxH6Xx3PtMLVIcN1Z375DYfAhpkDVAs,2780
@@ -123,19 +123,19 @@ cirq/contrib/quantum_volume/__init__.py,sha256=RF_nbmm9s9A8sLhsnb7aZnuuoeHnsvlRN
123
123
  cirq/contrib/quantum_volume/quantum_volume.py,sha256=x1nmPFHlp1ZAQC41aYZsHzvBvTRzNZ0azXb-a62ylsQ,19389
124
124
  cirq/contrib/quantum_volume/quantum_volume_test.py,sha256=hVwInjcdS9jKPKeDoQ8EnxjwESC_QLvgEOaykwk27rI,12400
125
125
  cirq/contrib/quimb/__init__.py,sha256=G6tzsTqQeYUg14urOBKE_dOe59cxsBWgvR5b_ngvKkE,943
126
- cirq/contrib/quimb/density_matrix.py,sha256=Q1MOZYFsymYwx5QIi89ydzctO3mj2Hb5fpHujubykHA,8637
126
+ cirq/contrib/quimb/density_matrix.py,sha256=fJPsbmaADRvwyWCBmKRsn1YYxR88LDkf1Sz_Ye3wWrE,8672
127
127
  cirq/contrib/quimb/density_matrix_test.py,sha256=llLw_VwvDuFM3DnpL4i885vSWdNll-2i4B4OZm_abEg,2999
128
128
  cirq/contrib/quimb/grid_circuits.py,sha256=vuMiMaVXsJi-8ZwPnGcKJVVVYlXGi3O-CCwRVwz18qQ,4628
129
129
  cirq/contrib/quimb/grid_circuits_test.py,sha256=0Pl_wea4E_HDa9zaKkmazltFdorB4QsaL2rmMrDv8Sw,3223
130
130
  cirq/contrib/quimb/mps_simulator.py,sha256=xEtLqkAHNavyUr8IuBJ-RHi_O4qK9DoIbNSOfZyR8u0,24710
131
131
  cirq/contrib/quimb/mps_simulator_test.py,sha256=sg1l7mtJh3HrUQkS3cRv5M0LAQG2RUR0Tr2osjjXG0k,17142
132
- cirq/contrib/quimb/state_vector.py,sha256=wc4-d6ZH-Mjqhb6vfftaV-YDoMJqJPNqQcNjfGcQTAw,6686
132
+ cirq/contrib/quimb/state_vector.py,sha256=Hc0HbcJO6O8s3nLEJjabQikF1flN49FUn-Bj-xPE2Jk,6721
133
133
  cirq/contrib/quimb/state_vector_test.py,sha256=Jwuk_9hL00OA-WDRBafGY16ZHiBJQ18Dn8Bx2l8AAoc,5800
134
134
  cirq/contrib/quirk/__init__.py,sha256=0c14toTDI-aopiJjaGre6HGnXA6Vq7zs8Hun9whUEhA,728
135
135
  cirq/contrib/quirk/export_to_quirk.py,sha256=RwxIyLSy0N0DjzKQDb2CcUBRvK7LX5NZ4Vgp4FvIRyw,3837
136
136
  cirq/contrib/quirk/export_to_quirk_test.py,sha256=XDs5VT-i78-Jw4kp4ZjDqNAi1fVzUqrHxVnANj_4l5s,11986
137
137
  cirq/contrib/quirk/linearize_circuit.py,sha256=Q5KEQ6L4QLqPwaLi4G-w06tWLvK5OOi0s209B2dpNqk,1545
138
- cirq/contrib/quirk/quirk_gate.py,sha256=aQkCCrMIlShNhKKWWY9rSSknPUVP_XSEmjHqZt1yd2M,7275
138
+ cirq/contrib/quirk/quirk_gate.py,sha256=2xMuZTG-Mqfcrw7vQccProRZz0cfT8CjhdZln0bUL2c,7309
139
139
  cirq/contrib/routing/__init__.py,sha256=ktb3I20eDrRtlywE_JR9yHZ_YHDC3UQn6xB-S6GTaTs,1279
140
140
  cirq/contrib/routing/device.py,sha256=bj0AdDB9xnXqzrsSy2C3puVOza0bU-GhImoEr1IBZDw,2889
141
141
  cirq/contrib/routing/device_test.py,sha256=fGGN9agUEEusrzCaodsmCWMJE7LBF4Vc9JQ9KL_7b9A,1926
@@ -143,14 +143,14 @@ cirq/contrib/routing/greedy.py,sha256=TBkt0z76Fefs_6rlKE3sQXGqo_96GYsVDixrMiz9Oa
143
143
  cirq/contrib/routing/greedy_test.py,sha256=e658tKz2SSqIUah6r9EMup2yxaaLBz0dz6xRryV_jDE,2238
144
144
  cirq/contrib/routing/initialization.py,sha256=M6z2eSiFaoZutZFQXhTJrQKdNVp2TEBtEPfmwGUlZAk,3733
145
145
  cirq/contrib/routing/initialization_test.py,sha256=_-nePdUmoE3IdW240GEMBCm0P8rlOWF_ENXb196LlQo,2473
146
- cirq/contrib/routing/router.py,sha256=KK4b8eZGxz3OrJVOaj9DnGONLXNGrOv1SBgMWcaa7tQ,2529
146
+ cirq/contrib/routing/router.py,sha256=e-1AYvPFPFbK9G0C0pfkxlJy4RjoTpaf23ndUuS1v7U,2565
147
147
  cirq/contrib/routing/router_test.py,sha256=eIoKRCOMgXdAbxKURgD2rBhlz47AQXqDMbwyqKTz-ng,6330
148
148
  cirq/contrib/routing/swap_network.py,sha256=3isu0X6KZS6Fkp6ZdZcSNpqP4IJVjxfY818GCI_kQlk,2385
149
149
  cirq/contrib/routing/swap_network_test.py,sha256=XxbjIvOowvtOVwT2RN4e7YWlLebLm98Ty2TtOI1zXzU,4816
150
150
  cirq/contrib/routing/utils.py,sha256=8fhDAqpYI8Tn12aTAOHjThzlv7QM0fbVrUWIUXgM9sg,3786
151
151
  cirq/contrib/routing/utils_test.py,sha256=WzOWrun1hnvSI6A4pA0jHRzSsiLCjZBa6ARGkYoBK9Y,2020
152
152
  cirq/contrib/shuffle_circuits/__init__.py,sha256=AL-V3OaZiaF596WTLlyxDPk0t1WMpTHpQrpRW_A9t48,832
153
- cirq/contrib/shuffle_circuits/shuffle_circuits_with_readout_benchmarking.py,sha256=d7tW83RW5RW3s5NUTXSPlw1-KAk7mll3wrkJkuJXlcI,10844
153
+ cirq/contrib/shuffle_circuits/shuffle_circuits_with_readout_benchmarking.py,sha256=C2nM3J7tR5nHbL32vklZiCOHTglI8shWeHHBHRt6uxg,10882
154
154
  cirq/contrib/shuffle_circuits/shuffle_circuits_with_readout_benchmarking_test.py,sha256=TaO33Z5IYLQcFxpaYXbCiTjQdtgeBwL5qhT2TjbHpDA,13847
155
155
  cirq/contrib/svg/__init__.py,sha256=m7d-CNT2j74uNQdmM2xJ1a7HG6v0FZMt8eAwW4rPJpI,148
156
156
  cirq/contrib/svg/svg.py,sha256=QQs--lyGCOY8ynbUIxdJf-i-8X_fU8NRjPIn8ELUnIk,9410
@@ -181,7 +181,7 @@ cirq/devices/thermal_noise_model_test.py,sha256=ox9b0BoHH6d73CjWWI1fIAGd_o3r-4qy
181
181
  cirq/devices/unconstrained_device.py,sha256=R3vHBELHhDYgvvwhLgtlLASNL7er2jBmKJilgzbed8o,1557
182
182
  cirq/devices/unconstrained_device_test.py,sha256=PZ2FeLbRYh38stk3AA03j3k_a6VaGdtHh3D2jrnjAIc,1047
183
183
  cirq/experiments/__init__.py,sha256=Sx2sW3Uj0p7W-E_HkZ21YpHVUvKlp_zc5WWtago4rlo,3667
184
- cirq/experiments/fidelity_estimation.py,sha256=JK9yUoD4TL3nkf2yiEJ5f_RR-rhkAHSKpeLlYCRvZU4,9214
184
+ cirq/experiments/fidelity_estimation.py,sha256=Z6BjqAKMzyMGRMnUyy5YN3o0fpAOMtnmtQ6b_dGhT8E,9283
185
185
  cirq/experiments/fidelity_estimation_test.py,sha256=SX5hwQjyzWm1yr1q0C_LCgbFfUF_Ye36g6HuQbtinGI,4918
186
186
  cirq/experiments/n_qubit_tomography.py,sha256=T4Q8GkcESrraFfnSnDEaMh_-7X7U3ufpdHwrjprBr4M,8482
187
187
  cirq/experiments/n_qubit_tomography_test.py,sha256=wHfV2OpGYSDXfoyEh-B5dc1Dv8sxKNFbUoHyjIWZoFk,4362
@@ -252,7 +252,7 @@ cirq/interop/quirk/cells/unsupported_cells.py,sha256=xTE4aKpuVocey_lvWwb8Q1fla6o
252
252
  cirq/interop/quirk/cells/unsupported_cells_test.py,sha256=5bl-maazy7Dr8u6kwK1AhGT4vtHqzIMRKxoMKYC-JWs,2178
253
253
  cirq/ion/__init__.py,sha256=F6tf4JZOGpDdxX0FxT42qgq8rF96ZTFHMJ0OV09Yj1c,787
254
254
  cirq/linalg/__init__.py,sha256=0dSlIBy-TVzf7b_-rLLlrS8ZFkgCfYg0pJjWs72xYOk,4045
255
- cirq/linalg/combinators.py,sha256=0tts29gbwQg9lpZvCSX8QKMIMf38NGGdBJqI911m7jA,5336
255
+ cirq/linalg/combinators.py,sha256=eFblS-EO45W0uqOm4rPmPj85_3w6Y3y7wnOTTLIiSK8,5366
256
256
  cirq/linalg/combinators_test.py,sha256=eRy1FrGujE8UC3pP1X5MfWmKlpjimHTxdiixr-G4nJM,4829
257
257
  cirq/linalg/decompositions.py,sha256=bKwdrDSMQtnZgGhowVFrxfpuQbLR-s-xWwVF23h88Ms,38675
258
258
  cirq/linalg/decompositions_test.py,sha256=zlx9-1GbEjD128-fAwx4qqdbd5g324O65l3VzioilHY,25436
@@ -260,14 +260,14 @@ cirq/linalg/diagonalize.py,sha256=Y3fFcyEWKH5CGbGY8KeQPGBgdDgvETF3WUCkVNIVfNw,10
260
260
  cirq/linalg/diagonalize_test.py,sha256=Jn6Gc1R_1MaL6vUUqjIx_6WvMDTIj7l8OxUNJgWKmsc,9089
261
261
  cirq/linalg/operator_spaces.py,sha256=kzKK0TNn7Mjul45vTygGyJik-PCct8dVfUiTcjWPVps,4136
262
262
  cirq/linalg/operator_spaces_test.py,sha256=Hbm8e4kGbGw9c4O3v5o0kYbcikwDkdIoAy3V8EofJr4,10605
263
- cirq/linalg/predicates.py,sha256=vLTRaAYqVf0mk6Qgm53ROhLDtXxxoEhHbYxQN74aGRk,12076
263
+ cirq/linalg/predicates.py,sha256=WyMHG_X_nGrPAqAN7Z-QIEfOxeBaaBqesHuJg2jz-MY,12147
264
264
  cirq/linalg/predicates_test.py,sha256=syNiyS-clEGeZnbKT7zyR8_ClDnXFYtDnLKozLbitzw,21504
265
- cirq/linalg/tolerance.py,sha256=a68RNOmCw0ybFwhXOq6DERK5gHAOlPJIRdPuMzV6xuU,1870
265
+ cirq/linalg/tolerance.py,sha256=EOP8s53270gw3wCPsnuuuhLENBhdUffxEDygwVLOvzY,1905
266
266
  cirq/linalg/tolerance_test.py,sha256=wnmuXIGEn_mugGoNm3AigSgjV2DMFdj8xpgRTMBbO7A,2355
267
267
  cirq/linalg/transformations.py,sha256=zo9Gwo4VX2uQfN_7iOzQrxI-27uDj7s8eTUe2eJQetU,32519
268
268
  cirq/linalg/transformations_test.py,sha256=4GnfQhB1lERteVxvTHXMXxEt4vwQLZBXNJOvnFY3AKY,25636
269
269
  cirq/neutral_atoms/__init__.py,sha256=VoQBkmZ5m4TPxjxShRixjqJbnc-IAnAWkGOPu8MBS5o,813
270
- cirq/neutral_atoms/convert_to_neutral_atom_gates.py,sha256=SsXFh1-NoBGqp4yX8-jIbIw-AK40baA-qh-iTL1wS6Q,1070
270
+ cirq/neutral_atoms/convert_to_neutral_atom_gates.py,sha256=2sIJd5CzWjehMi_rfFW8QXSnafwdWqzrnrzKbWlkXf0,1156
271
271
  cirq/neutral_atoms/convert_to_neutral_atom_gates_test.py,sha256=svleNo8P_cQLCMfcGLkU896cpLjZKPynDKnJGM2pyJ0,1861
272
272
  cirq/neutral_atoms/neutral_atom_devices.py,sha256=s-LInrNp8k_txKbpLWfsaoiZvUScOWNxr-jiB-nFcDA,1358
273
273
  cirq/ops/__init__.py,sha256=Fvghj3MopLpeIdbpb6en855QgwperBs5esV1iszhBDA,8274
@@ -278,7 +278,7 @@ cirq/ops/boolean_hamiltonian_test.py,sha256=p0vm-hQKWJQdiLl6KyM-ylF3eIW1JgxBfihe
278
278
  cirq/ops/classically_controlled_operation.py,sha256=lRP-agJZBgGO5CL9OML3oZKaOZJAuAMqnHe4XRAC6Gk,10369
279
279
  cirq/ops/classically_controlled_operation_test.py,sha256=nIYyXfNH4E2IibZSLk6QDVHpfJQbuI_iWwirCH8rhi8,50209
280
280
  cirq/ops/clifford_gate.py,sha256=awiYS6M5HiFXZee1Y9ZouC6u92UjfTJsK7soelid0ng,39392
281
- cirq/ops/clifford_gate_test.py,sha256=dqghYb7_afYxCLceBarX56Tn9y_dSWCKF75W-Qrzvcw,40341
281
+ cirq/ops/clifford_gate_test.py,sha256=0AzR-XI9N97rRS-bxXQhvu5KS2eaFSoMliW-J68wk68,40375
282
282
  cirq/ops/common_channels.py,sha256=aTxfQ7F4ewv2h_XfUgfdGk2DbU7Lian-Jp_2muMNXlg,37130
283
283
  cirq/ops/common_channels_test.py,sha256=nQsSSxu7vtedb3ZUuw4hNKIX7MYI4x8lxvLyWMZNt10,30079
284
284
  cirq/ops/common_gate_families.py,sha256=2E31Qr_Yv1zI-r_MNWmr1xJYrEHHU45274iDrt_oKPE,8611
@@ -355,7 +355,7 @@ cirq/ops/phased_x_gate.py,sha256=OHm4Bv3gF2GcGZfCU71Kj2PXqdjpVk5Ufo9yk_oylVk,932
355
355
  cirq/ops/phased_x_gate_test.py,sha256=g_qbhl2OesKgXkzECv-7FJPMlOBzv9-AzkVZgfflxbE,10821
356
356
  cirq/ops/phased_x_z_gate.py,sha256=72_lDbJXEbKYQ1Q6brCc2jEiNcH1B5t8hnN2v_RqjRY,11524
357
357
  cirq/ops/phased_x_z_gate_test.py,sha256=KK5-FD5zoaqZkw7p6UKxFddzaFWoxnQnE8LpCiKtIk8,10690
358
- cirq/ops/projector.py,sha256=y3ignrYFmthdPm_pjJ0Y0xp8SGPviqcT07Y9KEZ231Y,5646
358
+ cirq/ops/projector.py,sha256=c7Q1pB7KEjiVQV-vD8Yu6jOcpUAG49khge9Bu3MJF7w,5672
359
359
  cirq/ops/projector_test.py,sha256=Wq7ddj-PV30yUXJxJoT3XIw2sIUC1AilnZ9m9N5Ejr8,9063
360
360
  cirq/ops/qid_util.py,sha256=B2Ilqp4LCDN-Um3lx2GfWq3IelZYicMvFx7hgIQmmhc,2095
361
361
  cirq/ops/qid_util_test.py,sha256=JdViBgFfH4bZJyPKTjUf9MuPxMQe08JV_Tl6tusekfk,1061
@@ -1113,7 +1113,7 @@ cirq/transformers/analytical_decompositions/two_qubit_to_ms_test.py,sha256=85Mbu
1113
1113
  cirq/transformers/analytical_decompositions/two_qubit_to_sqrt_iswap.py,sha256=WP-CojkNy_c7gIlc4q595o2OtMu9pdpmERtXthU2cRU,25374
1114
1114
  cirq/transformers/analytical_decompositions/two_qubit_to_sqrt_iswap_test.py,sha256=VsbjaDbwy94sMYVnqN02gw66k2g-cRTUyto4o0NPbII,20619
1115
1115
  cirq/transformers/gauge_compiling/__init__.py,sha256=cEcoLT8TONEE_r_sL_deLUvOQv64C1j6NN-5JtK0b1E,1522
1116
- cirq/transformers/gauge_compiling/cphase_gauge.py,sha256=GEw5b1865_5yBmX1TXxrh3JX8KrUvGDspIE8fjp_svc,5540
1116
+ cirq/transformers/gauge_compiling/cphase_gauge.py,sha256=EoM_TKZt8mJwYFQAfv3rviitXWvGT8I5N36droPWPCE,5576
1117
1117
  cirq/transformers/gauge_compiling/cphase_gauge_test.py,sha256=_lXX8eEiq4kh8cxOb-3M-wRFTipCvjp3KIq8PtgvKsc,1391
1118
1118
  cirq/transformers/gauge_compiling/cz_gauge.py,sha256=j_aF4bI4B2V3R6CDqFwe2xMHe5iN8KGF0jtvUQIt3I8,2550
1119
1119
  cirq/transformers/gauge_compiling/cz_gauge_test.py,sha256=_2RMzwuMoqytgsVZEET2m6QsGoZ2_uWgBfSGGvhZEWo,854
@@ -1185,7 +1185,7 @@ cirq/value/value_equality_attr_test.py,sha256=uLY2QntO8fuTO6j1mU20ulLGClY5z0_8fx
1185
1185
  cirq/vis/__init__.py,sha256=YzNrNjIyUiTxKHGzYw92qzOYzx8aXkm2y_1hkfVohtU,1171
1186
1186
  cirq/vis/density_matrix.py,sha256=8jadiGKgOG86llpgCahDcBJnWw0IpCooWWREJcNGXP4,4819
1187
1187
  cirq/vis/density_matrix_test.py,sha256=PBqsp4BjIubKWmei5FFzt5345_g_Iu-MR41jDR6Qa8Q,6907
1188
- cirq/vis/heatmap.py,sha256=-0JRDfLErXSnwLbJkqz0Q4BJ6WezEV9F9gG3C6w2JMI,17767
1188
+ cirq/vis/heatmap.py,sha256=zQi8LqyZZUFXKKAzFgyFWPoo5MK51D126ODIqRFhtjg,17765
1189
1189
  cirq/vis/heatmap_test.py,sha256=6CEVTaS6jfpdE7EhJIs7D_AXclA0pS_calDAHx0gW2Q,20550
1190
1190
  cirq/vis/histogram.py,sha256=Zo4JCkQm7zNqUmae9e4hYd0fFcEY__TXaGl5mNkG-5M,5107
1191
1191
  cirq/vis/histogram_test.py,sha256=MZPd3ivY0Lo_XKV4n07oVlQ345uvkEdI76qs6GwwUuk,1903
@@ -1208,12 +1208,12 @@ cirq/work/observable_settings.py,sha256=x4IT5b0ynmTZxEPTGXZ29KXjzIa6kz6aB0jH8tW6
1208
1208
  cirq/work/observable_settings_test.py,sha256=pINRmwyJkracXiQqZddl8QSejm-NBWyXPRio9ecc76k,4281
1209
1209
  cirq/work/pauli_sum_collector.py,sha256=5Ld5nOS6qe5a9ZZzx7rOinFC78FovWpbObMcPg61lFY,4250
1210
1210
  cirq/work/pauli_sum_collector_test.py,sha256=aeo06iLIYZjWjN3C4loVHRYWpV35lSSlcX2cOVdt2Ss,2437
1211
- cirq/work/sampler.py,sha256=sW0RhIelGABAKbqTM58shwyyCPgf86JIv9IGdJe__js,19186
1212
- cirq/work/sampler_test.py,sha256=mdk1J-WrvbPUYhY41VhWf9_te4DnXr_XMPcugWwc4-I,13281
1213
- cirq/work/zeros_sampler.py,sha256=8_Ne6dBkDANtTZuql7Eb0Qg_E_P3-_gu-ybFzxTbKAQ,2356
1214
- cirq/work/zeros_sampler_test.py,sha256=JIkpBBFPJe5Ba4142vzogyWyboG1Q1ZAm0UVGgOoZn8,3279
1215
- cirq_core-1.6.0.dev20250505215959.dist-info/licenses/LICENSE,sha256=tAkwu8-AdEyGxGoSvJ2gVmQdcicWw3j1ZZueVV74M-E,11357
1216
- cirq_core-1.6.0.dev20250505215959.dist-info/METADATA,sha256=Yl8UG4YVGZ3QJLGvWwC5zvMnSXtK5tpS-ChJlB-TJOU,4908
1217
- cirq_core-1.6.0.dev20250505215959.dist-info/WHEEL,sha256=0CuiUZ_p9E4cD6NyLD6UG80LBXYyiSYZOKDm5lp32xk,91
1218
- cirq_core-1.6.0.dev20250505215959.dist-info/top_level.txt,sha256=Sz9iOxHU0IEMLSFGwiwOCaN2e9K-jFbBbtpPN1hB73g,5
1219
- cirq_core-1.6.0.dev20250505215959.dist-info/RECORD,,
1211
+ cirq/work/sampler.py,sha256=b7O3B8bc77KQb8ReLx7qeF8owP1Qwb5_I-RwC6-M_C8,19118
1212
+ cirq/work/sampler_test.py,sha256=TBJm3gepuOURwklJTXNdqj0thvdqKUvrZwZqdytJxNY,13313
1213
+ cirq/work/zeros_sampler.py,sha256=vHCfqkXmUcPkaDuKHlY-UQ71dUHVroEtm_XW51mZpHs,2390
1214
+ cirq/work/zeros_sampler_test.py,sha256=TR3AXYSfg3ETpeaEtrmE-GgZsPtfZkUZ36kyH9JquJk,3313
1215
+ cirq_core-1.6.0.dev20250507172716.dist-info/licenses/LICENSE,sha256=tAkwu8-AdEyGxGoSvJ2gVmQdcicWw3j1ZZueVV74M-E,11357
1216
+ cirq_core-1.6.0.dev20250507172716.dist-info/METADATA,sha256=j--9sDJdwJeC6dRf1vf3ir19WZl8FZuOt1RzpsJtJvo,4908
1217
+ cirq_core-1.6.0.dev20250507172716.dist-info/WHEEL,sha256=0CuiUZ_p9E4cD6NyLD6UG80LBXYyiSYZOKDm5lp32xk,91
1218
+ cirq_core-1.6.0.dev20250507172716.dist-info/top_level.txt,sha256=Sz9iOxHU0IEMLSFGwiwOCaN2e9K-jFbBbtpPN1hB73g,5
1219
+ cirq_core-1.6.0.dev20250507172716.dist-info/RECORD,,