cirq-core 1.6.0.dev20250515174529__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.

Files changed (98) hide show
  1. cirq/_compat.py +3 -0
  2. cirq/_doc.py +2 -0
  3. cirq/_import.py +2 -0
  4. cirq/_import_test.py +2 -0
  5. cirq/_version.py +1 -1
  6. cirq/_version_test.py +1 -1
  7. cirq/circuits/_block_diagram_drawer.py +2 -0
  8. cirq/circuits/_block_diagram_drawer_test.py +2 -0
  9. cirq/circuits/_box_drawing_character_data.py +2 -0
  10. cirq/circuits/_box_drawing_character_data_test.py +2 -0
  11. cirq/circuits/_bucket_priority_queue.py +2 -0
  12. cirq/circuits/_bucket_priority_queue_test.py +2 -0
  13. cirq/circuits/circuit_operation_test.py +3 -0
  14. cirq/circuits/circuit_test.py +2 -0
  15. cirq/circuits/frozen_circuit_test.py +2 -0
  16. cirq/circuits/insert_strategy_test.py +2 -0
  17. cirq/circuits/moment_test.py +2 -0
  18. cirq/circuits/optimization_pass_test.py +2 -0
  19. cirq/circuits/qasm_output_test.py +3 -0
  20. cirq/circuits/text_diagram_drawer_test.py +2 -0
  21. cirq/contrib/acquaintance/bipartite_test.py +2 -0
  22. cirq/contrib/acquaintance/devices_test.py +2 -0
  23. cirq/contrib/acquaintance/executor_test.py +2 -0
  24. cirq/contrib/acquaintance/inspection_utils_test.py +2 -0
  25. cirq/contrib/acquaintance/mutation_utils_test.py +2 -0
  26. cirq/contrib/acquaintance/optimizers_test.py +3 -0
  27. cirq/contrib/acquaintance/permutation_test.py +2 -0
  28. cirq/contrib/acquaintance/shift_swap_network_test.py +2 -0
  29. cirq/contrib/acquaintance/shift_test.py +2 -0
  30. cirq/contrib/acquaintance/strategies/cubic_test.py +2 -0
  31. cirq/contrib/acquaintance/strategies/quartic_paired_test.py +2 -0
  32. cirq/contrib/acquaintance/testing.py +2 -0
  33. cirq/contrib/acquaintance/topological_sort_test.py +2 -0
  34. cirq/contrib/bayesian_network/bayesian_network_gate_test.py +3 -0
  35. cirq/contrib/circuitdag/circuit_dag_test.py +2 -0
  36. cirq/contrib/graph_device/graph_device_test.py +2 -0
  37. cirq/contrib/graph_device/hypergraph_test.py +2 -0
  38. cirq/contrib/graph_device/uniform_graph_device.py +2 -0
  39. cirq/contrib/graph_device/uniform_graph_device_test.py +2 -0
  40. cirq/contrib/hacks/disable_validation.py +2 -0
  41. cirq/contrib/hacks/disable_validation_test.py +2 -0
  42. cirq/contrib/json.py +2 -0
  43. cirq/contrib/json_test.py +3 -0
  44. cirq/contrib/noise_models/noise_models_test.py +2 -0
  45. cirq/contrib/paulistring/clifford_optimize.py +2 -0
  46. cirq/contrib/paulistring/clifford_optimize_test.py +2 -0
  47. cirq/contrib/paulistring/clifford_target_gateset_test.py +2 -0
  48. cirq/contrib/paulistring/optimize.py +2 -0
  49. cirq/contrib/paulistring/optimize_test.py +2 -0
  50. cirq/contrib/paulistring/pauli_string_dag.py +2 -0
  51. cirq/contrib/paulistring/pauli_string_dag_test.py +2 -0
  52. cirq/contrib/paulistring/pauli_string_optimize.py +5 -1
  53. cirq/contrib/paulistring/pauli_string_optimize_test.py +2 -0
  54. cirq/contrib/paulistring/recombine.py +2 -0
  55. cirq/contrib/paulistring/recombine_test.py +2 -0
  56. cirq/contrib/paulistring/separate.py +2 -0
  57. cirq/contrib/paulistring/separate_test.py +2 -0
  58. cirq/contrib/qasm_import/_lexer.py +2 -0
  59. cirq/contrib/qasm_import/_lexer_test.py +2 -0
  60. cirq/contrib/qasm_import/_parser.py +2 -0
  61. cirq/contrib/qasm_import/_parser_test.py +2 -0
  62. cirq/contrib/qasm_import/exception.py +2 -0
  63. cirq/contrib/qasm_import/qasm.py +6 -2
  64. cirq/contrib/qasm_import/qasm_test.py +3 -0
  65. cirq/contrib/qcircuit/qcircuit_diagram_info.py +2 -0
  66. cirq/contrib/qcircuit/qcircuit_diagram_info_test.py +2 -0
  67. cirq/contrib/qcircuit/qcircuit_pdf.py +7 -2
  68. cirq/contrib/qcircuit/qcircuit_pdf_test.py +2 -0
  69. cirq/contrib/qcircuit/qcircuit_test.py +2 -0
  70. cirq/contrib/quantum_volume/quantum_volume.py +2 -0
  71. cirq/contrib/quantum_volume/quantum_volume_test.py +2 -0
  72. cirq/contrib/quimb/density_matrix_test.py +3 -0
  73. cirq/contrib/quimb/grid_circuits.py +2 -0
  74. cirq/contrib/quimb/grid_circuits_test.py +3 -0
  75. cirq/contrib/quimb/mps_simulator_test.py +3 -0
  76. cirq/contrib/quimb/state_vector_test.py +3 -0
  77. cirq/contrib/quirk/export_to_quirk.py +2 -0
  78. cirq/contrib/quirk/export_to_quirk_test.py +2 -0
  79. cirq/contrib/quirk/linearize_circuit.py +2 -0
  80. cirq/contrib/routing/device.py +2 -0
  81. cirq/contrib/routing/device_test.py +2 -0
  82. cirq/contrib/routing/greedy_test.py +2 -0
  83. cirq/contrib/routing/initialization_test.py +2 -0
  84. cirq/contrib/routing/router.py +4 -2
  85. cirq/contrib/routing/router_test.py +2 -0
  86. cirq/contrib/routing/swap_network_test.py +2 -0
  87. cirq/contrib/routing/utils_test.py +3 -0
  88. cirq/contrib/shuffle_circuits/shuffle_circuits_with_readout_benchmarking.py +4 -2
  89. cirq/contrib/shuffle_circuits/shuffle_circuits_with_readout_benchmarking_test.py +3 -0
  90. cirq/contrib/svg/svg_test.py +3 -0
  91. cirq/devices/device_test.py +3 -0
  92. cirq/devices/grid_device_metadata_test.py +3 -0
  93. cirq/ops/pauli_string_phasor.py +1 -1
  94. {cirq_core-1.6.0.dev20250515174529.dist-info → cirq_core-1.6.0.dev20250516060316.dist-info}/METADATA +1 -1
  95. {cirq_core-1.6.0.dev20250515174529.dist-info → cirq_core-1.6.0.dev20250516060316.dist-info}/RECORD +98 -98
  96. {cirq_core-1.6.0.dev20250515174529.dist-info → cirq_core-1.6.0.dev20250516060316.dist-info}/WHEEL +0 -0
  97. {cirq_core-1.6.0.dev20250515174529.dist-info → cirq_core-1.6.0.dev20250516060316.dist-info}/licenses/LICENSE +0 -0
  98. {cirq_core-1.6.0.dev20250515174529.dist-info → cirq_core-1.6.0.dev20250516060316.dist-info}/top_level.txt +0 -0
