cirq-core 1.6.0.dev20250519175318__py3-none-any.whl → 1.6.0.dev20250519202416__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 (207) hide show
  1. cirq/_version.py +1 -1
  2. cirq/_version_test.py +1 -1
  3. cirq/devices/grid_qubit_test.py +3 -0
  4. cirq/devices/insertion_noise_model_test.py +2 -0
  5. cirq/devices/line_qubit_test.py +2 -0
  6. cirq/devices/named_topologies_test.py +3 -0
  7. cirq/devices/noise_properties_test.py +2 -0
  8. cirq/devices/noise_utils_test.py +2 -0
  9. cirq/devices/superconducting_qubits_noise_properties_test.py +2 -0
  10. cirq/devices/thermal_noise_model_test.py +2 -0
  11. cirq/devices/unconstrained_device_test.py +2 -0
  12. cirq/experiments/benchmarking/parallel_xeb_test.py +2 -0
  13. cirq/experiments/fidelity_estimation_test.py +3 -0
  14. cirq/experiments/n_qubit_tomography_test.py +3 -0
  15. cirq/experiments/purity_estimation.py +2 -0
  16. cirq/experiments/purity_estimation_test.py +2 -0
  17. cirq/experiments/qubit_characterizations_test.py +2 -0
  18. cirq/experiments/readout_confusion_matrix_test.py +2 -0
  19. cirq/experiments/t1_decay_experiment_test.py +2 -0
  20. cirq/experiments/t2_decay_experiment_test.py +2 -0
  21. cirq/experiments/two_qubit_xeb_test.py +4 -0
  22. cirq/experiments/xeb_sampling_test.py +3 -0
  23. cirq/experiments/z_phase_calibration_test.py +2 -0
  24. cirq/interop/quirk/cells/all_cells.py +7 -2
  25. cirq/interop/quirk/cells/arithmetic_cells_test.py +3 -0
  26. cirq/interop/quirk/cells/cell_test.py +3 -0
  27. cirq/interop/quirk/cells/composite_cell_test.py +2 -0
  28. cirq/interop/quirk/cells/control_cells_test.py +2 -0
  29. cirq/interop/quirk/cells/frequency_space_cells_test.py +2 -0
  30. cirq/interop/quirk/cells/ignored_cells.py +3 -0
  31. cirq/interop/quirk/cells/ignored_cells_test.py +2 -0
  32. cirq/interop/quirk/cells/input_cells_test.py +2 -0
  33. cirq/interop/quirk/cells/input_rotation_cells_test.py +2 -0
  34. cirq/interop/quirk/cells/measurement_cells_test.py +2 -0
  35. cirq/interop/quirk/cells/parse.py +2 -0
  36. cirq/interop/quirk/cells/parse_test.py +2 -0
  37. cirq/interop/quirk/cells/qubit_permutation_cells_test.py +2 -0
  38. cirq/interop/quirk/cells/scalar_cells_test.py +2 -0
  39. cirq/interop/quirk/cells/single_qubit_rotation_cells_test.py +2 -0
  40. cirq/interop/quirk/cells/swap_cell_test.py +2 -0
  41. cirq/interop/quirk/cells/testing.py +2 -0
  42. cirq/interop/quirk/cells/testing_test.py +2 -0
  43. cirq/interop/quirk/cells/unsupported_cells.py +3 -0
  44. cirq/interop/quirk/cells/unsupported_cells_test.py +2 -0
  45. cirq/interop/quirk/url_to_circuit_test.py +3 -0
  46. cirq/linalg/combinators_test.py +3 -0
  47. cirq/linalg/decompositions_test.py +2 -0
  48. cirq/linalg/diagonalize.py +2 -0
  49. cirq/linalg/diagonalize_test.py +2 -0
  50. cirq/linalg/operator_spaces_test.py +2 -0
  51. cirq/linalg/predicates_test.py +2 -0
  52. cirq/linalg/tolerance_test.py +2 -0
  53. cirq/linalg/transformations.py +4 -1
  54. cirq/linalg/transformations_test.py +2 -0
  55. cirq/neutral_atoms/convert_to_neutral_atom_gates_test.py +2 -0
  56. cirq/neutral_atoms/neutral_atom_devices.py +2 -0
  57. cirq/ops/arithmetic_operation_test.py +2 -0
  58. cirq/ops/boolean_hamiltonian_test.py +3 -0
  59. cirq/ops/classically_controlled_operation_test.py +2 -0
  60. cirq/ops/common_channels_test.py +2 -0
  61. cirq/ops/common_gate_families.py +2 -0
  62. cirq/ops/common_gate_families_test.py +2 -0
  63. cirq/ops/common_gates_test.py +2 -0
  64. cirq/ops/control_values_test.py +2 -0
  65. cirq/ops/controlled_gate_test.py +4 -2
  66. cirq/ops/controlled_operation_test.py +4 -2
  67. cirq/ops/dense_pauli_string_test.py +3 -0
  68. cirq/ops/diagonal_gate_test.py +2 -0
  69. cirq/ops/eigen_gate_test.py +2 -0
  70. cirq/ops/fourier_transform_test.py +2 -0
  71. cirq/ops/fsim_gate_test.py +2 -0
  72. cirq/ops/gate_features.py +2 -0
  73. cirq/ops/gate_features_test.py +2 -0
  74. cirq/ops/gate_operation_test.py +3 -0
  75. cirq/ops/gateset_test.py +2 -0
  76. cirq/ops/global_phase_op_test.py +2 -0
  77. cirq/ops/greedy_qubit_manager_test.py +2 -0
  78. cirq/ops/identity_test.py +3 -0
  79. cirq/ops/kraus_channel_test.py +3 -0
  80. cirq/ops/linear_combinations_test.py +2 -0
  81. cirq/ops/matrix_gates_test.py +3 -0
  82. cirq/ops/measure_util_test.py +2 -0
  83. cirq/ops/measurement_gate_test.py +2 -0
  84. cirq/ops/mixed_unitary_channel_test.py +3 -0
  85. cirq/ops/named_qubit_test.py +2 -0
  86. cirq/ops/op_tree_test.py +3 -0
  87. cirq/ops/parallel_gate_test.py +2 -0
  88. cirq/ops/parity_gates_test.py +2 -0
  89. cirq/ops/pauli_gates_test.py +2 -0
  90. cirq/ops/pauli_interaction_gate_test.py +2 -0
  91. cirq/ops/pauli_measurement_gate_test.py +2 -0
  92. cirq/ops/pauli_string_phasor_test.py +2 -0
  93. cirq/ops/pauli_string_raw_types_test.py +2 -0
  94. cirq/ops/pauli_string_test.py +2 -0
  95. cirq/ops/pauli_sum_exponential_test.py +2 -0
  96. cirq/ops/permutation_gate_test.py +2 -0
  97. cirq/ops/phased_iswap_gate_test.py +2 -0
  98. cirq/ops/phased_x_gate_test.py +2 -0
  99. cirq/ops/phased_x_z_gate_test.py +3 -0
  100. cirq/ops/projector_test.py +3 -0
  101. cirq/ops/qid_util_test.py +2 -0
  102. cirq/ops/qubit_manager_test.py +2 -0
  103. cirq/ops/qubit_order.py +11 -13
  104. cirq/ops/qubit_order_or_list.py +2 -0
  105. cirq/ops/qubit_order_test.py +2 -0
  106. cirq/ops/random_gate_channel_test.py +3 -0
  107. cirq/ops/state_preparation_channel_test.py +2 -0
  108. cirq/ops/swap_gates_test.py +2 -0
  109. cirq/ops/tags.py +4 -0
  110. cirq/ops/tags_test.py +2 -0
  111. cirq/ops/three_qubit_gates_test.py +2 -0
  112. cirq/ops/two_qubit_diagonal_gate_test.py +2 -0
  113. cirq/ops/uniform_superposition_gate_test.py +2 -0
  114. cirq/ops/wait_gate_test.py +3 -0
  115. cirq/protocols/apply_channel_protocol.py +6 -4
  116. cirq/protocols/apply_channel_protocol_test.py +2 -0
  117. cirq/protocols/apply_mixture_protocol.py +6 -4
  118. cirq/protocols/apply_mixture_protocol_test.py +3 -0
  119. cirq/protocols/apply_unitary_protocol_test.py +2 -0
  120. cirq/protocols/approximate_equality_protocol.py +2 -0
  121. cirq/protocols/approximate_equality_protocol_test.py +2 -0
  122. cirq/protocols/circuit_diagram_info_protocol_test.py +3 -0
  123. cirq/protocols/commutes_protocol.py +3 -0
  124. cirq/protocols/commutes_protocol_test.py +2 -0
  125. cirq/protocols/control_key_protocol_test.py +2 -0
  126. cirq/protocols/equal_up_to_global_phase_protocol.py +2 -0
  127. cirq/protocols/equal_up_to_global_phase_protocol_test.py +3 -0
  128. cirq/protocols/has_stabilizer_effect_protocol.py +2 -0
  129. cirq/protocols/has_stabilizer_effect_protocol_test.py +2 -0
  130. cirq/protocols/has_unitary_protocol.py +2 -0
  131. cirq/protocols/has_unitary_protocol_test.py +2 -0
  132. cirq/protocols/inverse_protocol_test.py +3 -1
  133. cirq/protocols/json_serialization.py +3 -0
  134. cirq/protocols/json_serialization_test.py +2 -0
  135. cirq/protocols/json_test_data/spec.py +2 -0
  136. cirq/protocols/kraus_protocol.py +2 -0
  137. cirq/protocols/kraus_protocol_test.py +2 -0
  138. cirq/protocols/measurement_key_protocol_test.py +4 -1
  139. cirq/protocols/mixture_protocol.py +2 -0
  140. cirq/protocols/mixture_protocol_test.py +2 -0
  141. cirq/protocols/mul_protocol.py +2 -0
  142. cirq/protocols/mul_protocol_test.py +2 -0
  143. cirq/protocols/pauli_expansion_protocol.py +3 -0
  144. cirq/protocols/pauli_expansion_protocol_test.py +2 -0
  145. cirq/protocols/phase_protocol.py +2 -0
  146. cirq/protocols/phase_protocol_test.py +2 -0
  147. cirq/protocols/pow_protocol_test.py +2 -0
  148. cirq/protocols/qasm_test.py +3 -0
  149. cirq/protocols/qid_shape_protocol.py +2 -0
  150. cirq/protocols/qid_shape_protocol_test.py +2 -0
  151. cirq/protocols/resolve_parameters_test.py +3 -2
  152. cirq/protocols/trace_distance_bound.py +2 -0
  153. cirq/protocols/trace_distance_bound_test.py +2 -0
  154. cirq/protocols/unitary_protocol.py +2 -0
  155. cirq/protocols/unitary_protocol_test.py +3 -0
  156. cirq/qis/channels.py +6 -2
  157. cirq/qis/channels_test.py +4 -0
  158. cirq/qis/clifford_tableau_test.py +2 -0
  159. cirq/qis/entropy.py +2 -0
  160. cirq/qis/entropy_test.py +2 -0
  161. cirq/qis/measures_test.py +4 -0
  162. cirq/qis/noise_utils.py +2 -0
  163. cirq/qis/noise_utils_test.py +2 -0
  164. cirq/qis/states_test.py +2 -0
  165. cirq/sim/classical_simulator_test.py +2 -0
  166. cirq/sim/clifford/clifford_simulator_test.py +3 -0
  167. cirq/sim/clifford/clifford_tableau_simulation_state_test.py +2 -0
  168. cirq/sim/clifford/stabilizer_ch_form_simulation_state_test.py +2 -0
  169. cirq/sim/clifford/stabilizer_sampler_test.py +2 -0
  170. cirq/sim/clifford/stabilizer_simulation_state_test.py +2 -0
  171. cirq/sim/clifford/stabilizer_state_ch_form_test.py +2 -0
  172. cirq/sim/density_matrix_simulation_state_test.py +2 -0
  173. cirq/sim/density_matrix_simulator_test.py +3 -0
  174. cirq/sim/density_matrix_utils_test.py +2 -0
  175. cirq/sim/mux_test.py +3 -0
  176. cirq/sim/simulation_product_state_test.py +3 -0
  177. cirq/sim/simulation_state_test.py +2 -0
  178. cirq/sim/simulation_utils.py +2 -0
  179. cirq/sim/simulation_utils_test.py +3 -0
  180. cirq/sim/sparse_simulator_test.py +3 -0
  181. cirq/sim/state_vector_simulation_state_test.py +2 -0
  182. cirq/sim/state_vector_simulator_test.py +2 -0
  183. cirq/sim/state_vector_test.py +3 -0
  184. cirq/study/flatten_expressions_test.py +2 -0
  185. cirq/study/resolver_test.py +2 -0
  186. cirq/study/result_test.py +2 -0
  187. cirq/study/sweepable.py +5 -3
  188. cirq/study/sweepable_test.py +3 -0
  189. cirq/study/sweeps_test.py +3 -0
  190. cirq/testing/circuit_compare.py +2 -0
  191. cirq/testing/circuit_compare_test.py +2 -0
  192. cirq/testing/consistent_act_on.py +9 -3
  193. cirq/testing/consistent_act_on_test.py +2 -0
  194. cirq/testing/consistent_channels.py +2 -0
  195. cirq/testing/consistent_channels_test.py +2 -0
  196. cirq/testing/consistent_controlled_gate_op.py +2 -0
  197. cirq/testing/consistent_decomposition.py +2 -0
  198. cirq/testing/consistent_decomposition_test.py +2 -0
  199. cirq/testing/consistent_pauli_expansion.py +2 -0
  200. cirq/testing/consistent_pauli_expansion_test.py +2 -0
  201. cirq/testing/consistent_phase_by.py +2 -0
  202. cirq/testing/consistent_phase_by_test.py +2 -0
  203. {cirq_core-1.6.0.dev20250519175318.dist-info → cirq_core-1.6.0.dev20250519202416.dist-info}/METADATA +1 -1
  204. {cirq_core-1.6.0.dev20250519175318.dist-info → cirq_core-1.6.0.dev20250519202416.dist-info}/RECORD +207 -207
  205. {cirq_core-1.6.0.dev20250519175318.dist-info → cirq_core-1.6.0.dev20250519202416.dist-info}/WHEEL +0 -0
  206. {cirq_core-1.6.0.dev20250519175318.dist-info → cirq_core-1.6.0.dev20250519202416.dist-info}/licenses/LICENSE +0 -0
  207. {cirq_core-1.6.0.dev20250519175318.dist-info → cirq_core-1.6.0.dev20250519202416.dist-info}/top_level.txt +0 -0
