cirq-core 1.7.0.dev20250911065641__py3-none-any.whl → 1.7.0.dev20250911065839__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, 11, 0): # pragma: no cover
28
28
  'of Cirq (e.g. "python -m pip install cirq==1.5.0")'
29
29
  )
30
30
 
31
- __version__ = "1.7.0.dev20250911065641"
31
+ __version__ = "1.7.0.dev20250911065839"
cirq/_version_test.py CHANGED
@@ -3,4 +3,4 @@ import cirq
3
3
 
4
4
 
5
5
  def test_version() -> None:
6
- assert cirq.__version__ == "1.7.0.dev20250911065641"
6
+ assert cirq.__version__ == "1.7.0.dev20250911065839"
cirq/sim/state_vector.py CHANGED
@@ -135,8 +135,7 @@ class StateVectorMixin:
135
135
 
136
136
  Raises:
137
137
  ValueError: if the size of the state represents more than 25 qubits.
138
- IndexError: if the indices are out of range for the number of qubits
139
- corresponding to the state.
138
+ KeyError: if some of the qubits provided are not in the quantum state.
140
139
  """
141
140
  return qis.density_matrix_from_state_vector(
142
141
  self.state_vector(),
@@ -160,8 +159,7 @@ class StateVectorMixin:
160
159
 
161
160
  Raises:
162
161
  ValueError: if the size of the state represents more than 25 qubits.
163
- IndexError: if index is out of range for the number of qubits
164
- corresponding to the state.
162
+ KeyError: if the specified qubit is not in the quantum state.
165
163
  """
