cirq-core 1.4.0.dev20231219164652__py3-none-any.whl → 1.4.0.dev20231220031403__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of cirq-core might be problematic. Click here for more details.

cirq/_version.py CHANGED
@@ -1 +1 @@
1
- __version__ = "1.4.0.dev20231219164652"
1
+ __version__ = "1.4.0.dev20231220031403"
cirq/ops/pauli_gates.py CHANGED
@@ -15,6 +15,7 @@ import abc
15
15
  from typing import Any, cast, Tuple, TYPE_CHECKING, Union, Dict
16
16
 
17
17
  from cirq._doc import document
18
+ from cirq._import import LazyLoader
18
19
  from cirq.ops import common_gates, raw_types, identity
19
20
  from cirq.type_workarounds import NotImplementedType
20
21
 
@@ -29,6 +30,9 @@ if TYPE_CHECKING:
29
30
  ) # pragma: no cover
30
31
 
31
32
 
33
+ pauli_string = LazyLoader("pauli_string", globals(), "cirq.ops.pauli_string")
34
+
35
+
32
36
  class Pauli(raw_types.Gate, metaclass=abc.ABCMeta):
33
37
  """Represents the Pauli gates.
34
38
 
@@ -97,9 +101,8 @@ class Pauli(raw_types.Gate, metaclass=abc.ABCMeta):
97
101
  """
98
102
  if len(qubits) != 1:
99
103
  raise ValueError(f'Expected a single qubit, got <{qubits!r}>.')
100
- from cirq.ops.pauli_string import SingleQubitPauliStringGateOperation
101
104
 
102
- return SingleQubitPauliStringGateOperation(self, qubits[0])
105
+ return pauli_string.SingleQubitPauliStringGateOperation(self, qubits[0])
103
106
 
104
107
  @property
105
108
  def _canonical_exponent(self):
cirq/ops/pauli_string.py CHANGED
@@ -42,7 +42,7 @@ import numpy as np
42
42
  import sympy
43
43
 
44
44
  import cirq
45
- from cirq import value, protocols, linalg, qis
45
+ from cirq import value, protocols, linalg, qis, _compat
46
46
  from cirq._doc import document
47
47
  from cirq._import import LazyLoader
