cirq-core 1.6.0.dev20250515172309__py3-none-any.whl → 1.6.0.dev20250516060316__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/_compat.py +4 -1
- cirq/_doc.py +2 -0
- cirq/_import.py +2 -0
- cirq/_import_test.py +2 -0
- cirq/_version.py +6 -6
- cirq/_version_test.py +1 -1
- cirq/circuits/_block_diagram_drawer.py +2 -0
- cirq/circuits/_block_diagram_drawer_test.py +2 -0
- cirq/circuits/_box_drawing_character_data.py +2 -0
- cirq/circuits/_box_drawing_character_data_test.py +2 -0
- cirq/circuits/_bucket_priority_queue.py +2 -0
- cirq/circuits/_bucket_priority_queue_test.py +2 -0
- cirq/circuits/circuit_operation_test.py +3 -0
- cirq/circuits/circuit_test.py +2 -0
- cirq/circuits/frozen_circuit_test.py +2 -0
- cirq/circuits/insert_strategy_test.py +2 -0
- cirq/circuits/moment_test.py +2 -0
- cirq/circuits/optimization_pass_test.py +2 -0
- cirq/circuits/qasm_output_test.py +3 -0
- cirq/circuits/text_diagram_drawer_test.py +2 -0
- cirq/contrib/acquaintance/bipartite_test.py +2 -0
- cirq/contrib/acquaintance/devices_test.py +2 -0
- cirq/contrib/acquaintance/executor_test.py +2 -0
- cirq/contrib/acquaintance/inspection_utils_test.py +2 -0
- cirq/contrib/acquaintance/mutation_utils_test.py +2 -0
- cirq/contrib/acquaintance/optimizers_test.py +3 -0
- cirq/contrib/acquaintance/permutation_test.py +2 -0
- cirq/contrib/acquaintance/shift_swap_network_test.py +2 -0
- cirq/contrib/acquaintance/shift_test.py +2 -0
- cirq/contrib/acquaintance/strategies/cubic_test.py +2 -0
- cirq/contrib/acquaintance/strategies/quartic_paired_test.py +2 -0
- cirq/contrib/acquaintance/testing.py +2 -0
- cirq/contrib/acquaintance/topological_sort_test.py +2 -0
- cirq/contrib/bayesian_network/bayesian_network_gate_test.py +3 -0
- cirq/contrib/circuitdag/circuit_dag_test.py +2 -0
- cirq/contrib/graph_device/graph_device_test.py +2 -0
- cirq/contrib/graph_device/hypergraph_test.py +2 -0
- cirq/contrib/graph_device/uniform_graph_device.py +2 -0
- cirq/contrib/graph_device/uniform_graph_device_test.py +2 -0
- cirq/contrib/hacks/disable_validation.py +2 -0
- cirq/contrib/hacks/disable_validation_test.py +2 -0
- cirq/contrib/json.py +2 -0
- cirq/contrib/json_test.py +3 -0
- cirq/contrib/noise_models/noise_models_test.py +2 -0
- cirq/contrib/paulistring/clifford_optimize.py +2 -0
- cirq/contrib/paulistring/clifford_optimize_test.py +2 -0
- cirq/contrib/paulistring/clifford_target_gateset_test.py +2 -0
- cirq/contrib/paulistring/optimize.py +2 -0
- cirq/contrib/paulistring/optimize_test.py +2 -0
- cirq/contrib/paulistring/pauli_string_dag.py +2 -0
- cirq/contrib/paulistring/pauli_string_dag_test.py +2 -0
- cirq/contrib/paulistring/pauli_string_optimize.py +5 -1
- cirq/contrib/paulistring/pauli_string_optimize_test.py +2 -0
- cirq/contrib/paulistring/recombine.py +2 -0
- cirq/contrib/paulistring/recombine_test.py +2 -0
- cirq/contrib/paulistring/separate.py +2 -0
- cirq/contrib/paulistring/separate_test.py +2 -0
- cirq/contrib/qasm_import/_lexer.py +2 -0
- cirq/contrib/qasm_import/_lexer_test.py +2 -0
- cirq/contrib/qasm_import/_parser.py +2 -0
- cirq/contrib/qasm_import/_parser_test.py +2 -0
- cirq/contrib/qasm_import/exception.py +2 -0
- cirq/contrib/qasm_import/qasm.py +6 -2
- cirq/contrib/qasm_import/qasm_test.py +3 -0
- cirq/contrib/qcircuit/qcircuit_diagram_info.py +2 -0
- cirq/contrib/qcircuit/qcircuit_diagram_info_test.py +2 -0
- cirq/contrib/qcircuit/qcircuit_pdf.py +7 -2
- cirq/contrib/qcircuit/qcircuit_pdf_test.py +2 -0
- cirq/contrib/qcircuit/qcircuit_test.py +2 -0
- cirq/contrib/quantum_volume/quantum_volume.py +2 -0
- cirq/contrib/quantum_volume/quantum_volume_test.py +2 -0
- cirq/contrib/quimb/density_matrix_test.py +3 -0
- cirq/contrib/quimb/grid_circuits.py +2 -0
- cirq/contrib/quimb/grid_circuits_test.py +3 -0
- cirq/contrib/quimb/mps_simulator_test.py +3 -0
- cirq/contrib/quimb/state_vector_test.py +3 -0
- cirq/contrib/quirk/export_to_quirk.py +2 -0
- cirq/contrib/quirk/export_to_quirk_test.py +2 -0
- cirq/contrib/quirk/linearize_circuit.py +2 -0
- cirq/contrib/routing/device.py +2 -0
- cirq/contrib/routing/device_test.py +2 -0
- cirq/contrib/routing/greedy_test.py +2 -0
- cirq/contrib/routing/initialization_test.py +2 -0
- cirq/contrib/routing/router.py +4 -2
- cirq/contrib/routing/router_test.py +2 -0
- cirq/contrib/routing/swap_network_test.py +2 -0
- cirq/contrib/routing/utils_test.py +3 -0
- cirq/contrib/shuffle_circuits/shuffle_circuits_with_readout_benchmarking.py +4 -2
- cirq/contrib/shuffle_circuits/shuffle_circuits_with_readout_benchmarking_test.py +3 -0
- cirq/contrib/svg/svg_test.py +3 -0
- cirq/devices/device_test.py +3 -0
- cirq/devices/grid_device_metadata_test.py +3 -0
- cirq/ops/pauli_string_phasor.py +1 -1
- {cirq_core-1.6.0.dev20250515172309.dist-info → cirq_core-1.6.0.dev20250516060316.dist-info}/METADATA +2 -3
- {cirq_core-1.6.0.dev20250515172309.dist-info → cirq_core-1.6.0.dev20250516060316.dist-info}/RECORD +98 -98
- {cirq_core-1.6.0.dev20250515172309.dist-info → cirq_core-1.6.0.dev20250516060316.dist-info}/WHEEL +0 -0
- {cirq_core-1.6.0.dev20250515172309.dist-info → cirq_core-1.6.0.dev20250516060316.dist-info}/licenses/LICENSE +0 -0
- {cirq_core-1.6.0.dev20250515172309.dist-info → cirq_core-1.6.0.dev20250516060316.dist-info}/top_level.txt +0 -0
cirq/_compat.py
CHANGED
|
@@ -13,6 +13,9 @@
|
|
|
13
13
|
# limitations under the License.
|
|
14
14
|
|
|
15
15
|
"""Workarounds for compatibility issues between versions and libraries."""
|
|
16
|
+
|
|
17
|
+
from __future__ import annotations
|
|
18
|
+
|
|
16
19
|
import contextlib
|
|
17
20
|
import contextvars
|
|
18
21
|
import dataclasses
|
|
@@ -534,7 +537,7 @@ class DeprecatedModuleLoader(importlib.abc.Loader):
|
|
|
534
537
|
sys.modules[self.old_module_name] = sys.modules[self.new_module_name]
|
|
535
538
|
return sys.modules[self.old_module_name]
|
|
536
539
|
method(self.new_module_name)
|
|
537
|
-
# https://docs.python.org/3.
|
|
540
|
+
# https://docs.python.org/3.11/library/importlib.html#importlib.abc.Loader.load_module
|
|
538
541
|
assert self.new_module_name in sys.modules, (
|
|
539
542
|
f"Wrapped loader {self.loader} was "
|
|
540
543
|
f"expected to insert "
|
cirq/_doc.py
CHANGED
cirq/_import.py
CHANGED
cirq/_import_test.py
CHANGED
cirq/_version.py
CHANGED
|
@@ -13,19 +13,19 @@
|
|
|
13
13
|
# limitations under the License.
|
|
14
14
|
|
|
15
15
|
"""Define version number here, read it from setup.py automatically,
|
|
16
|
-
and warn users that the latest version of cirq uses python 3.
|
|
16
|
+
and warn users that the latest version of cirq uses python 3.11+"""
|
|
17
17
|
|
|
18
18
|
import sys
|
|
19
19
|
|
|
20
|
-
if sys.version_info < (3,
|
|
20
|
+
if sys.version_info < (3, 11, 0): # pragma: no cover
|
|
21
21
|
raise SystemError(
|
|
22
|
-
"You installed the latest version of cirq but aren't on python 3.
|
|
22
|
+
"You installed the latest version of cirq but aren't on python 3.11+.\n"
|
|
23
23
|
'To fix this error, you need to either:\n'
|
|
24
24
|
'\n'
|
|
25
|
-
'A) Update to python 3.
|
|
25
|
+
'A) Update to python 3.11 or later.\n'
|
|
26
26
|
'- OR -\n'
|
|
27
27
|
'B) Explicitly install an older deprecated-but-compatible version '
|
|
28
|
-
'of cirq (e.g. "python -m pip install cirq==1.
|
|
28
|
+
'of cirq (e.g. "python -m pip install cirq==1.5.0")'
|
|
29
29
|
)
|
|
30
30
|
|
|
31
|
-
__version__ = "1.6.0.
|
|
31
|
+
__version__ = "1.6.0.dev20250516060316"
|
cirq/_version_test.py
CHANGED
|
@@ -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, Generic, Iterable, Iterator, List, Optional, Set, Tuple, TypeVar
|
|
16
18
|
|
|
17
19
|
TItem = TypeVar('TItem')
|
|
@@ -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 unittest.mock as mock
|
|
15
18
|
from typing import Optional
|
|
16
19
|
|
cirq/circuits/circuit_test.py
CHANGED
cirq/circuits/moment_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 os
|
|
15
18
|
import re
|
|
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 itertools import combinations
|
|
16
18
|
from string import ascii_lowercase
|
|
17
19
|
from typing import Dict, Sequence, Tuple
|
|
@@ -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 cirq
|
|
15
18
|
import cirq.contrib.acquaintance as cca
|
|
16
19
|
import cirq.testing as ct
|
|
@@ -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
|
|
cirq/contrib/json.py
CHANGED
cirq/contrib/json_test.py
CHANGED
|
@@ -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.contrib.paulistring import convert_and_separate_circuit, pauli_string_dag_from_circuit
|
|
17
19
|
|
|
@@ -14,15 +14,19 @@
|
|
|
14
14
|
|
|
15
15
|
from __future__ import annotations
|
|
16
16
|
|
|
17
|
+
from typing import TYPE_CHECKING
|
|
18
|
+
|
|
17
19
|
import networkx
|
|
18
20
|
|
|
19
21
|
from cirq import circuits, linalg
|
|
20
|
-
from cirq.contrib import circuitdag
|
|
21
22
|
from cirq.contrib.paulistring.pauli_string_dag import pauli_string_dag_from_circuit
|
|
22
23
|
from cirq.contrib.paulistring.recombine import move_pauli_strings_into_circuit
|
|
23
24
|
from cirq.contrib.paulistring.separate import convert_and_separate_circuit
|
|
24
25
|
from cirq.ops import PauliStringGateOperation
|
|
25
26
|
|
|
27
|
+
if TYPE_CHECKING:
|
|
28
|
+
from cirq.contrib import circuitdag
|
|
29
|
+
|
|
26
30
|
|
|
27
31
|
def pauli_string_optimized_circuit(
|
|
28
32
|
circuit: circuits.Circuit, move_cliffords: bool = True, atol: float = 1e-8
|
|
@@ -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.contrib.paulistring import CliffordTargetGateset, pauli_string_optimized_circuit
|
|
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 Any, Callable, cast, Iterable, List, Sequence, Tuple, Union
|
|
16
18
|
|
|
17
19
|
from cirq import circuits, ops, protocols
|