cirq/_version.py CHANGED
@@ -28,4 +28,4 @@ if sys.version_info < (3, 11, 0): # pragma: no cover
28
28
  'of cirq (e.g. "python -m pip install cirq==1.5.0")'
29
29
  )
30
30
 
31
- __version__ = "1.6.0.dev20250519175318"
31
+ __version__ = "1.6.0.dev20250519202416"
cirq/_version_test.py CHANGED
@@ -3,4 +3,4 @@ import cirq
3
3
 
4
4
 
5
5
  def test_version() -> None:
6
- assert cirq.__version__ == "1.6.0.dev20250519175318"
6
+ assert cirq.__version__ == "1.6.0.dev20250519202416"
@@ -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
  """Tests for grid_qubit."""
15
16
 
17
+ from __future__ import annotations
18
+
16
19
  import pickle
17
20
 
18
21
  import numpy as np
@@ -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 cirq
16
18
  from cirq.devices.insertion_noise_model import InsertionNoiseModel
17
19
  from cirq.devices.noise_utils import OpIdentifier, PHYSICAL_GATE_TAG
@@ -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
 
@@ -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 itertools
15
18
  from unittest.mock import MagicMock
16
19
 
@@ -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 List, Tuple
16
18
 
17
19
  import cirq
@@ -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 cirq
16
18
  from cirq.devices.noise_utils import OpIdentifier
