cirq-core 1.7.0.dev20251021231621__py3-none-any.whl → 1.7.0.dev20251027162822__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/experiments/z_phase_calibration_test.py +18 -3
- {cirq_core-1.7.0.dev20251021231621.dist-info → cirq_core-1.7.0.dev20251027162822.dist-info}/METADATA +1 -1
- {cirq_core-1.7.0.dev20251021231621.dist-info → cirq_core-1.7.0.dev20251027162822.dist-info}/RECORD +8 -8
- {cirq_core-1.7.0.dev20251021231621.dist-info → cirq_core-1.7.0.dev20251027162822.dist-info}/WHEEL +0 -0
- {cirq_core-1.7.0.dev20251021231621.dist-info → cirq_core-1.7.0.dev20251027162822.dist-info}/licenses/LICENSE +0 -0
- {cirq_core-1.7.0.dev20251021231621.dist-info → cirq_core-1.7.0.dev20251027162822.dist-info}/top_level.txt +0 -0
cirq/_version.py
CHANGED
cirq/_version_test.py
CHANGED
|
@@ -14,6 +14,9 @@
|
|
|
14
14
|
|
|
15
15
|
from __future__ import annotations
|
|
16
16
|
|
|
17
|
+
import multiprocessing
|
|
18
|
+
from typing import Iterator
|
|
19
|
+
|
|
17
20
|
import numpy as np
|
|
18
21
|
import pandas as pd
|
|
19
22
|
import pytest
|
|
@@ -31,6 +34,15 @@ _ANGLES = ['theta', 'phi', 'chi', 'zeta', 'gamma']
|
|
|
31
34
|
# fix random generator seed to ensure reproducibility and faster convergence
|
|
32
35
|
_SEED = 276154030
|
|
33
36
|
|
|
37
|
+
_POOL_NUM_PROCESSES = min(4, multiprocessing.cpu_count())
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
@pytest.fixture
|
|
41
|
+
def pool() -> Iterator[multiprocessing.pool.Pool]:
|
|
42
|
+
ctx = multiprocessing.get_context()
|
|
43
|
+
with ctx.Pool(_POOL_NUM_PROCESSES) as pool:
|
|
44
|
+
yield pool
|
|
45
|
+
|
|
34
46
|
|
|
35
47
|
def _create_tests(n, with_options: bool = False):
|
|
36
48
|
rng = np.random.default_rng(_SEED)
|
|
@@ -88,7 +100,7 @@ class _TestSimulator(cirq.Simulator):
|
|
|
88
100
|
@pytest.mark.parametrize(
|
|
89
101
|
['angles', 'error', 'characterization_flags'], _create_tests(n=10, with_options=True)
|
|
90
102
|
)
|
|
91
|
-
def test_calibrate_z_phases(angles, error, characterization_flags) -> None:
|
|
103
|
+
def test_calibrate_z_phases(pool, angles, error, characterization_flags) -> None:
|
|
92
104
|
|
|
93
105
|
original_gate = cirq.PhasedFSimGate(**{k: v for k, v in zip(_ANGLES, angles)})
|
|
94
106
|
actual_gate = cirq.PhasedFSimGate(**{k: v + e for k, v, e in zip(_ANGLES, angles, error)})
|
|
@@ -109,6 +121,7 @@ def test_calibrate_z_phases(angles, error, characterization_flags) -> None:
|
|
|
109
121
|
n_circuits=10,
|
|
110
122
|
cycle_depths=range(3, 10),
|
|
111
123
|
random_state=_SEED,
|
|
124
|
+
num_workers_or_pool=pool,
|
|
112
125
|
)[qubits]
|
|
113
126
|
|
|
114
127
|
initial_unitary = cirq.unitary(original_gate)
|
|
@@ -127,7 +140,7 @@ def test_calibrate_z_phases(angles, error, characterization_flags) -> None:
|
|
|
127
140
|
|
|
128
141
|
|
|
129
142
|
@pytest.mark.parametrize(['angles', 'error'], _create_tests(n=3))
|
|
130
|
-
def test_calibrate_z_phases_no_options(angles, error) -> None:
|
|
143
|
+
def test_calibrate_z_phases_no_options(pool, angles, error) -> None:
|
|
131
144
|
|
|
132
145
|
original_gate = cirq.PhasedFSimGate(**{k: v for k, v in zip(_ANGLES, angles)})
|
|
133
146
|
actual_gate = cirq.PhasedFSimGate(**{k: v + e for k, v, e in zip(_ANGLES, angles, error)})
|
|
@@ -144,6 +157,7 @@ def test_calibrate_z_phases_no_options(angles, error) -> None:
|
|
|
144
157
|
n_circuits=10,
|
|
145
158
|
cycle_depths=range(3, 10),
|
|
146
159
|
random_state=_SEED,
|
|
160
|
+
num_workers_or_pool=pool,
|
|
147
161
|
)[qubits]
|
|
148
162
|
|
|
149
163
|
initial_unitary = cirq.unitary(original_gate)
|
|
@@ -162,7 +176,7 @@ def test_calibrate_z_phases_no_options(angles, error) -> None:
|
|
|
162
176
|
|
|
163
177
|
|
|
164
178
|
@pytest.mark.parametrize(['angles', 'error'], _create_tests(n=3))
|
|
165
|
-
def test_calibrate_z_phases_workflow_no_options(angles, error) -> None:
|
|
179
|
+
def test_calibrate_z_phases_workflow_no_options(pool, angles, error) -> None:
|
|
166
180
|
|
|
167
181
|
original_gate = cirq.PhasedFSimGate(**{k: v for k, v in zip(_ANGLES, angles)})
|
|
168
182
|
actual_gate = cirq.PhasedFSimGate(**{k: v + e for k, v, e in zip(_ANGLES, angles, error)})
|
|
@@ -179,6 +193,7 @@ def test_calibrate_z_phases_workflow_no_options(angles, error) -> None:
|
|
|
179
193
|
n_circuits=1,
|
|
180
194
|
cycle_depths=(1, 2),
|
|
181
195
|
random_state=_SEED,
|
|
196
|
+
num_workers_or_pool=pool,
|
|
182
197
|
)
|
|
183
198
|
|
|
184
199
|
for params in result.final_params.values():
|
{cirq_core-1.7.0.dev20251021231621.dist-info → cirq_core-1.7.0.dev20251027162822.dist-info}/METADATA
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: cirq-core
|
|
3
|
-
Version: 1.7.0.
|
|
3
|
+
Version: 1.7.0.dev20251027162822
|
|
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.7.0.dev20251021231621.dist-info → cirq_core-1.7.0.dev20251027162822.dist-info}/RECORD
RENAMED
|
@@ -4,8 +4,8 @@ cirq/_compat_test.py,sha256=emXpdD5ZvwLRlFAoQB8YatmZyU3b4e9jg6FppMTUhkU,33900
|
|
|
4
4
|
cirq/_doc.py,sha256=28ZskY9ZtZ_4GS1oXPUgklKnJqmAE-rkUfzcsJ0--nA,2941
|
|
5
5
|
cirq/_import.py,sha256=ixBu4EyGl46Ram2cP3p5eZVEFDW5L2DS-VyTjz4N9iw,8429
|
|
6
6
|
cirq/_import_test.py,sha256=oF4izzOVZLc7NZ0aZHFcGv-r01eiFFt_JORx_x7_D4s,1089
|
|
7
|
-
cirq/_version.py,sha256=
|
|
8
|
-
cirq/_version_test.py,sha256=
|
|
7
|
+
cirq/_version.py,sha256=YZ3K61lLuudNMig01mU6UkTsKc6TqlsguO2zINYEkzc,1206
|
|
8
|
+
cirq/_version_test.py,sha256=r6YOhfLk1Z0beBDJUSyFgnLG2qBwGdEQWGRP84Kz7ig,155
|
|
9
9
|
cirq/conftest.py,sha256=wSDKNdIQRDfLnXvOCWD3erheOw8JHRhdfQ53EyTUIXg,1239
|
|
10
10
|
cirq/json_resolver_cache.py,sha256=A5DIgFAY1hUNt9vai_C3-gGBv24116CJMzQxMcXOax4,13726
|
|
11
11
|
cirq/py.typed,sha256=VFSlmh_lNwnaXzwY-ZuW-C2Ws5PkuDoVgBdNCs0jXJE,63
|
|
@@ -225,7 +225,7 @@ cirq/experiments/xeb_sampling_test.py,sha256=wVFcyAoErAC6tRQMA6AJ1MrTT1DGwW_0PuK
|
|
|
225
225
|
cirq/experiments/xeb_simulation.py,sha256=HqUb7d1XIgp0GEThIEHfDEsrh3kUee9pFS7k1vFWnIA,5089
|
|
226
226
|
cirq/experiments/xeb_simulation_test.py,sha256=UAm6qCTJWa9o5Nwr9LwvJ8fmlNvg6IQs8gsraasK2I8,5625
|
|
227
227
|
cirq/experiments/z_phase_calibration.py,sha256=0W2VWV6SPWwQnPVJqhrxih0CLlR1SNRJU_CZ48C5PHo,15018
|
|
228
|
-
cirq/experiments/z_phase_calibration_test.py,sha256=
|
|
228
|
+
cirq/experiments/z_phase_calibration_test.py,sha256=HeRX1kvXpmokOqMEVk-8ewAmvnomWBATFcHwo-ZX3bc,9585
|
|
229
229
|
cirq/experiments/benchmarking/__init__.py,sha256=oAom0qrtLKb8NqUcBJWiKd6chwFE2j6jVLI8_iNivzA,723
|
|
230
230
|
cirq/experiments/benchmarking/parallel_xeb.py,sha256=xC7BOr9cDTGshRNG4tgXAXXH4VuMntIBYjp_PQZW5Tc,26117
|
|
231
231
|
cirq/experiments/benchmarking/parallel_xeb_test.py,sha256=mrP97qFvhPa7_FYuW-PXGP9wAnxOFVCo8jwjwcGGWFQ,16352
|
|
@@ -1246,8 +1246,8 @@ cirq/work/sampler.py,sha256=rxbMWvrhu3gfNSBjZKozw28lLKVvBAS_1EGyPdYe8Xg,19041
|
|
|
1246
1246
|
cirq/work/sampler_test.py,sha256=SsMrRvLDYELyOAWLKISjkdEfrBwLYWRsT6D8WrsLM3Q,13533
|
|
1247
1247
|
cirq/work/zeros_sampler.py,sha256=Fs2JWwq0n9zv7_G5Rm-9vPeHUag7uctcMOHg0JTkZpc,2371
|
|
1248
1248
|
cirq/work/zeros_sampler_test.py,sha256=lQLgQDGBLtfImryys2HzQ2jOSGxHgc7-koVBUhv8qYk,3345
|
|
1249
|
-
cirq_core-1.7.0.
|
|
1250
|
-
cirq_core-1.7.0.
|
|
1251
|
-
cirq_core-1.7.0.
|
|
1252
|
-
cirq_core-1.7.0.
|
|
1253
|
-
cirq_core-1.7.0.
|
|
1249
|
+
cirq_core-1.7.0.dev20251027162822.dist-info/licenses/LICENSE,sha256=tAkwu8-AdEyGxGoSvJ2gVmQdcicWw3j1ZZueVV74M-E,11357
|
|
1250
|
+
cirq_core-1.7.0.dev20251027162822.dist-info/METADATA,sha256=pGOHSQeanOrfJ2F_5kUKqWqpp7DfcS2FXmQQLx0HT0c,4757
|
|
1251
|
+
cirq_core-1.7.0.dev20251027162822.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
1252
|
+
cirq_core-1.7.0.dev20251027162822.dist-info/top_level.txt,sha256=Sz9iOxHU0IEMLSFGwiwOCaN2e9K-jFbBbtpPN1hB73g,5
|
|
1253
|
+
cirq_core-1.7.0.dev20251027162822.dist-info/RECORD,,
|
{cirq_core-1.7.0.dev20251021231621.dist-info → cirq_core-1.7.0.dev20251027162822.dist-info}/WHEEL
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|