cirq-core 1.5.0.dev20250325193835__py3-none-any.whl → 1.5.0.dev20250325195502__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.dev20250325193835"
31
+ __version__ = "1.5.0.dev20250325195502"
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.dev20250325193835"
6
+ assert cirq.__version__ == "1.5.0.dev20250325195502"
@@ -173,13 +173,12 @@ class TensoredConfusionMatrices:
173
173
  return in_vars + out_vars
174
174
 
175
175
  def _confusion_matrix(self, qubits: Sequence['cirq.Qid']) -> np.ndarray:
176
- ein_input = []
176
+ ein_input: List[np.ndarray | List[int]] = []
177
177
  for qs, cm in zip(self.measure_qubits, self.confusion_matrices):
178
178
  ein_input.extend([cm.reshape((2, 2) * len(qs)), self._get_vars(qs)])
179
179
  ein_out = self._get_vars(qubits)
180
180
 
181
- # TODO(#5757): remove type ignore when numpy has proper override signature.
182
- ret = np.einsum(*ein_input, ein_out).reshape((2 ** len(qubits),) * 2) # type: ignore
181
+ ret = np.einsum(*ein_input, ein_out).reshape((2 ** len(qubits),) * 2)
183
182
  return ret / ret.sum(axis=1)
184
183
 
185
184
  def confusion_matrix(self, qubits: Optional[Sequence['cirq.Qid']] = None) -> np.ndarray:
