cirq-core 1.5.0.dev20250312174327__py3-none-any.whl → 1.5.0.dev20250312231723__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 +1 -1
- cirq/_version_test.py +1 -1
- cirq/circuits/insert_strategy.py +10 -0
- cirq/circuits/insert_strategy_test.py +19 -0
- {cirq_core-1.5.0.dev20250312174327.dist-info → cirq_core-1.5.0.dev20250312231723.dist-info}/METADATA +1 -1
- {cirq_core-1.5.0.dev20250312174327.dist-info → cirq_core-1.5.0.dev20250312231723.dist-info}/RECORD +9 -9
- {cirq_core-1.5.0.dev20250312174327.dist-info → cirq_core-1.5.0.dev20250312231723.dist-info}/LICENSE +0 -0
- {cirq_core-1.5.0.dev20250312174327.dist-info → cirq_core-1.5.0.dev20250312231723.dist-info}/WHEEL +0 -0
- {cirq_core-1.5.0.dev20250312174327.dist-info → cirq_core-1.5.0.dev20250312231723.dist-info}/top_level.txt +0 -0
cirq/_version.py
CHANGED
cirq/_version_test.py
CHANGED
cirq/circuits/insert_strategy.py
CHANGED
|
@@ -23,6 +23,16 @@ class InsertStrategy:
|
|
|
23
23
|
INLINE: 'InsertStrategy'
|
|
24
24
|
EARLIEST: 'InsertStrategy'
|
|
25
25
|
|
|
26
|
+
def __new__(cls, name: str, doc: str) -> 'InsertStrategy':
|
|
27
|
+
inst = getattr(cls, name, None)
|
|
28
|
+
if not inst or not isinstance(inst, cls):
|
|
29
|
+
inst = super().__new__(cls)
|
|
30
|
+
return inst
|
|
31
|
+
|
|
32
|
+
def __getnewargs__(self):
|
|
33
|
+
"""Returns a tuple of args to pass to __new__ when unpickling."""
|
|
34
|
+
return (self.name, self.__doc__)
|
|
35
|
+
|
|
26
36
|
def __init__(self, name: str, doc: str):
|
|
27
37
|
self.name = name
|
|
28
38
|
self.__doc__ = doc
|
|
@@ -12,8 +12,27 @@
|
|
|
12
12
|
# See the License for the specific language governing permissions and
|
|
13
13
|
# limitations under the License.
|
|
14
14
|
|
|
15
|
+
import pickle
|
|
16
|
+
|
|
17
|
+
import pytest
|
|
18
|
+
|
|
15
19
|
import cirq
|
|
16
20
|
|
|
17
21
|
|
|
18
22
|
def test_repr():
|
|
19
23
|
assert repr(cirq.InsertStrategy.NEW) == 'cirq.InsertStrategy.NEW'
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
@pytest.mark.parametrize(
|
|
27
|
+
'strategy',
|
|
28
|
+
[
|
|
29
|
+
cirq.InsertStrategy.NEW,
|
|
30
|
+
cirq.InsertStrategy.NEW_THEN_INLINE,
|
|
31
|
+
cirq.InsertStrategy.INLINE,
|
|
32
|
+
cirq.InsertStrategy.EARLIEST,
|
|
33
|
+
],
|
|
34
|
+
ids=lambda strategy: strategy.name,
|
|
35
|
+
)
|
|
36
|
+
def test_identity_after_pickling(strategy: cirq.InsertStrategy):
|
|
37
|
+
unpickled_strategy = pickle.loads(pickle.dumps(strategy))
|
|
38
|
+
assert unpickled_strategy is strategy
|
{cirq_core-1.5.0.dev20250312174327.dist-info → cirq_core-1.5.0.dev20250312231723.dist-info}/METADATA
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: cirq-core
|
|
3
|
-
Version: 1.5.0.
|
|
3
|
+
Version: 1.5.0.dev20250312231723
|
|
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
|
{cirq_core-1.5.0.dev20250312174327.dist-info → cirq_core-1.5.0.dev20250312231723.dist-info}/RECORD
RENAMED
|
@@ -4,8 +4,8 @@ cirq/_compat_test.py,sha256=Qq3ZcfgD-Nb81cEppQdJqhAyrVqXKtfXZYGXT0p-Wh0,34718
|
|
|
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=
|
|
8
|
-
cirq/_version_test.py,sha256=
|
|
7
|
+
cirq/_version.py,sha256=z3PMGsFFc9loMC8ptHlwdYk8UGjhaVuEedK4uq5i-Yk,1206
|
|
8
|
+
cirq/_version_test.py,sha256=BZSiO6dH779EPZbO1948wunnJ0f4MFOYnuUlL1Ax8ps,147
|
|
9
9
|
cirq/conftest.py,sha256=X7yLFL8GLhg2CjPw0hp5e_dGASfvHx1-QT03aUbhKJw,1168
|
|
10
10
|
cirq/json_resolver_cache.py,sha256=p-vEOa-8GQ2cFIAdze-kd6C1un1uRvtujVPljVKaHBg,13557
|
|
11
11
|
cirq/py.typed,sha256=VFSlmh_lNwnaXzwY-ZuW-C2Ws5PkuDoVgBdNCs0jXJE,63
|
|
@@ -22,8 +22,8 @@ cirq/circuits/circuit_operation_test.py,sha256=SFyM12Ky7-OVwl-jK3OTMMN0DD5hR6tWf
|
|
|
22
22
|
cirq/circuits/circuit_test.py,sha256=AN81b3nvLGOshSaBIDt4-7lghr1MmFtdTa2XePUll6I,163314
|
|
23
23
|
cirq/circuits/frozen_circuit.py,sha256=qSbLHqIszCbVipNZQy4N829v_mWf8N2926cYRzpxGqE,9243
|
|
24
24
|
cirq/circuits/frozen_circuit_test.py,sha256=rHyii8hLhOQ6jdA8dC1OcYPGnyeBC4uY5Q53XspkkCk,4133
|
|
25
|
-
cirq/circuits/insert_strategy.py,sha256=
|
|
26
|
-
cirq/circuits/insert_strategy_test.py,sha256=
|
|
25
|
+
cirq/circuits/insert_strategy.py,sha256=JU_KPe74P3OpbVQei5iDPgEpOjpts5JFKXU5Xy1QYHE,3211
|
|
26
|
+
cirq/circuits/insert_strategy_test.py,sha256=LVtUECfTe59tYO2piuD1kCA6lhI7ioerF7tp2cQ3bnk,1136
|
|
27
27
|
cirq/circuits/moment.py,sha256=Sv1Xxo1LIChH0Da2iHegbthOWd2Ibq0fsnj5ZrqqEkQ,26191
|
|
28
28
|
cirq/circuits/moment_test.py,sha256=oNHNXhiPEoCKbzeh16tRwiW1qZWlg4X2O_uiVDP1D58,27375
|
|
29
29
|
cirq/circuits/optimization_pass.py,sha256=uw3ne0-ebZo6GNjwfQMuQ3b5u9RCgyaXRfhpbljlxao,6468
|
|
@@ -1204,8 +1204,8 @@ cirq/work/sampler.py,sha256=bE5tmVkcR6cZZMLETxDfHehdsYUMbx2RvBeIBetehI4,19187
|
|
|
1204
1204
|
cirq/work/sampler_test.py,sha256=hL2UWx3dz2ukZVNxWftiKVvJcQoLplLZdQm-k1QcA40,13282
|
|
1205
1205
|
cirq/work/zeros_sampler.py,sha256=x1C7cup66a43n-3tm8QjhiqJa07qcJW10FxNp9jJ59Q,2356
|
|
1206
1206
|
cirq/work/zeros_sampler_test.py,sha256=JIkpBBFPJe5Ba4142vzogyWyboG1Q1ZAm0UVGgOoZn8,3279
|
|
1207
|
-
cirq_core-1.5.0.
|
|
1208
|
-
cirq_core-1.5.0.
|
|
1209
|
-
cirq_core-1.5.0.
|
|
1210
|
-
cirq_core-1.5.0.
|
|
1211
|
-
cirq_core-1.5.0.
|
|
1207
|
+
cirq_core-1.5.0.dev20250312231723.dist-info/LICENSE,sha256=tAkwu8-AdEyGxGoSvJ2gVmQdcicWw3j1ZZueVV74M-E,11357
|
|
1208
|
+
cirq_core-1.5.0.dev20250312231723.dist-info/METADATA,sha256=4CnLvSMX4vKnQBmMMDqbH9HTeUbDczPIDuyLZa0eJsI,4817
|
|
1209
|
+
cirq_core-1.5.0.dev20250312231723.dist-info/WHEEL,sha256=tZoeGjtWxWRfdplE7E3d45VPlLNQnvbKiYnx7gwAy8A,92
|
|
1210
|
+
cirq_core-1.5.0.dev20250312231723.dist-info/top_level.txt,sha256=Sz9iOxHU0IEMLSFGwiwOCaN2e9K-jFbBbtpPN1hB73g,5
|
|
1211
|
+
cirq_core-1.5.0.dev20250312231723.dist-info/RECORD,,
|
{cirq_core-1.5.0.dev20250312174327.dist-info → cirq_core-1.5.0.dev20250312231723.dist-info}/LICENSE
RENAMED
|
File without changes
|
{cirq_core-1.5.0.dev20250312174327.dist-info → cirq_core-1.5.0.dev20250312231723.dist-info}/WHEEL
RENAMED
|
File without changes
|
|
File without changes
|