17
19
 
@@ -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 Dict, List, Set, Tuple
16
18
 
17
19
  import numpy as np
@@ -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
@@ -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 cirq
16
18
 
17
19
 
@@ -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
  from concurrent import futures
17
19
  from typing import Iterator
@@ -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 itertools
15
18
  from typing import Sequence
16
19
 
@@ -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
  from typing import Sequence
15
18
 
16
19
  import numpy as np
@@ -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 Sequence
16
18
 
17
19
  import numpy as np
@@ -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
 
17
19
  from cirq.experiments import purity_from_probabilities
@@ -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 matplotlib.pyplot as plt
16
18
  import numpy as np
17
19
  import pytest
@@ -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
 
@@ -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 pandas as pd
17
19
  import pytest
@@ -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 pandas as pd
16
18
  import pytest
17
19
  import sympy
@@ -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
  """Wraps Parallel Two Qubit XEB into a few convenience methods."""
16
+
17
+ from __future__ import annotations
18
+
15
19
  import io
16
20
  import itertools
17
21
  from typing import Dict, Optional, Sequence
@@ -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 glob
15
18
  import itertools
16
19
  from typing import Iterable
@@ -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 pandas as pd
17
19
  import pytest
@@ -11,10 +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
- from typing import Iterator
14
+
15
+ from __future__ import annotations
16
+
17
+ from typing import Iterator, TYPE_CHECKING
15
18
 