48
48
  from cirq.ops import (
@@ -184,7 +184,7 @@ class PauliString(raw_types.Operation, Generic[TKey]):
184
184
  Raises:
185
185
  TypeError: If the `qubit_pauli_map` has values that are not Paulis.
186
186
  """
187
- if qubit_pauli_map is not None:
187
+ if _compat.__cirq_debug__.get() and qubit_pauli_map is not None:
188
188
  for v in qubit_pauli_map.values():
189
189
  if not isinstance(v, pauli_gates.Pauli):
190
190
  raise TypeError(f'{v} is not a Pauli')
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: cirq-core
3
- Version: 1.4.0.dev20231219164652
3
+ Version: 1.4.0.dev20231220031403
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
@@ -4,7 +4,7 @@ cirq/_compat_test.py,sha256=iQJYqIP1uyRe8mNUwi2VKccyUaJDFYH7b3Fg6cqQLQw,35053
4
4
  cirq/_doc.py,sha256=yDyWUD_2JDS0gShfGRb-rdqRt9-WeL7DhkqX7np0Nko,2879
5
5
  cirq/_import.py,sha256=p9gMHJscbtDDkfHOaulvd3Aer0pwUF5AXpL89XR8dNw,8402
6
6
  cirq/_import_test.py,sha256=6K_v0riZJXOXUphHNkGA8MY-JcmGlezFaGmvrNhm3OQ,1015
7
- cirq/_version.py,sha256=WlWEBTFV-O3Nt9GPfpKCGaPS3aqo7YbXXQn8rP85tC8,40
7
+ cirq/_version.py,sha256=YwBbJgtb3-L53mlejApd8WL8by1eDdpIYGOfFQE8u7I,40
8
8
  cirq/_version_test.py,sha256=yYS6xm5-nuBRQJa9R3n41WdvFtVyY7Lb5Q8bea3VgBI,133
9
9
  cirq/conftest.py,sha256=X7yLFL8GLhg2CjPw0hp5e_dGASfvHx1-QT03aUbhKJw,1168
10
10
  cirq/json_resolver_cache.py,sha256=S0HaPOCUIck-vNSQlS6KxnQtle6w-2dGuSxkUbJQY9Y,13168
@@ -323,13 +323,13 @@ cirq/ops/parallel_gate.py,sha256=RSj1SuiwbDCMWxvTmi3xz7oE2QXBFgA59emijh4JPkE,633
323
323
  cirq/ops/parallel_gate_test.py,sha256=M6o3AyXFQrwyiOTtGxlYH09TbHdjtTxCuMjmn-ALnn0,6298
324
324
  cirq/ops/parity_gates.py,sha256=JJdw_A9HHiJFVlYfWxp0QPBXtgfHjQYbYH_YFjoU4K4,14208
325
325
  cirq/ops/parity_gates_test.py,sha256=-Ib4GO4njRHanuTMpGvz_zaQf0siUJNNd_tpEYKUOjg,11462
326
- cirq/ops/pauli_gates.py,sha256=Bya7Qh4QiSeoh3OlTQ8bYvh4-Pwg17TMBxoqMrmdrlw,6933
326
+ cirq/ops/pauli_gates.py,sha256=sqqQEKEU89cmb1pzLPnrZ5XC0LchSXid8tHLQs8xJnk,6984
327
327
  cirq/ops/pauli_gates_test.py,sha256=bHt7A2w0auWxN9gyKAVeimT1KeOHz5C_CjFHSK1V-Co,7752
328
328
  cirq/ops/pauli_interaction_gate.py,sha256=GQtK5lRw2Uh7hs2GsoRxe-VMlMTO8PxDeZNVT6_qOWI,5499
329
329
  cirq/ops/pauli_interaction_gate_test.py,sha256=U9ORW5Ayx5PESPFiGESzWY-02qHklYcM1mYW56RWe_A,4544
330
330
  cirq/ops/pauli_measurement_gate.py,sha256=tq_OlHlTLQa6yah--afE2UMNdF4a_vfXi8XT8ww2ELc,7215
331
331
  cirq/ops/pauli_measurement_gate_test.py,sha256=uh3J0Ps3V3578V8qkRiEgIl6jBiv8DsXlk_vzLvOEhQ,6720
332
- cirq/ops/pauli_string.py,sha256=RIVNQ-HO0HYUbfGuTZoIJPoGUZuWb-8msFeOucN5CY4,66564
332
+ cirq/ops/pauli_string.py,sha256=HsiSe2fdwE1aodB3CmGahAAzjvcQDxmC9V8R6BbmhGU,66606
333
333
  cirq/ops/pauli_string_phasor.py,sha256=F1Gftw8TDb9qdJjQti6xxbOpXbFUFCVwn3r8073wRbY,17604
334
334
  cirq/ops/pauli_string_phasor_test.py,sha256=HGEPjPc7ySeshOnMJHNjtyckFuEXLvxgy-TtnU6fETM,27582
335
335
  cirq/ops/pauli_string_raw_types.py,sha256=6CgdPWYmOziP4uZbrIsRW0sDSMmV1GioGdAk0owFITU,2240
@@ -1148,8 +1148,8 @@ cirq/work/sampler.py,sha256=JVv1vvfa6EgFiR3UeDk44U186dCrioH2NZXueCgsb9w,19828
1148
1148
  cirq/work/sampler_test.py,sha256=zo1Hj6sn6fLs_WZMxYRApBqgBsldmptn74NL0jhNukc,12325
1149
1149
  cirq/work/zeros_sampler.py,sha256=x1C7cup66a43n-3tm8QjhiqJa07qcJW10FxNp9jJ59Q,2356
1150
1150
  cirq/work/zeros_sampler_test.py,sha256=JIkpBBFPJe5Ba4142vzogyWyboG1Q1ZAm0UVGgOoZn8,3279
1151
- cirq_core-1.4.0.dev20231219164652.dist-info/LICENSE,sha256=tAkwu8-AdEyGxGoSvJ2gVmQdcicWw3j1ZZueVV74M-E,11357
1152
- cirq_core-1.4.0.dev20231219164652.dist-info/METADATA,sha256=kb2_lvcQHuzgFNzR2JqEPxHmgwsOJU4P7behMIVpoAU,2075
1153
- cirq_core-1.4.0.dev20231219164652.dist-info/WHEEL,sha256=oiQVh_5PnQM0E3gPdiz09WCNmwiHDMaGer_elqB3coM,92
1154
- cirq_core-1.4.0.dev20231219164652.dist-info/top_level.txt,sha256=Sz9iOxHU0IEMLSFGwiwOCaN2e9K-jFbBbtpPN1hB73g,5
1155
- cirq_core-1.4.0.dev20231219164652.dist-info/RECORD,,
1151
+ cirq_core-1.4.0.dev20231220031403.dist-info/LICENSE,sha256=tAkwu8-AdEyGxGoSvJ2gVmQdcicWw3j1ZZueVV74M-E,11357
1152
+ cirq_core-1.4.0.dev20231220031403.dist-info/METADATA,sha256=DqMolVwVykRju41uCQoWz70ThaiR35qKn3JqgfTNHzw,2075
1153
+ cirq_core-1.4.0.dev20231220031403.dist-info/WHEEL,sha256=oiQVh_5PnQM0E3gPdiz09WCNmwiHDMaGer_elqB3coM,92
1154
+ cirq_core-1.4.0.dev20231220031403.dist-info/top_level.txt,sha256=Sz9iOxHU0IEMLSFGwiwOCaN2e9K-jFbBbtpPN1hB73g,5
1155
+ cirq_core-1.4.0.dev20231220031403.dist-info/RECORD,,