@@ -153,7 +153,6 @@ def targeted_left_multiply(
153
153
 
154
154
  all_indices = set(input_indices + data_indices + tuple(output_indices))
155
155
 
156
- # TODO(#5757): remove type ignore when numpy has proper override signature.
157
156
  return np.einsum(
158
157
  left_matrix,
159
158
  input_indices,
@@ -164,10 +163,8 @@ def targeted_left_multiply(
164
163
  # but this is a workaround for a bug in numpy:
165
164
  # https://github.com/numpy/numpy/issues/10926
166
165
  optimize=len(all_indices) >= 26,
167
- # And this is workaround for *another* bug!
168
- # Supposed to be able to just say 'old=old'.
169
- **({'out': out} if out is not None else {}),
170
- ) # type: ignore
166
+ out=out,
167
+ )
171
168
 
172
169
 
173
170
  @dataclasses.dataclass
@@ -412,7 +409,6 @@ def partial_trace(tensor: np.ndarray, keep_indices: Sequence[int]) -> np.ndarray
412
409
  keep_map = dict(zip(keep_indices, sorted(keep_indices)))
413
410
  left_indices = [keep_map[i] if i in keep_set else i for i in range(ndim)]
414
411
  right_indices = [ndim + i if i in keep_set else i for i in left_indices]
415
- # TODO(#5757): remove type ignore when numpy has proper override signature.
416
412
  return np.einsum(tensor, left_indices + right_indices)
417
413
 
418
414
 
cirq/qis/states.py CHANGED
@@ -677,7 +677,6 @@ def density_matrix_from_state_vector(
677
677
  sum_inds = np.array(range(n_qubits))
678
678
  sum_inds[indices] += n_qubits
679
679
 
680
- # TODO(#5757): remove type ignore when numpy has proper override signature.
681
680
  rho = np.einsum(
682
681
  state_vector,
683
682
  list(range(n_qubits)),
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: cirq-core
3
- Version: 1.5.0.dev20250325193835
3
+ Version: 1.5.0.dev20250325195502
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=QrQ3VlvpYa_8PWRE4kiGgaYjRNItx7beSqJxMw4vefY,1206
8
- cirq/_version_test.py,sha256=fS-UN2mbD5OT12fp1do049VlxC1TwWJh2hBIcbrgTgk,147
7
+ cirq/_version.py,sha256=U3MJCocwW-TV5L0g04JNSzDO_bwhyNrhQyPFHgt4yww,1206
8
+ cirq/_version_test.py,sha256=udRc-gXGRFohn0mREqa9EDUrbLSRt1HDpF8wevpJJUI,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
@@ -190,7 +190,7 @@ cirq/experiments/qubit_characterizations.py,sha256=hhbs_6aCLb4co0Y6TNJGiSmmjE8sm
190
190
  cirq/experiments/qubit_characterizations_test.py,sha256=b_ONqxyW6s01Ts8T65BEdb4e8Xy24Qp4zTGXWesL0ic,9733
191
191
  cirq/experiments/random_quantum_circuit_generation.py,sha256=tTgo1mEbLhY8i9VzR-p6xPqnv-O62TlJyW8AGj4V56M,28269
192
192
  cirq/experiments/random_quantum_circuit_generation_test.py,sha256=zOWsLLcYefG0yA1rKn-hwdNjNANBXDaKg4vAUXPIwHk,16522
193
- cirq/experiments/readout_confusion_matrix.py,sha256=5yS7VXDe9LHYn_6YRYek-HZ9ftEBmCTn5__TYSUONGQ,20875
193
+ cirq/experiments/readout_confusion_matrix.py,sha256=frHnyfCQtspjsxyW1bX-yPXOgOFENSwNVKLKtQSv67s,20805
194
194
  cirq/experiments/readout_confusion_matrix_test.py,sha256=ETvKHVuJWvq8KuL0l6w22UOfZHhBNH-TVeWAKqjSQEc,10632
195
195
  cirq/experiments/single_qubit_readout_calibration.py,sha256=x6fF6GqU1D4YY05YvW1DFlTlbjC12_bfj7W2psd75-U,14722
196
196
  cirq/experiments/single_qubit_readout_calibration_test.py,sha256=_002QXj2rIFHkH3vw9iTVMh45vCPuCI_fTqOUK8uMe4,7718
@@ -260,7 +260,7 @@ cirq/linalg/predicates.py,sha256=Q8BTlR4EvPg2KP9VodK78UEWYJbSCOTqRahn1DnFmSc,120
260
260
  cirq/linalg/predicates_test.py,sha256=UVDkNH2ujI80JwJwsDjbTgyALZUQJAVVCoFN1T_LLf0,21503
261
261
  cirq/linalg/tolerance.py,sha256=yHYVSHx2aoRci1aac9ZiM8OH1Bvy1Em-Rybnar701nE,1870
262
262
  cirq/linalg/tolerance_test.py,sha256=wnmuXIGEn_mugGoNm3AigSgjV2DMFdj8xpgRTMBbO7A,2355
263
- cirq/linalg/transformations.py,sha256=5iNg4IOcYqfqDTYo5i983IxweyHiMwcHW8jdk9hpG34,32303
263
+ cirq/linalg/transformations.py,sha256=cUZWPZJq6DISQ4rS02KSObmNwqLHYxIkNCfYijgJLoA,31986
264
264
  cirq/linalg/transformations_test.py,sha256=GsqD8_X0N88ECKr44t0O9wAJ6-uJJi0wExivn0Okf7M,25333
265
265
  cirq/neutral_atoms/__init__.py,sha256=VoQBkmZ5m4TPxjxShRixjqJbnc-IAnAWkGOPu8MBS5o,813
266
266
  cirq/neutral_atoms/convert_to_neutral_atom_gates.py,sha256=SsXFh1-NoBGqp4yX8-jIbIw-AK40baA-qh-iTL1wS6Q,1070
@@ -905,7 +905,7 @@ cirq/qis/measures_test.py,sha256=3LTTGdvuFfZWmFyWFeUHpg1yGc9z0VE8j7Kd7J7y8i4,100
905
905
  cirq/qis/noise_utils.py,sha256=wakkdQdBzOUWCf71sCxMCWwfPPAnJi5bNYsXDzGzkx0,3680
906
906
  cirq/qis/noise_utils_test.py,sha256=6r99DBN_2bImZbuOIB2A9ZdvyipqDopXsoxV-8OUK_I,3391
907
907
  cirq/qis/quantum_state_representation.py,sha256=5ybXGqjGSpSZqOn9q6OW6IBOmJs8KQekv5fFZZMCqZQ,3238
908
- cirq/qis/states.py,sha256=xrkYZR2UOkxTf0GouQ0p1-aiQRYmJheiEk7fxPR8Kog,41967
908
+ cirq/qis/states.py,sha256=1hhW0U6EF_C8MocBPV-017JEYc6uTUvqZucgqI8rMkA,41887
909
909
  cirq/qis/states_test.py,sha256=I4fHt5drqG0C36bvmU-H7DfY3zOC8CfiZFzKJvSOnFs,31813
910
910
  cirq/sim/__init__.py,sha256=J209uAbjmgzER-48Q-FkRUWQ1FlG6-1c7GK11owZIW4,3452
911
911
  cirq/sim/classical_simulator.py,sha256=orp2WY15HNCJk60Aosq7igO3bjKcWjAAOeU_CiPK_98,9349
@@ -1206,8 +1206,8 @@ cirq/work/sampler.py,sha256=bE5tmVkcR6cZZMLETxDfHehdsYUMbx2RvBeIBetehI4,19187
1206
1206
  cirq/work/sampler_test.py,sha256=hL2UWx3dz2ukZVNxWftiKVvJcQoLplLZdQm-k1QcA40,13282
1207
1207
  cirq/work/zeros_sampler.py,sha256=x1C7cup66a43n-3tm8QjhiqJa07qcJW10FxNp9jJ59Q,2356
1208
1208
  cirq/work/zeros_sampler_test.py,sha256=JIkpBBFPJe5Ba4142vzogyWyboG1Q1ZAm0UVGgOoZn8,3279
1209
- cirq_core-1.5.0.dev20250325193835.dist-info/LICENSE,sha256=tAkwu8-AdEyGxGoSvJ2gVmQdcicWw3j1ZZueVV74M-E,11357
1210
- cirq_core-1.5.0.dev20250325193835.dist-info/METADATA,sha256=nWzeAGl8vEG4VGQzXpw9GBPCAGGK9nD-l9BGa9OgXjw,4817
1211
- cirq_core-1.5.0.dev20250325193835.dist-info/WHEEL,sha256=tZoeGjtWxWRfdplE7E3d45VPlLNQnvbKiYnx7gwAy8A,92
1212
- cirq_core-1.5.0.dev20250325193835.dist-info/top_level.txt,sha256=Sz9iOxHU0IEMLSFGwiwOCaN2e9K-jFbBbtpPN1hB73g,5
1213
- cirq_core-1.5.0.dev20250325193835.dist-info/RECORD,,
1209
+ cirq_core-1.5.0.dev20250325195502.dist-info/LICENSE,sha256=tAkwu8-AdEyGxGoSvJ2gVmQdcicWw3j1ZZueVV74M-E,11357
1210
+ cirq_core-1.5.0.dev20250325195502.dist-info/METADATA,sha256=SXbdZlj5gz1jPjFba_SamqhqG1JLv_UnPowosLoPrQM,4817
1211
+ cirq_core-1.5.0.dev20250325195502.dist-info/WHEEL,sha256=tZoeGjtWxWRfdplE7E3d45VPlLNQnvbKiYnx7gwAy8A,92
1212
+ cirq_core-1.5.0.dev20250325195502.dist-info/top_level.txt,sha256=Sz9iOxHU0IEMLSFGwiwOCaN2e9K-jFbBbtpPN1hB73g,5
1213
+ cirq_core-1.5.0.dev20250325195502.dist-info/RECORD,,