cirq-core 1.5.0.dev20250108145717__py3-none-any.whl → 1.5.0.dev20250108201156__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/xeb_fitting.py +1 -0
- cirq/experiments/z_phase_calibration_test.py +13 -9
- {cirq_core-1.5.0.dev20250108145717.dist-info → cirq_core-1.5.0.dev20250108201156.dist-info}/METADATA +1 -1
- {cirq_core-1.5.0.dev20250108145717.dist-info → cirq_core-1.5.0.dev20250108201156.dist-info}/RECORD +9 -9
- {cirq_core-1.5.0.dev20250108145717.dist-info → cirq_core-1.5.0.dev20250108201156.dist-info}/LICENSE +0 -0
- {cirq_core-1.5.0.dev20250108145717.dist-info → cirq_core-1.5.0.dev20250108201156.dist-info}/WHEEL +0 -0
- {cirq_core-1.5.0.dev20250108145717.dist-info → cirq_core-1.5.0.dev20250108201156.dist-info}/top_level.txt +0 -0
cirq/_version.py
CHANGED
cirq/_version_test.py
CHANGED
cirq/experiments/xeb_fitting.py
CHANGED
|
@@ -27,10 +27,12 @@ from cirq.experiments.z_phase_calibration import (
|
|
|
27
27
|
from cirq.experiments.xeb_fitting import XEBPhasedFSimCharacterizationOptions
|
|
28
28
|
|
|
29
29
|
_ANGLES = ['theta', 'phi', 'chi', 'zeta', 'gamma']
|
|
30
|
+
# fix random generator seed to ensure reproducibility and faster convergence
|
|
31
|
+
_SEED = 276154030
|
|
30
32
|
|
|
31
33
|
|
|
32
|
-
def _create_tests(n,
|
|
33
|
-
rng = np.random.default_rng(
|
|
34
|
+
def _create_tests(n, with_options: bool = False):
|
|
35
|
+
rng = np.random.default_rng(_SEED)
|
|
34
36
|
angles = (rng.random((n, 5)) * 2 - 1) * np.pi
|
|
35
37
|
# Add errors to the last 3 angles (chi, zeta, gamma).
|
|
36
38
|
# The errors are in the union (-2, -1) U (1, 2).
|
|
@@ -86,8 +88,7 @@ class _TestSimulator(cirq.Simulator):
|
|
|
86
88
|
|
|
87
89
|
|
|
88
90
|
@pytest.mark.parametrize(
|
|
89
|
-
['angles', 'error', 'characterization_flags'],
|
|
90
|
-
_create_tests(n=10, seed=32432432, with_options=True),
|
|
91
|
+
['angles', 'error', 'characterization_flags'], _create_tests(n=10, with_options=True)
|
|
91
92
|
)
|
|
92
93
|
def test_calibrate_z_phases(angles, error, characterization_flags):
|
|
93
94
|
|
|
@@ -98,7 +99,7 @@ def test_calibrate_z_phases(angles, error, characterization_flags):
|
|
|
98
99
|
**{f'{n}_default': t for n, t in zip(_ANGLES, angles)}, **characterization_flags
|
|
99
100
|
)
|
|
100
101
|
|
|
101
|
-
sampler = _TestSimulator(original_gate, actual_gate, seed=
|
|
102
|
+
sampler = _TestSimulator(original_gate, actual_gate, seed=_SEED)
|
|
102
103
|
qubits = cirq.q(0, 0), cirq.q(0, 1)
|
|
103
104
|
calibrated_gate = calibrate_z_phases(
|
|
104
105
|
sampler,
|
|
@@ -109,6 +110,7 @@ def test_calibrate_z_phases(angles, error, characterization_flags):
|
|
|
109
110
|
n_combinations=10,
|
|
110
111
|
n_circuits=10,
|
|
111
112
|
cycle_depths=range(3, 10),
|
|
113
|
+
random_state=_SEED,
|
|
112
114
|
)[qubits]
|
|
113
115
|
|
|
114
116
|
initial_unitary = cirq.unitary(original_gate)
|
|
@@ -126,13 +128,13 @@ def test_calibrate_z_phases(angles, error, characterization_flags):
|
|
|
126
128
|
assert new_dist < original_dist or new_dist < 1e-6
|
|
127
129
|
|
|
128
130
|
|
|
129
|
-
@pytest.mark.parametrize(['angles', 'error'], _create_tests(n=3
|
|
131
|
+
@pytest.mark.parametrize(['angles', 'error'], _create_tests(n=3))
|
|
130
132
|
def test_calibrate_z_phases_no_options(angles, error):
|
|
131
133
|
|
|
132
134
|
original_gate = cirq.PhasedFSimGate(**{k: v for k, v in zip(_ANGLES, angles)})
|
|
133
135
|
actual_gate = cirq.PhasedFSimGate(**{k: v + e for k, v, e in zip(_ANGLES, angles, error)})
|
|
134
136
|
|
|
135
|
-
sampler = _TestSimulator(original_gate, actual_gate, seed=
|
|
137
|
+
sampler = _TestSimulator(original_gate, actual_gate, seed=_SEED)
|
|
136
138
|
qubits = cirq.q(0, 0), cirq.q(0, 1)
|
|
137
139
|
calibrated_gate = calibrate_z_phases(
|
|
138
140
|
sampler,
|
|
@@ -143,6 +145,7 @@ def test_calibrate_z_phases_no_options(angles, error):
|
|
|
143
145
|
n_combinations=10,
|
|
144
146
|
n_circuits=10,
|
|
145
147
|
cycle_depths=range(3, 10),
|
|
148
|
+
random_state=_SEED,
|
|
146
149
|
)[qubits]
|
|
147
150
|
|
|
148
151
|
initial_unitary = cirq.unitary(original_gate)
|
|
@@ -160,13 +163,13 @@ def test_calibrate_z_phases_no_options(angles, error):
|
|
|
160
163
|
assert new_dist < original_dist or new_dist < 1e-6
|
|
161
164
|
|
|
162
165
|
|
|
163
|
-
@pytest.mark.parametrize(['angles', 'error'], _create_tests(n=3
|
|
166
|
+
@pytest.mark.parametrize(['angles', 'error'], _create_tests(n=3))
|
|
164
167
|
def test_calibrate_z_phases_workflow_no_options(angles, error):
|
|
165
168
|
|
|
166
169
|
original_gate = cirq.PhasedFSimGate(**{k: v for k, v in zip(_ANGLES, angles)})
|
|
167
170
|
actual_gate = cirq.PhasedFSimGate(**{k: v + e for k, v, e in zip(_ANGLES, angles, error)})
|
|
168
171
|
|
|
169
|
-
sampler = _TestSimulator(original_gate, actual_gate, seed=
|
|
172
|
+
sampler = _TestSimulator(original_gate, actual_gate, seed=_SEED)
|
|
170
173
|
qubits = cirq.q(0, 0), cirq.q(0, 1)
|
|
171
174
|
result, _ = z_phase_calibration_workflow(
|
|
172
175
|
sampler,
|
|
@@ -177,6 +180,7 @@ def test_calibrate_z_phases_workflow_no_options(angles, error):
|
|
|
177
180
|
n_combinations=1,
|
|
178
181
|
n_circuits=1,
|
|
179
182
|
cycle_depths=(1, 2),
|
|
183
|
+
random_state=_SEED,
|
|
180
184
|
)
|
|
181
185
|
|
|
182
186
|
for params in result.final_params.values():
|
{cirq_core-1.5.0.dev20250108145717.dist-info → cirq_core-1.5.0.dev20250108201156.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.dev20250108201156
|
|
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.dev20250108145717.dist-info → cirq_core-1.5.0.dev20250108201156.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=r8nVqknI84bCIHspnzgzhND3PwOssFvJzTp0TnN9tms,1206
|
|
8
|
+
cirq/_version_test.py,sha256=vtASklK9pciK7FGdncTITJcjaqoB45VkivIdboj3tik,147
|
|
9
9
|
cirq/conftest.py,sha256=X7yLFL8GLhg2CjPw0hp5e_dGASfvHx1-QT03aUbhKJw,1168
|
|
10
10
|
cirq/json_resolver_cache.py,sha256=03MVo6Y-UYrzt9CKHmwpiBLN2ixL6uSU-OWnKZXfG7k,13302
|
|
11
11
|
cirq/py.typed,sha256=VFSlmh_lNwnaXzwY-ZuW-C2Ws5PkuDoVgBdNCs0jXJE,63
|
|
@@ -197,14 +197,14 @@ cirq/experiments/t2_decay_experiment.py,sha256=lTgZ9yJ7Fk9_ozUCHysQn1qKrMQwTpsgE
|
|
|
197
197
|
cirq/experiments/t2_decay_experiment_test.py,sha256=DFR0BGn0Id4qNPfqIExj70TEAqf7Vrc8eK91Wj0YKTc,15031
|
|
198
198
|
cirq/experiments/two_qubit_xeb.py,sha256=G6e6l9H0Jd6fo_DmgWZFCVIe9w34IpAK31q-Vj7K5IA,22787
|
|
199
199
|
cirq/experiments/two_qubit_xeb_test.py,sha256=wJi-ulxtSJyE5pzJPoUgoV8X2NLZG_H0jlW1JKHSo_I,10681
|
|
200
|
-
cirq/experiments/xeb_fitting.py,sha256=
|
|
200
|
+
cirq/experiments/xeb_fitting.py,sha256=bu7aRW388t-QvYZfeLq7fl8S0n7cMol0audWTouyY_I,30362
|
|
201
201
|
cirq/experiments/xeb_fitting_test.py,sha256=0GQ6ifSWdvEJ6-ICIcSR-R9lFLRwBykgf6toLElmg0o,15483
|
|
202
202
|
cirq/experiments/xeb_sampling.py,sha256=6ZOidGi7Kt6p4cMQCjK7qQuIUXVHCYl47B2GnL8M-Bw,14987
|
|
203
203
|
cirq/experiments/xeb_sampling_test.py,sha256=0XkQGvcURsug3IblE_wZrHVDoOQV3WuQilrqCJbDHjI,6784
|
|
204
204
|
cirq/experiments/xeb_simulation.py,sha256=yML2NAnYTRFG1wsQHvxtNEGEMXuExbWjrE2JYuCqnrk,5076
|
|
205
205
|
cirq/experiments/xeb_simulation_test.py,sha256=YWFKXPdtBFuZNhQoG06W1EetVhXighc3zyXwhKfGAeo,5652
|
|
206
206
|
cirq/experiments/z_phase_calibration.py,sha256=2mkpmtY60hQuaB91If6eAL_q_nW88hwJ2Pqdq9R_iTE,15152
|
|
207
|
-
cirq/experiments/z_phase_calibration_test.py,sha256=
|
|
207
|
+
cirq/experiments/z_phase_calibration_test.py,sha256=52rvCYan00Nxu9Ri-ksJdIzprtb8Mj-4oaU0pOm6URg,9040
|
|
208
208
|
cirq/interop/__init__.py,sha256=Xt1xU9UegP_jBNa9xaeOFSgtC0lYb_HNHq4hQQ0J20k,784
|
|
209
209
|
cirq/interop/quirk/__init__.py,sha256=W11jqaExSgvoUkjM_d0Kik4R8bqETF9Ezo27CDEB3iw,1237
|
|
210
210
|
cirq/interop/quirk/url_to_circuit.py,sha256=1ToWnFJdJIhCko9q62BEvOoCGxCpOUl8891IdCa52MM,14211
|
|
@@ -1189,8 +1189,8 @@ cirq/work/sampler.py,sha256=bE5tmVkcR6cZZMLETxDfHehdsYUMbx2RvBeIBetehI4,19187
|
|
|
1189
1189
|
cirq/work/sampler_test.py,sha256=hL2UWx3dz2ukZVNxWftiKVvJcQoLplLZdQm-k1QcA40,13282
|
|
1190
1190
|
cirq/work/zeros_sampler.py,sha256=x1C7cup66a43n-3tm8QjhiqJa07qcJW10FxNp9jJ59Q,2356
|
|
1191
1191
|
cirq/work/zeros_sampler_test.py,sha256=JIkpBBFPJe5Ba4142vzogyWyboG1Q1ZAm0UVGgOoZn8,3279
|
|
1192
|
-
cirq_core-1.5.0.
|
|
1193
|
-
cirq_core-1.5.0.
|
|
1194
|
-
cirq_core-1.5.0.
|
|
1195
|
-
cirq_core-1.5.0.
|
|
1196
|
-
cirq_core-1.5.0.
|
|
1192
|
+
cirq_core-1.5.0.dev20250108201156.dist-info/LICENSE,sha256=tAkwu8-AdEyGxGoSvJ2gVmQdcicWw3j1ZZueVV74M-E,11357
|
|
1193
|
+
cirq_core-1.5.0.dev20250108201156.dist-info/METADATA,sha256=dkqfAAYs--AcsBNXoMC2TStJDhmoP6m6vD_fQrZbybo,1992
|
|
1194
|
+
cirq_core-1.5.0.dev20250108201156.dist-info/WHEEL,sha256=tZoeGjtWxWRfdplE7E3d45VPlLNQnvbKiYnx7gwAy8A,92
|
|
1195
|
+
cirq_core-1.5.0.dev20250108201156.dist-info/top_level.txt,sha256=Sz9iOxHU0IEMLSFGwiwOCaN2e9K-jFbBbtpPN1hB73g,5
|
|
1196
|
+
cirq_core-1.5.0.dev20250108201156.dist-info/RECORD,,
|
{cirq_core-1.5.0.dev20250108145717.dist-info → cirq_core-1.5.0.dev20250108201156.dist-info}/LICENSE
RENAMED
|
File without changes
|
{cirq_core-1.5.0.dev20250108145717.dist-info → cirq_core-1.5.0.dev20250108201156.dist-info}/WHEEL
RENAMED
|
File without changes
|
|
File without changes
|