16
19
  from cirq.interop.quirk.cells.arithmetic_cells import generate_all_arithmetic_cell_makers
17
- from cirq.interop.quirk.cells.cell import CellMaker
18
20
  from cirq.interop.quirk.cells.control_cells import generate_all_control_cell_makers
19
21
  from cirq.interop.quirk.cells.frequency_space_cells import generate_all_frequency_space_cell_makers
20
22
  from cirq.interop.quirk.cells.ignored_cells import generate_all_ignored_cell_makers
@@ -31,6 +33,9 @@ from cirq.interop.quirk.cells.single_qubit_rotation_cells import (
31
33
  from cirq.interop.quirk.cells.swap_cell import generate_all_swap_cell_makers
32
34
  from cirq.interop.quirk.cells.unsupported_cells import generate_all_unsupported_cell_makers
33
35
 
36
+ if TYPE_CHECKING:
37
+ from cirq.interop.quirk.cells.cell import CellMaker
38
+
34
39
 
35
40
  def generate_all_quirk_cell_makers() -> Iterator[CellMaker]:
36
41
  """Yields a `CellMaker` for every known Quirk gate, display, etc."""
@@ -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
  from typing import cast
15
18
 
16
19
  import numpy as np
@@ -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 pytest
15
18
 
16
19
  import cirq
@@ -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 pytest
16
18
 
17
19
  import cirq
@@ -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 cirq
16
18
  from cirq.interop.quirk.cells.testing import assert_url_to_circuit_returns
17
19
 
@@ -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 sympy
16
18
 
17
19
  import cirq
@@ -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
  from typing import Iterator
15
18
 
16
19
  from cirq.interop.quirk.cells.cell import CELL_SIZES, CellMaker
@@ -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 cirq
16
18
  from cirq.interop.quirk.cells.testing import assert_url_to_circuit_returns
17
19
 
@@ -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 pytest
16
18
 
17
19
  from cirq import quirk_url_to_circuit
@@ -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
 
@@ -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 cirq
16
18
  from cirq.interop.quirk.cells.testing import assert_url_to_circuit_returns
17
19
 
@@ -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 cmath
16
18
  import re
17
19
  from typing import (
@@ -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
@@ -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 cirq
16
18
  from cirq.interop.quirk.cells.qubit_permutation_cells import QuirkQubitPermutationGate
17
19
  from cirq.interop.quirk.cells.testing import assert_url_to_circuit_returns
@@ -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 cirq
16
18
  from cirq.interop.quirk.cells.testing import assert_url_to_circuit_returns
17
19
 
@@ -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 sympy
16
18
 
17
19
  import cirq
@@ -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 pytest
16
18
 
17
19
  import cirq
@@ -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 Dict, List, Optional
16
18
 
17
19
  import numpy as np
@@ -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
 
@@ -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
  from typing import Iterator
15
18
 
16
19
  from cirq.interop.quirk.cells.cell import CELL_SIZES, CellMaker
@@ -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 pytest
16
18
 
17
19
  from cirq import quirk_url_to_circuit
@@ -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 json
15
18
  import urllib
16
19
 
@@ -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 numpy as np
15
18
  import pytest
16
19
 
@@ -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 random
16
18
 
17
19
  import numpy as np
@@ -14,6 +14,8 @@
14
14
 
15
15
  """Utility methods for diagonalizing matrices."""
16
16
 
17
+ from __future__ import annotations
18
+
17
19
  from typing import Callable, List, Tuple
18
20
 
19
21
  import numpy as np
@@ -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 random
16
18
  from typing import Optional, Tuple
17
19
 
@@ -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
 
17
19
  import numpy as np
@@ -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 cmath
16
18
 
17
19
  import numpy as np
@@ -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.linalg.tolerance import all_near_zero, all_near_zero_mod, near_zero, near_zero_mod
16
18
 
17
19
 
@@ -14,8 +14,11 @@
14
14
 
15
15
  """Utility methods for transforming matrices or vectors."""
16
16
 
17
+ from __future__ import annotations
18
+
17
19
  import dataclasses
18
20
  import functools
21
+ from types import EllipsisType
19
22
  from typing import Any, List, Optional, Sequence, Tuple, Union
20
23
 
21
24
  import numpy as np
@@ -298,7 +301,7 @@ def targeted_conjugate_about(
298
301
  return targeted_left_multiply(np.conjugate(tensor), first_multiply, conj_indices, out=out)
299
302
 
300
303
 
301
- _TSliceAtom = Union[int, slice, 'ellipsis']
304
+ _TSliceAtom = Union[int, slice, EllipsisType]
302
305
  _TSlice = Union[_TSliceAtom, Sequence[_TSliceAtom]]
303
306
 
304
307
 
@@ -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
 
@@ -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 pytest
16
18
 
17
19
  import cirq
@@ -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 ops
16
18
 
17
19
 
@@ -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 Sequence, Union
16
18
 
17
19
  import numpy as np
@@ -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 functools
15
18
  import itertools
16
19
  import math
@@ -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
@@ -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 re
16
18
 
17
19
  import numpy as np
@@ -14,6 +14,8 @@
14
14
 
15
15
  """Common Gate Families used in cirq-core"""
16
16
 
17
+ from __future__ import annotations
18
+
17
19
  from typing import Any, cast, Optional, Type, Union
18
20
 
19
21
  from cirq import protocols