@@ -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
 
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
  from typing import Optional, Tuple
16
18
 
17
19
  from cirq import ops, protocols
@@ -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
  import cirq.contrib.qcircuit as ccq
17
19
 
@@ -13,17 +13,22 @@
13
13
  # limitations under the License.
14
14
 
15
15
 
16
+ from __future__ import annotations
17
+
16
18
  import errno
17
19
  import os
20
+ from typing import TYPE_CHECKING
18
21
 
19
22
  from pylatex import Document, NoEscape, Package
20
23
 
21
- from cirq import circuits
22
24
  from cirq.contrib.qcircuit.qcircuit_diagram import circuit_to_latex_using_qcircuit
23
25
 
26
+ if TYPE_CHECKING:
27
+ import cirq
28
+
24
29
 
25
30
  def circuit_to_pdf_using_qcircuit_via_tex(
26
- circuit: circuits.Circuit,
31
+ circuit: cirq.Circuit,
27
32
  filepath: str,
28
33
  pdf_kwargs=None,
29
34
  qcircuit_kwargs=None,
@@ -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 unittest import mock
16
18
 
17
19
  import pylatex
@@ -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
  import cirq.contrib.qcircuit as ccq
17
19
  import cirq.testing as ct
@@ -3,6 +3,8 @@
3
3
  https://arxiv.org/abs/1811.12926.
4
4
  """
5
5
 
6
+ from __future__ import annotations
7
+
6
8
  from dataclasses import dataclass
7
9
  from typing import Callable, Dict, List, Optional, Set, Tuple
8
10
 
@@ -1,6 +1,8 @@
1
1
  # pylint: disable=wrong-or-nonexistent-copyright-notice
2
2
  """Tests for the Quantum Volume utilities."""
3
3
 
4
+ from __future__ import annotations
5
+
4
6
  import io
5
7
  from unittest.mock import MagicMock, Mock
6
8
 
@@ -1,4 +1,7 @@
1
1
  # pylint: disable=wrong-or-nonexistent-copyright-notice
2
+
3
+ from __future__ import annotations
4
+
2
5
  import numpy as np
3
6
 
4
7
  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 Iterator
16
18
 
17
19
  import networkx as nx
@@ -1,4 +1,7 @@
1
1
  # pylint: disable=wrong-or-nonexistent-copyright-notice
2
+
3
+ from __future__ import annotations
4
+
2
5
  import networkx as nx
3
6
  import numpy as np
4
7
  import pytest
@@ -1,4 +1,7 @@
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
7
 
@@ -1,4 +1,7 @@
1
1
  # pylint: disable=wrong-or-nonexistent-copyright-notice
2
+
3
+ from __future__ import annotations
4
+
2
5
  import functools
3
6
  import operator
4
7
 
@@ -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 json
16
18
  import urllib.parse
17
19
  from typing import Any, cast, Iterable, List, Tuple
@@ -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
  import sympy
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 Callable
16
18
 
17
19
  from cirq import circuits, devices, ops
@@ -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 typing import Dict, Iterable, 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 networkx as nx
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
  from multiprocessing import Process
16
18
 
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 random
16
18
 
17
19
  import networkx as nx
@@ -14,13 +14,15 @@
14
14
 
15
15
  from __future__ import annotations
16
16
 
17
- from typing import Callable, Optional
17
+ from typing import Callable, Optional, TYPE_CHECKING
18
18
 
19
19
  import networkx as nx
20
20
 
21
21
  from cirq import circuits, protocols
22
22
  from cirq.contrib.routing.greedy import route_circuit_greedily
23
- from cirq.contrib.routing.swap_network import SwapNetwork
23
+
24
+ if TYPE_CHECKING:
25
+ from cirq.contrib.routing.swap_network import SwapNetwork
24
26
 
25
27
  ROUTERS = {'greedy': route_circuit_greedily}
26
28
 
@@ -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
 
@@ -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 pytest
@@ -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 networkx as nx
15
18
  import pytest
16
19
 
@@ -17,13 +17,15 @@
17
17
  from __future__ import annotations
18
18
 
19
19
  import time
20
- from typing import Dict, List, Optional, Tuple, Union
20
+ from typing import Dict, List, Optional, Tuple, TYPE_CHECKING, Union
21
21
 
22
22
  import numpy as np
23
23
 
24
24
  from cirq import circuits, ops, protocols, work
25
25
  from cirq.experiments import SingleQubitReadoutCalibrationResult
26
- from cirq.study import ResultDict
26
+
27
+ if TYPE_CHECKING:
28
+ from cirq.study import ResultDict
27
29
 
28
30
 
29
31
  def _validate_input(
@@ -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
 
16
19
  import numpy as np
@@ -1,4 +1,7 @@
1
1
  # pylint: disable=wrong-or-nonexistent-copyright-notice
2
+
3
+ from __future__ import annotations
4
+
2
5
  import IPython.display
3
6
  import numpy as np
4
7
  import pytest
@@ -1,4 +1,7 @@
1
1
  # pylint: disable=wrong-or-nonexistent-copyright-notice
2
+
3
+ from __future__ import annotations
4
+
2
5
  import networkx as nx
3
6
 
4
7
  import cirq
@@ -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 GridDevicemetadata."""
15
16
 
17
+ from __future__ import annotations
18
+
16
19
  import networkx as nx
17
20
  import pytest
18
21
 
@@ -199,7 +199,7 @@ class PauliStringPhasor(gate_operation.GateOperation):
199
199
  syms = tuple(sym(qubit) for qubit in qubits)
200
200
  return protocols.CircuitDiagramInfo(wire_symbols=syms, exponent=self.exponent_relative)
201
201
 
202
- def conjugated_by(self, clifford: 'cirq.OP_TREE') -> 'PauliStringPhasor':
202
+ def conjugated_by(self, clifford: cirq.OP_TREE) -> PauliStringPhasor:
203
203
  r"""Returns the Pauli string conjugated by a clifford operation.
204
204
 
205
205
  The PauliStringPhasor $P$ conjugated by the Clifford operation $C$ is
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: cirq-core
3
- Version: 1.6.0.dev20250515174529
3
+ Version: 1.6.0.dev20250516060316
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