cirq-core 1.5.0.dev20250108174507__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 CHANGED
@@ -28,4 +28,4 @@ if sys.version_info < (3, 10, 0): # pragma: no cover
28
28
  'of cirq (e.g. "python -m pip install cirq==1.1.*")'
29
29
  )
30
30
 
31
- __version__ = "1.5.0.dev20250108174507"
31
+ __version__ = "1.5.0.dev20250108201156"
cirq/_version_test.py CHANGED
@@ -3,4 +3,4 @@ import cirq
3
3
 
4
4
 
5
5
  def test_version():
6
- assert cirq.__version__ == "1.5.0.dev20250108174507"
6
+ assert cirq.__version__ == "1.5.0.dev20250108201156"
@@ -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, seed, with_options: bool = False):
33
- rng = np.random.default_rng(seed)
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=0)
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, seed=32432432))
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=0)
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, seed=32432432))
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=0)
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():
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: cirq-core
3
- Version: 1.5.0.dev20250108174507
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
@@ -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=Fv75tsqvVFlyJU3TJL6yy-9eH2G6TO45QlGgKYPH9sY,1206
8
- cirq/_version_test.py,sha256=XJ70aRsoa2SblWuBBfdwP2VCvokjF413Tqx3JLfCLcE,147
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
@@ -204,7 +204,7 @@ cirq/experiments/xeb_sampling_test.py,sha256=0XkQGvcURsug3IblE_wZrHVDoOQV3WuQilr
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=BJ88waxTxRUsKSoFnkYkvhKxKwBNSmYCuZII6X-R36g,8904
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.dev20250108174507.dist-info/LICENSE,sha256=tAkwu8-AdEyGxGoSvJ2gVmQdcicWw3j1ZZueVV74M-E,11357
1193
- cirq_core-1.5.0.dev20250108174507.dist-info/METADATA,sha256=1kIoWYJafq-2_e60Xqi1-DFsk1UlYU6GUBfcMP7m7z0,1992
1194
- cirq_core-1.5.0.dev20250108174507.dist-info/WHEEL,sha256=tZoeGjtWxWRfdplE7E3d45VPlLNQnvbKiYnx7gwAy8A,92
1195
- cirq_core-1.5.0.dev20250108174507.dist-info/top_level.txt,sha256=Sz9iOxHU0IEMLSFGwiwOCaN2e9K-jFbBbtpPN1hB73g,5
1196
- cirq_core-1.5.0.dev20250108174507.dist-info/RECORD,,
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,,