166
164
  return qis.bloch_vector_from_state_vector(
167
165
  self.state_vector(), self.qubit_map[qubit], qid_shape=self._qid_shape
@@ -405,6 +405,8 @@ def test_step_result_bloch_vector():
405
405
  bloch0 = np.array([0, 0, 1])
406
406
  np.testing.assert_array_almost_equal(bloch1, step_result.bloch_vector_of(q1))
407
407
  np.testing.assert_array_almost_equal(bloch0, step_result.bloch_vector_of(q0))
408
+ with pytest.raises(KeyError):
409
+ step_result.bloch_vector_of(cirq.LineQubit(2))
408
410
 
409
411
 
410
412
  def test_factor_validation():
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: cirq-core
3
- Version: 1.7.0.dev20250911065641
3
+ Version: 1.7.0.dev20250911065839
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=emXpdD5ZvwLRlFAoQB8YatmZyU3b4e9jg6FppMTUhkU,33900
4
4
  cirq/_doc.py,sha256=BrnoABo1hk5RgB3Cgww4zLHUfiyFny0F1V-tOMCbdaU,2909
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=Go2wwqS6uXaLb2-LFRp-MU91zKOL-ZjCGSkbI9Xout4,1206
8
- cirq/_version_test.py,sha256=yoE7HlOdIzRCj0UO0qpo7Baaws-kh1jAkELb0op1LVc,155
7
+ cirq/_version.py,sha256=4OFyeAO6yx4GH5Xk28bYf6J55u8e5bS5UTDk0kXhfrE,1206
8
+ cirq/_version_test.py,sha256=3jDGYDt1RNQOtilKta4XBFfG8S6BZhamW4LzVvxpzDs,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
@@ -955,12 +955,12 @@ cirq/sim/simulator_base_test.py,sha256=ag_1DIA82vEBLrXlwxWBvtobJa9E6SqBT46F6aPZE
955
955
  cirq/sim/simulator_test.py,sha256=bPcjADGo1AzA5m_zvaap38NJ6n-IGKBRSAVgFmu8-ek,18799
956
956
  cirq/sim/sparse_simulator.py,sha256=d0chp2JPvvcc0DovfmHxPGII4b1wQBPvuh76_VQTv9I,12922
957
957
  cirq/sim/sparse_simulator_test.py,sha256=7P9LEeu6359slpvRJhVW4_gCKSnxpCTQVzpkvB_s0bo,53790
958
- cirq/sim/state_vector.py,sha256=D-o77aJ0tIBarPXdvLER22NXeX5mQ5EwpjKtbWRljEI,13415
958
+ cirq/sim/state_vector.py,sha256=U2YHGp2MAvw5qkl3B-q_ZEuuHEaSPsjgm9b0e8JMBAs,13329
959
959
  cirq/sim/state_vector_simulation_state.py,sha256=O_WuK7xKYGhFYX4jlAoVmsggjIFgh6ZbFYhnFxTo1Pw,17506
960
960
  cirq/sim/state_vector_simulation_state_test.py,sha256=eStINvpYZRajxJO85E-2ifQzSopQABYDG4SlSSvP4-I,9987
961
961
  cirq/sim/state_vector_simulator.py,sha256=vQlFlnnczQn5dmSBACzouZnCgxJhIM3O38KfGiv-Caw,8206
962
962
  cirq/sim/state_vector_simulator_test.py,sha256=u_ncoSDuA31BWOSWN6dWamt15CKE9rRFPw9cBMRs3WM,7900
963
- cirq/sim/state_vector_test.py,sha256=ZxJ3WjEdfI0guBlQs0JfhK05qAKQefvtpfuLjM3vR-M,16607
963
+ cirq/sim/state_vector_test.py,sha256=smi06muuxelsIWtUP_s0VNwCRP17Ky8Vx7ENPJKZQVo,16696
964
964
  cirq/sim/clifford/__init__.py,sha256=NhHor0z4Zs4FiV3uF2br-z_oNF42Bx_u-voSYq37I68,908
965
965
  cirq/sim/clifford/clifford_simulator.py,sha256=zld4rZYuq8_m7C_m9n6WPhtxLrGKVMHT3vQI942a85Y,9828
966
966
  cirq/sim/clifford/clifford_simulator_test.py,sha256=caKQHVNuQoZYcJqfanTtNx6Hhc_6VmD908Z2mzJ8o6I,21405
@@ -1234,8 +1234,8 @@ cirq/work/sampler.py,sha256=rxbMWvrhu3gfNSBjZKozw28lLKVvBAS_1EGyPdYe8Xg,19041
1234
1234
  cirq/work/sampler_test.py,sha256=SsMrRvLDYELyOAWLKISjkdEfrBwLYWRsT6D8WrsLM3Q,13533
1235
1235
  cirq/work/zeros_sampler.py,sha256=Fs2JWwq0n9zv7_G5Rm-9vPeHUag7uctcMOHg0JTkZpc,2371
1236
1236
  cirq/work/zeros_sampler_test.py,sha256=lQLgQDGBLtfImryys2HzQ2jOSGxHgc7-koVBUhv8qYk,3345
1237
- cirq_core-1.7.0.dev20250911065641.dist-info/licenses/LICENSE,sha256=tAkwu8-AdEyGxGoSvJ2gVmQdcicWw3j1ZZueVV74M-E,11357
1238
- cirq_core-1.7.0.dev20250911065641.dist-info/METADATA,sha256=Q3XoM__mKjWrpwbt7HxfpuE92Ou3ZRczDtgV5v2zRBs,4758
1239
- cirq_core-1.7.0.dev20250911065641.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
1240
- cirq_core-1.7.0.dev20250911065641.dist-info/top_level.txt,sha256=Sz9iOxHU0IEMLSFGwiwOCaN2e9K-jFbBbtpPN1hB73g,5
1241
- cirq_core-1.7.0.dev20250911065641.dist-info/RECORD,,
1237
+ cirq_core-1.7.0.dev20250911065839.dist-info/licenses/LICENSE,sha256=tAkwu8-AdEyGxGoSvJ2gVmQdcicWw3j1ZZueVV74M-E,11357
1238
+ cirq_core-1.7.0.dev20250911065839.dist-info/METADATA,sha256=jaPANBxrRUbZYdmvzs5YN6Mlq6ECjSgkiMFMJw_i_PA,4758
1239
+ cirq_core-1.7.0.dev20250911065839.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
1240
+ cirq_core-1.7.0.dev20250911065839.dist-info/top_level.txt,sha256=Sz9iOxHU0IEMLSFGwiwOCaN2e9K-jFbBbtpPN1hB73g,5
1241
+ cirq_core-1.7.0.dev20250911065839.dist-info/RECORD,,