cirq-core 1.5.0.dev20240719215931__py3-none-any.whl → 1.5.0.dev20240722144600__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/two_qubit_xeb.py +4 -3
- cirq/experiments/two_qubit_xeb_test.py +16 -16
- cirq/experiments/xeb_simulation.py +1 -1
- cirq/experiments/xeb_simulation_test.py +1 -1
- {cirq_core-1.5.0.dev20240719215931.dist-info → cirq_core-1.5.0.dev20240722144600.dist-info}/METADATA +1 -1
- {cirq_core-1.5.0.dev20240719215931.dist-info → cirq_core-1.5.0.dev20240722144600.dist-info}/RECORD +11 -11
- {cirq_core-1.5.0.dev20240719215931.dist-info → cirq_core-1.5.0.dev20240722144600.dist-info}/LICENSE +0 -0
- {cirq_core-1.5.0.dev20240719215931.dist-info → cirq_core-1.5.0.dev20240722144600.dist-info}/WHEEL +0 -0
- {cirq_core-1.5.0.dev20240719215931.dist-info → cirq_core-1.5.0.dev20240722144600.dist-info}/top_level.txt +0 -0
cirq/_version.py
CHANGED
cirq/_version_test.py
CHANGED
|
@@ -143,7 +143,9 @@ class TwoQubitXEBResult:
|
|
|
143
143
|
|
|
144
144
|
def xeb_fidelity(self, q0: 'cirq.GridQubit', q1: 'cirq.GridQubit') -> float:
|
|
145
145
|
"""Return the XEB fidelity of a qubit pair."""
|
|
146
|
-
return
|
|
146
|
+
return noise_utils.decay_constant_to_xeb_fidelity(
|
|
147
|
+
self._record(q0, q1).layer_fid, num_qubits=2
|
|
148
|
+
)
|
|
147
149
|
|
|
148
150
|
def xeb_error(self, q0: 'cirq.GridQubit', q1: 'cirq.GridQubit') -> float:
|
|
149
151
|
"""Return the XEB error of a qubit pair."""
|
|
@@ -177,8 +179,7 @@ class TwoQubitXEBResult:
|
|
|
177
179
|
"""Return the Pauli error of all qubit pairs."""
|
|
178
180
|
return {
|
|
179
181
|
pair: noise_utils.decay_constant_to_pauli_error(
|
|
180
|
-
|
|
181
|
-
num_qubits=2,
|
|
182
|
+
self._record(*pair).layer_fid, num_qubits=2
|
|
182
183
|
)
|
|
183
184
|
for pair in self.all_qubit_pairs
|
|
184
185
|
}
|
|
@@ -148,10 +148,10 @@ _TEST_RESULT = cirq.experiments.TwoQubitXEBResult(
|
|
|
148
148
|
@pytest.mark.parametrize(
|
|
149
149
|
'q0,q1,pauli',
|
|
150
150
|
[
|
|
151
|
-
(cirq.GridQubit(4, 4), cirq.GridQubit(5, 4),
|
|
152
|
-
(cirq.GridQubit(5, 3), cirq.GridQubit(6, 3),
|
|
153
|
-
(cirq.GridQubit(4, 3), cirq.GridQubit(5, 3), 0.
|
|
154
|
-
(cirq.GridQubit(6, 3), cirq.GridQubit(6, 4),
|
|
151
|
+
(cirq.GridQubit(4, 4), cirq.GridQubit(5, 4), 0.09374999999999997),
|
|
152
|
+
(cirq.GridQubit(5, 3), cirq.GridQubit(6, 3), 0.18749999999999994),
|
|
153
|
+
(cirq.GridQubit(4, 3), cirq.GridQubit(5, 3), 0.65625),
|
|
154
|
+
(cirq.GridQubit(6, 3), cirq.GridQubit(6, 4), 0.46875),
|
|
155
155
|
],
|
|
156
156
|
)
|
|
157
157
|
def test_pauli_error(q0: cirq.GridQubit, q1: cirq.GridQubit, pauli: float):
|
|
@@ -174,10 +174,10 @@ class MockParallelRandomizedBenchmarkingResult(ParallelRandomizedBenchmarkingRes
|
|
|
174
174
|
@pytest.mark.parametrize(
|
|
175
175
|
'q0,q1,pauli',
|
|
176
176
|
[
|
|
177
|
-
(cirq.GridQubit(4, 4), cirq.GridQubit(5, 4),
|
|
178
|
-
(cirq.GridQubit(5, 3), cirq.GridQubit(6, 3),
|
|
179
|
-
(cirq.GridQubit(4, 3), cirq.GridQubit(5, 3), 0.
|
|
180
|
-
(cirq.GridQubit(6, 3), cirq.GridQubit(6, 4),
|
|
177
|
+
(cirq.GridQubit(4, 4), cirq.GridQubit(5, 4), 0.09374999999999997 - 0.03),
|
|
178
|
+
(cirq.GridQubit(5, 3), cirq.GridQubit(6, 3), 0.18749999999999994 - 0.09),
|
|
179
|
+
(cirq.GridQubit(4, 3), cirq.GridQubit(5, 3), 0.65625 - 0.08),
|
|
180
|
+
(cirq.GridQubit(6, 3), cirq.GridQubit(6, 4), 0.46875 - 0.13),
|
|
181
181
|
],
|
|
182
182
|
)
|
|
183
183
|
def test_inferred_pauli_error(q0: cirq.GridQubit, q1: cirq.GridQubit, pauli: float):
|
|
@@ -191,10 +191,10 @@ def test_inferred_pauli_error(q0: cirq.GridQubit, q1: cirq.GridQubit, pauli: flo
|
|
|
191
191
|
@pytest.mark.parametrize(
|
|
192
192
|
'q0,q1,xeb',
|
|
193
193
|
[
|
|
194
|
-
(cirq.GridQubit(4, 4), cirq.GridQubit(5, 4), 0.
|
|
195
|
-
(cirq.GridQubit(5, 3), cirq.GridQubit(6, 3), 0.
|
|
196
|
-
(cirq.GridQubit(4, 3), cirq.GridQubit(5, 3), 0.
|
|
197
|
-
(cirq.GridQubit(6, 3), cirq.GridQubit(6, 4), 0.
|
|
194
|
+
(cirq.GridQubit(4, 4), cirq.GridQubit(5, 4), 0.050999999999999934),
|
|
195
|
+
(cirq.GridQubit(5, 3), cirq.GridQubit(6, 3), 0.07799999999999996),
|
|
196
|
+
(cirq.GridQubit(4, 3), cirq.GridQubit(5, 3), 0.46099999999999997),
|
|
197
|
+
(cirq.GridQubit(6, 3), cirq.GridQubit(6, 4), 0.2709999999999999),
|
|
198
198
|
],
|
|
199
199
|
)
|
|
200
200
|
def test_inferred_xeb_error(q0: cirq.GridQubit, q1: cirq.GridQubit, xeb: float):
|
|
@@ -224,10 +224,10 @@ def test_inferred_single_qubit_pauli():
|
|
|
224
224
|
@pytest.mark.parametrize(
|
|
225
225
|
'q0,q1,pauli',
|
|
226
226
|
[
|
|
227
|
-
(cirq.GridQubit(4, 4), cirq.GridQubit(5, 4),
|
|
228
|
-
(cirq.GridQubit(5, 3), cirq.GridQubit(6, 3),
|
|
229
|
-
(cirq.GridQubit(4, 3), cirq.GridQubit(5, 3), 0.
|
|
230
|
-
(cirq.GridQubit(6, 3), cirq.GridQubit(6, 4),
|
|
227
|
+
(cirq.GridQubit(4, 4), cirq.GridQubit(5, 4), 0.09374999999999997),
|
|
228
|
+
(cirq.GridQubit(5, 3), cirq.GridQubit(6, 3), 0.18749999999999994),
|
|
229
|
+
(cirq.GridQubit(4, 3), cirq.GridQubit(5, 3), 0.65625),
|
|
230
|
+
(cirq.GridQubit(6, 3), cirq.GridQubit(6, 4), 0.46875),
|
|
231
231
|
],
|
|
232
232
|
)
|
|
233
233
|
def test_inferred_two_qubit_pauli(q0: cirq.GridQubit, q1: cirq.GridQubit, pauli: float):
|
|
@@ -107,7 +107,7 @@ def simulate_2q_xeb_circuits(
|
|
|
107
107
|
# Need an actual object; not np.random or else multiprocessing will
|
|
108
108
|
# fail to pickle the closure object:
|
|
109
109
|
# https://github.com/quantumlib/Cirq/issues/3717
|
|
110
|
-
simulator = sim.Simulator(seed=np.random.RandomState())
|
|
110
|
+
simulator = sim.Simulator(seed=np.random.RandomState(), dtype=np.complex128)
|
|
111
111
|
_simulate_2q_xeb_circuit = _Simulate_2q_XEB_Circuit(simulator=simulator)
|
|
112
112
|
|
|
113
113
|
tasks = tuple(
|
|
@@ -76,7 +76,7 @@ def _ref_simulate_2q_xeb_circuit(task: Dict[str, Any]):
|
|
|
76
76
|
tcircuit = circuit[:circuit_depth]
|
|
77
77
|
tcircuit = cirq.resolve_parameters_once(tcircuit, param_resolver=param_resolver)
|
|
78
78
|
|
|
79
|
-
pure_sim = cirq.Simulator()
|
|
79
|
+
pure_sim = cirq.Simulator(dtype=np.complex128)
|
|
80
80
|
psi = pure_sim.simulate(tcircuit)
|
|
81
81
|
psi_vector = psi.final_state_vector
|
|
82
82
|
pure_probs = cirq.state_vector_to_probabilities(psi_vector)
|
{cirq_core-1.5.0.dev20240719215931.dist-info → cirq_core-1.5.0.dev20240722144600.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.dev20240722144600
|
|
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.dev20240719215931.dist-info → cirq_core-1.5.0.dev20240722144600.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=uQ2OPDBBSCYg-g44pLd6AcUQaaI_lBysU-q2bzHBdvc,1206
|
|
8
|
+
cirq/_version_test.py,sha256=lxJ-EcPcJ7r1KMcxpsSNXP55oet4YsgQNK1HAHIdKlM,147
|
|
9
9
|
cirq/conftest.py,sha256=X7yLFL8GLhg2CjPw0hp5e_dGASfvHx1-QT03aUbhKJw,1168
|
|
10
10
|
cirq/json_resolver_cache.py,sha256=ytePZtNZgKjOF2NiVpUTuotB-JKZmQNOFIFdvXqsxHw,13271
|
|
11
11
|
cirq/py.typed,sha256=VFSlmh_lNwnaXzwY-ZuW-C2Ws5PkuDoVgBdNCs0jXJE,63
|
|
@@ -196,14 +196,14 @@ cirq/experiments/t1_decay_experiment.py,sha256=ealdmc_RTE__z1YUcaDEncDzQOaiT0K6I
|
|
|
196
196
|
cirq/experiments/t1_decay_experiment_test.py,sha256=Pgbm-37JiCdw9iQg2OaXVvs72xGWV2629CgsTQlLQnw,9139
|
|
197
197
|
cirq/experiments/t2_decay_experiment.py,sha256=lTgZ9yJ7Fk9_ozUCHysQn1qKrMQwTpsgEv-QnvsEif0,19158
|
|
198
198
|
cirq/experiments/t2_decay_experiment_test.py,sha256=DFR0BGn0Id4qNPfqIExj70TEAqf7Vrc8eK91Wj0YKTc,15031
|
|
199
|
-
cirq/experiments/two_qubit_xeb.py,sha256=
|
|
200
|
-
cirq/experiments/two_qubit_xeb_test.py,sha256=
|
|
199
|
+
cirq/experiments/two_qubit_xeb.py,sha256=N2X9N1A6hRS2Xe4zcmLJTyZ80DKDB0Pmv2fN4-UOU_s,19943
|
|
200
|
+
cirq/experiments/two_qubit_xeb_test.py,sha256=ZeZvClUAB8ir42Bd3PWr-s0_-QKWbFdYqfvvOMawsm0,10204
|
|
201
201
|
cirq/experiments/xeb_fitting.py,sha256=tD678gTY495cDA6b55YIPdwq22VQFbB2AlnkeX_X9P0,29332
|
|
202
202
|
cirq/experiments/xeb_fitting_test.py,sha256=LEgC76mYFwsX-ZqRqg2j85EiHACq8nK9ITrcl-TgeiA,15286
|
|
203
203
|
cirq/experiments/xeb_sampling.py,sha256=6ZOidGi7Kt6p4cMQCjK7qQuIUXVHCYl47B2GnL8M-Bw,14987
|
|
204
204
|
cirq/experiments/xeb_sampling_test.py,sha256=0XkQGvcURsug3IblE_wZrHVDoOQV3WuQilrqCJbDHjI,6784
|
|
205
|
-
cirq/experiments/xeb_simulation.py,sha256=
|
|
206
|
-
cirq/experiments/xeb_simulation_test.py,sha256=
|
|
205
|
+
cirq/experiments/xeb_simulation.py,sha256=yML2NAnYTRFG1wsQHvxtNEGEMXuExbWjrE2JYuCqnrk,5076
|
|
206
|
+
cirq/experiments/xeb_simulation_test.py,sha256=m_Eo9IJiebnJWyg9jwLW9BkVUeTkPxKEvWPVLj0VNho,5449
|
|
207
207
|
cirq/interop/__init__.py,sha256=zYD7hdcL5qUZ2MDzmCRZ7CgfCZ048fMKtJXCW7GMK_Y,722
|
|
208
208
|
cirq/interop/quirk/__init__.py,sha256=rGKgFDaKFSHdGTEw5iD4GCg_SKzbAfA1qcr4t2lPlZI,1092
|
|
209
209
|
cirq/interop/quirk/url_to_circuit.py,sha256=1ToWnFJdJIhCko9q62BEvOoCGxCpOUl8891IdCa52MM,14211
|
|
@@ -1181,8 +1181,8 @@ cirq/work/sampler.py,sha256=JEAeQQRF3bqlO9AkOf4XbrTATDI5f5JgyM_FAUCNxao,19751
|
|
|
1181
1181
|
cirq/work/sampler_test.py,sha256=B2ZsuqGT854gQtBIAh8k0LiG9Vj5wSzcGvkxOUoTcW4,13217
|
|
1182
1182
|
cirq/work/zeros_sampler.py,sha256=x1C7cup66a43n-3tm8QjhiqJa07qcJW10FxNp9jJ59Q,2356
|
|
1183
1183
|
cirq/work/zeros_sampler_test.py,sha256=JIkpBBFPJe5Ba4142vzogyWyboG1Q1ZAm0UVGgOoZn8,3279
|
|
1184
|
-
cirq_core-1.5.0.
|
|
1185
|
-
cirq_core-1.5.0.
|
|
1186
|
-
cirq_core-1.5.0.
|
|
1187
|
-
cirq_core-1.5.0.
|
|
1188
|
-
cirq_core-1.5.0.
|
|
1184
|
+
cirq_core-1.5.0.dev20240722144600.dist-info/LICENSE,sha256=tAkwu8-AdEyGxGoSvJ2gVmQdcicWw3j1ZZueVV74M-E,11357
|
|
1185
|
+
cirq_core-1.5.0.dev20240722144600.dist-info/METADATA,sha256=PHLo6VtKVya5vWnrtyHsAreaAdVeBmz6g0zfCQEtDLI,2007
|
|
1186
|
+
cirq_core-1.5.0.dev20240722144600.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
|
|
1187
|
+
cirq_core-1.5.0.dev20240722144600.dist-info/top_level.txt,sha256=Sz9iOxHU0IEMLSFGwiwOCaN2e9K-jFbBbtpPN1hB73g,5
|
|
1188
|
+
cirq_core-1.5.0.dev20240722144600.dist-info/RECORD,,
|
{cirq_core-1.5.0.dev20240719215931.dist-info → cirq_core-1.5.0.dev20240722144600.dist-info}/LICENSE
RENAMED
|
File without changes
|
{cirq_core-1.5.0.dev20240719215931.dist-info → cirq_core-1.5.0.dev20240722144600.dist-info}/WHEEL
RENAMED
|
File without changes
|
|
File without changes
|