cirq-core 1.5.0.dev20250114225139__py3-none-any.whl → 1.5.0.dev20250115151412__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.dev20250114225139"
31
+ __version__ = "1.5.0.dev20250115151412"
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.dev20250114225139"
6
+ assert cirq.__version__ == "1.5.0.dev20250115151412"
@@ -76,11 +76,9 @@ qreg q[{num_qubits}];
76
76
 
77
77
  qasm_unitary = None
78
78
  try:
79
- result = qiskit.execute(
80
- qiskit.QuantumCircuit.from_qasm_str(qasm),
81
- backend=qiskit.Aer.get_backend('unitary_simulator'),
82
- )
83
- qasm_unitary = result.result().get_unitary()
79
+ qc = qiskit.QuantumCircuit.from_qasm_str(qasm)
80
+ qc.remove_final_measurements()
81
+ qasm_unitary = qiskit.quantum_info.Operator(qc).data
84
82
  qasm_unitary = _reorder_indices_of_matrix(qasm_unitary, list(reversed(range(num_qubits))))
85
83
 
86
84
  lin_alg_utils.assert_allclose_up_to_global_phase(
@@ -115,11 +113,9 @@ def assert_qiskit_parsed_qasm_consistent_with_unitary(qasm, unitary): # pragma:
115
113
  return
116
114
 
117
115
  num_qubits = int(np.log2(len(unitary)))
118
- result = qiskit.execute(
119
- qiskit.QuantumCircuit.from_qasm_str(qasm),
120
- backend=qiskit.Aer.get_backend('unitary_simulator'),
121
- )
122
- qiskit_unitary = result.result().get_unitary()
116
+ qc = qiskit.QuantumCircuit.from_qasm_str(qasm)
117
+ qc.remove_final_measurements() # no measurements allowed
118
+ qiskit_unitary = qiskit.quantum_info.Operator(qc).data
123
119
  qiskit_unitary = _reorder_indices_of_matrix(qiskit_unitary, list(reversed(range(num_qubits))))
124
120
 
125
121
  lin_alg_utils.assert_allclose_up_to_global_phase(unitary, qiskit_unitary, rtol=1e-8, atol=1e-8)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: cirq-core
3
- Version: 1.5.0.dev20250114225139
3
+ Version: 1.5.0.dev20250115151412
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=4NkMp4EN09mzG9jfRecTplB1IR067vo9G54hHQzQiRc,1206
8
- cirq/_version_test.py,sha256=AWuGjxi3SxQLc9jrEqBZE1WrEmiRJA9ucK2xTxRVrPw,147
7
+ cirq/_version.py,sha256=VwPWAV5lapaaDOu9hj-Zv8xqqnfF0kZM4QzoD3WMP4A,1206
8
+ cirq/_version_test.py,sha256=bwkbZ24qmPd9ng3nGJ5M5ZioI67NkMGoJBVOXuDQrb8,147
9
9
  cirq/conftest.py,sha256=X7yLFL8GLhg2CjPw0hp5e_dGASfvHx1-QT03aUbhKJw,1168
10
10
  cirq/json_resolver_cache.py,sha256=cpbvJMNIh0U-l1mEVb-TqhJUEXfm2vpuR3v432ORSmg,13702
11
11
  cirq/py.typed,sha256=VFSlmh_lNwnaXzwY-ZuW-C2Ws5PkuDoVgBdNCs0jXJE,63
@@ -977,7 +977,7 @@ cirq/testing/consistent_phase_by.py,sha256=oSZcZnKMOIJnBS0HgYi-8aRaVJmHGgI--WAUG
977
977
  cirq/testing/consistent_phase_by_test.py,sha256=YbI0n0FpWpBkbgYp0-yGZSeesDZEst0cmYtXgJE2LQY,3273
978
978
  cirq/testing/consistent_protocols.py,sha256=ZRLuaquTuSGhI_KaOdXa0ooDJC3gOO3ykfciKiHqhrU,7773
979
979
  cirq/testing/consistent_protocols_test.py,sha256=ZShgGWBWrzClusc-6idmnIBdCL_OAxXLHay8baqRh1g,10004
980
- cirq/testing/consistent_qasm.py,sha256=1-Rq2NfyRHh1bqPYuhBIsH9OkepUSONpNdxDMODSsrQ,5108
980
+ cirq/testing/consistent_qasm.py,sha256=DaZCJHfrqMe5U3ccORuKs0seFPRGhePLMAavSwd-QuM,5021
981
981
  cirq/testing/consistent_qasm_test.py,sha256=IM1BDeqZflv0Tui669KRLOlKKWyYnJ9JA-Xoy4lI9Bs,2883
982
982
  cirq/testing/consistent_resolve_parameters.py,sha256=hYbp6kbXrOLCc1DMDRC2zTAx1qlvCCJMuzZ7a5cGhmA,1973
983
983
  cirq/testing/consistent_specified_has_unitary.py,sha256=A8UWU8etwXmEs9GWLI94NiIkGUHUHxMNY-5Brqd9oj4,1132
@@ -1203,8 +1203,8 @@ cirq/work/sampler.py,sha256=bE5tmVkcR6cZZMLETxDfHehdsYUMbx2RvBeIBetehI4,19187
1203
1203
  cirq/work/sampler_test.py,sha256=hL2UWx3dz2ukZVNxWftiKVvJcQoLplLZdQm-k1QcA40,13282
1204
1204
  cirq/work/zeros_sampler.py,sha256=x1C7cup66a43n-3tm8QjhiqJa07qcJW10FxNp9jJ59Q,2356
1205
1205
  cirq/work/zeros_sampler_test.py,sha256=JIkpBBFPJe5Ba4142vzogyWyboG1Q1ZAm0UVGgOoZn8,3279
1206
- cirq_core-1.5.0.dev20250114225139.dist-info/LICENSE,sha256=tAkwu8-AdEyGxGoSvJ2gVmQdcicWw3j1ZZueVV74M-E,11357
1207
- cirq_core-1.5.0.dev20250114225139.dist-info/METADATA,sha256=xiv814MiWePyAbympmAOEaR2Z2AifzHfI0bluTeSwoI,2105
1208
- cirq_core-1.5.0.dev20250114225139.dist-info/WHEEL,sha256=tZoeGjtWxWRfdplE7E3d45VPlLNQnvbKiYnx7gwAy8A,92
1209
- cirq_core-1.5.0.dev20250114225139.dist-info/top_level.txt,sha256=Sz9iOxHU0IEMLSFGwiwOCaN2e9K-jFbBbtpPN1hB73g,5
1210
- cirq_core-1.5.0.dev20250114225139.dist-info/RECORD,,
1206
+ cirq_core-1.5.0.dev20250115151412.dist-info/LICENSE,sha256=tAkwu8-AdEyGxGoSvJ2gVmQdcicWw3j1ZZueVV74M-E,11357
1207
+ cirq_core-1.5.0.dev20250115151412.dist-info/METADATA,sha256=TMEkGEUODzuPvWwLJPm0U90K-tb6VhEmF4Ny2e9mc1I,2105
1208
+ cirq_core-1.5.0.dev20250115151412.dist-info/WHEEL,sha256=tZoeGjtWxWRfdplE7E3d45VPlLNQnvbKiYnx7gwAy8A,92
1209
+ cirq_core-1.5.0.dev20250115151412.dist-info/top_level.txt,sha256=Sz9iOxHU0IEMLSFGwiwOCaN2e9K-jFbBbtpPN1hB73g,5
1210
+ cirq_core-1.5.0.dev20250115151412.dist-info/RECORD,,