cirq-core 1.5.0.dev20250118135200__py3-none-any.whl → 1.5.0.dev20250119140111__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.dev20250118135200"
31
+ __version__ = "1.5.0.dev20250119140111"
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.dev20250118135200"
6
+ assert cirq.__version__ == "1.5.0.dev20250119140111"
@@ -49,7 +49,6 @@ def _class_resolver_dictionary() -> Dict[str, ObjectFactory]:
49
49
  from cirq.devices.noise_model import _NoNoiseModel
50
50
  from cirq.devices import InsertionNoiseModel
51
51
  from cirq.experiments import GridInteractionLayer
52
- from cirq.experiments.grid_parallel_two_qubit_xeb import GridParallelXEBMetadata
53
52
 
54
53
  def _boolean_hamiltonian_gate_op(qubit_map, boolean_strs, theta):
55
54
  return cirq.BooleanHamiltonianGate(
@@ -142,7 +141,6 @@ def _class_resolver_dictionary() -> Dict[str, ObjectFactory]:
142
141
  'GlobalPhaseGate': cirq.GlobalPhaseGate,
143
142
  'GridDeviceMetadata': cirq.GridDeviceMetadata,
144
143
  'GridInteractionLayer': GridInteractionLayer,
145
- 'GridParallelXEBMetadata': GridParallelXEBMetadata,
146
144
  'GridQid': cirq.GridQid,
147
145
  'GridQubit': cirq.GridQubit,
148
146
  'HPowGate': cirq.HPowGate,
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: cirq-core
3
- Version: 1.5.0.dev20250118135200
3
+ Version: 1.5.0.dev20250119140111
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,10 +4,10 @@ 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=xmqt47lnMTmm8rS7b1oeqZSno_8t-pGY6N7lNC_O4BI,1206
8
- cirq/_version_test.py,sha256=EufjKhDf5JWmc5U1tMdfnJrg6o6Py51fVvDT5Ag3yBU,147
7
+ cirq/_version.py,sha256=bpeVZEmK8_z12uMzIE7OfSIJMu6eyRa8jQvuVY_oS80,1206
8
+ cirq/_version_test.py,sha256=COeD9Sq5oxFb7da4qjWQyLEuCsKUMx-PmUXykpJIjdo,147
9
9
  cirq/conftest.py,sha256=X7yLFL8GLhg2CjPw0hp5e_dGASfvHx1-QT03aUbhKJw,1168
10
- cirq/json_resolver_cache.py,sha256=cpbvJMNIh0U-l1mEVb-TqhJUEXfm2vpuR3v432ORSmg,13702
10
+ cirq/json_resolver_cache.py,sha256=p-vEOa-8GQ2cFIAdze-kd6C1un1uRvtujVPljVKaHBg,13557
11
11
  cirq/py.typed,sha256=VFSlmh_lNwnaXzwY-ZuW-C2Ws5PkuDoVgBdNCs0jXJE,63
12
12
  cirq/circuits/__init__.py,sha256=HKunqRpZoDmjy1IiK9Cn84MTGT84_PMeQ5VDCPafcWk,1335
13
13
  cirq/circuits/_block_diagram_drawer.py,sha256=06ceNV01cMx4irIGYnztfLt_HDNhK3AwfsiNh686hjU,9510
@@ -177,8 +177,6 @@ cirq/devices/unconstrained_device_test.py,sha256=OF9E2m1HPpq6hyrNAwFGWaNOpQ3H2ef
177
177
  cirq/experiments/__init__.py,sha256=Sx2sW3Uj0p7W-E_HkZ21YpHVUvKlp_zc5WWtago4rlo,3667
178
178
  cirq/experiments/fidelity_estimation.py,sha256=JK9yUoD4TL3nkf2yiEJ5f_RR-rhkAHSKpeLlYCRvZU4,9214
179
179
  cirq/experiments/fidelity_estimation_test.py,sha256=SX5hwQjyzWm1yr1q0C_LCgbFfUF_Ye36g6HuQbtinGI,4918
180
- cirq/experiments/grid_parallel_two_qubit_xeb.py,sha256=ROJZiXLaeF5IYo06DxeIvDHpwNJTIiqEAfKxs6v0vHM,2216
181
- cirq/experiments/grid_parallel_two_qubit_xeb_test.py,sha256=iDvDVsJxFp5xVlmse3EDH0Ok0-8yQpdAtQ2KHA7DbCY,1053
182
180
  cirq/experiments/n_qubit_tomography.py,sha256=9M_kf2-1hvFxfZOWND7ACwHYgD9SJU5nYFkeudQUlfE,8469
183
181
  cirq/experiments/n_qubit_tomography_test.py,sha256=wHfV2OpGYSDXfoyEh-B5dc1Dv8sxKNFbUoHyjIWZoFk,4362
184
182
  cirq/experiments/purity_estimation.py,sha256=6D1UwFlQRzHeajXMTyTUfBYAc0jJQ8Cfz4lteFKeUaM,2467
@@ -557,8 +555,6 @@ cirq/protocols/json_test_data/GridDeviceMetadata.repr,sha256=CUgbaLZ0862iK2mLS_T
557
555
  cirq/protocols/json_test_data/GridDeviceMetadata.repr_inward,sha256=5-tHgWDBLwj3pO9zk8PwFI2WVQehlNiuD-RpzzvqRmc,1483
558
556
  cirq/protocols/json_test_data/GridInteractionLayer.json,sha256=cknuXeHfwGozmVXd6THWPYekpzI8HnLWl5jXSkbI0A4,101
559
557
  cirq/protocols/json_test_data/GridInteractionLayer.repr,sha256=TiFgGlm8d2jCVCDzhx9cszrLQzcv-VPFK3LoQAan9B4,82
560
- cirq/protocols/json_test_data/GridParallelXEBMetadata.json,sha256=3Pg6vILyIg4_vBMfQHQk1z3tpe9_T2LdVXdYfz-HMeU,2093
561
- cirq/protocols/json_test_data/GridParallelXEBMetadata.repr,sha256=vbgITfQ0oHwNJyaB75qlkI_RTMCtJdnetmL0NvB2bPI,917
562
558
  cirq/protocols/json_test_data/GridQid.json,sha256=hWMrmU0ghYgnQbl68phBRJOa_KBUZIv0iTmXgmVpDqM,72
563
559
  cirq/protocols/json_test_data/GridQid.repr,sha256=XX1XEb941M6if3604YWq9WNgSfjUGD5NLYOpeBsUntI,33
564
560
  cirq/protocols/json_test_data/GridQubit.json,sha256=-NehjeVv5xBjj70mdVIQNwLCI6-p1RI0lGN75IK4srU,56
@@ -1203,8 +1199,8 @@ cirq/work/sampler.py,sha256=bE5tmVkcR6cZZMLETxDfHehdsYUMbx2RvBeIBetehI4,19187
1203
1199
  cirq/work/sampler_test.py,sha256=hL2UWx3dz2ukZVNxWftiKVvJcQoLplLZdQm-k1QcA40,13282
1204
1200
  cirq/work/zeros_sampler.py,sha256=x1C7cup66a43n-3tm8QjhiqJa07qcJW10FxNp9jJ59Q,2356
1205
1201
  cirq/work/zeros_sampler_test.py,sha256=JIkpBBFPJe5Ba4142vzogyWyboG1Q1ZAm0UVGgOoZn8,3279
1206
- cirq_core-1.5.0.dev20250118135200.dist-info/LICENSE,sha256=tAkwu8-AdEyGxGoSvJ2gVmQdcicWw3j1ZZueVV74M-E,11357
1207
- cirq_core-1.5.0.dev20250118135200.dist-info/METADATA,sha256=48c3voaYdGjIxkmTTXLjlZuvfz8ZmbSgK33aae54egA,2105
1208
- cirq_core-1.5.0.dev20250118135200.dist-info/WHEEL,sha256=tZoeGjtWxWRfdplE7E3d45VPlLNQnvbKiYnx7gwAy8A,92
1209
- cirq_core-1.5.0.dev20250118135200.dist-info/top_level.txt,sha256=Sz9iOxHU0IEMLSFGwiwOCaN2e9K-jFbBbtpPN1hB73g,5
1210
- cirq_core-1.5.0.dev20250118135200.dist-info/RECORD,,
1202
+ cirq_core-1.5.0.dev20250119140111.dist-info/LICENSE,sha256=tAkwu8-AdEyGxGoSvJ2gVmQdcicWw3j1ZZueVV74M-E,11357
1203
+ cirq_core-1.5.0.dev20250119140111.dist-info/METADATA,sha256=KdQcdFoXg5JUs1NNUsaIO_Aw18yo3L7midMDriHKX9s,2105
1204
+ cirq_core-1.5.0.dev20250119140111.dist-info/WHEEL,sha256=tZoeGjtWxWRfdplE7E3d45VPlLNQnvbKiYnx7gwAy8A,92
1205
+ cirq_core-1.5.0.dev20250119140111.dist-info/top_level.txt,sha256=Sz9iOxHU0IEMLSFGwiwOCaN2e9K-jFbBbtpPN1hB73g,5
1206
+ cirq_core-1.5.0.dev20250119140111.dist-info/RECORD,,
@@ -1,62 +0,0 @@
1
- # Copyright 2020 The Cirq Developers
2
- #
3
- # Licensed under the Apache License, Version 2.0 (the "License");
4
- # you may not use this file except in compliance with the License.
5
- # You may obtain a copy of the License at
6
- #
7
- # https://www.apache.org/licenses/LICENSE-2.0
8
- #
9
- # Unless required by applicable law or agreed to in writing, software
10
- # distributed under the License is distributed on an "AS IS" BASIS,
11
- # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
- # See the License for the specific language governing permissions and
13
- # limitations under the License.
14
- """Remnants of Parallel two-qubit cross-entropy benchmarking on a grid.
15
-
16
- This module keeps GridParallelXEBMetadata around for JSON backwards compatibility.
17
- """
18
- import dataclasses
19
- from typing import Optional, Sequence, TYPE_CHECKING
20
- from cirq.experiments.random_quantum_circuit_generation import GridInteractionLayer
21
- from cirq import protocols
22
-
23
- if TYPE_CHECKING:
24
- import cirq
25
-
26
-
27
- LAYER_A = GridInteractionLayer(col_offset=0, vertical=True, stagger=True)
28
- LAYER_B = GridInteractionLayer(col_offset=1, vertical=True, stagger=True)
29
- LAYER_C = GridInteractionLayer(col_offset=1, vertical=False, stagger=True)
30
- LAYER_D = GridInteractionLayer(col_offset=0, vertical=False, stagger=True)
31
-
32
-
33
- @dataclasses.dataclass
34
- class GridParallelXEBMetadata:
35
- """Metadata for a grid parallel XEB experiment.
36
- Attributes:
37
- data_collection_id: The data collection ID of the experiment.
38
- """
39
-
40
- qubits: Sequence['cirq.Qid']
41
- two_qubit_gate: 'cirq.Gate'
42
- num_circuits: int
43
- repetitions: int
44
- cycles: Sequence[int]
45
- layers: Sequence[GridInteractionLayer]
46
- seed: Optional[int]
47
-
48
- def _json_dict_(self):
49
- return protocols.dataclass_json_dict(self)
50
-
51
- def __repr__(self) -> str:
52
- return (
53
- 'cirq.experiments.grid_parallel_two_qubit_xeb.'
54
- 'GridParallelXEBMetadata('
55
- f'qubits={self.qubits!r}, '
56
- f'two_qubit_gate={self.two_qubit_gate!r}, '
57
- f'num_circuits={self.num_circuits!r}, '
58
- f'repetitions={self.repetitions!r}, '
59
- f'cycles={self.cycles!r}, '
60
- f'layers={self.layers!r}, '
61
- f'seed={self.seed!r})'
62
- )
@@ -1,28 +0,0 @@
1
- # Copyright 2022 The Cirq Developers
2
- #
3
- # Licensed under the Apache License, Version 2.0 (the "License");
4
- # you may not use this file except in compliance with the License.
5
- # You may obtain a copy of the License at
6
- #
7
- # https://www.apache.org/licenses/LICENSE-2.0
8
- #
9
- # Unless required by applicable law or agreed to in writing, software
10
- # distributed under the License is distributed on an "AS IS" BASIS,
11
- # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
- # See the License for the specific language governing permissions and
13
- # limitations under the License.
14
- from cirq.experiments.grid_parallel_two_qubit_xeb import GridParallelXEBMetadata, LAYER_A, LAYER_B
15
- import cirq
16
-
17
-
18
- def test_grid_parallel_xeb_metadata_repr():
19
- metadata = GridParallelXEBMetadata(
20
- qubits=cirq.GridQubit.square(2),
21
- two_qubit_gate=cirq.ISWAP,
22
- num_circuits=10,
23
- repetitions=10_000,
24
- cycles=[2, 4, 6, 8, 10],
25
- layers=[LAYER_A, LAYER_B],
26
- seed=1234,
27
- )
28
- cirq.testing.assert_equivalent_repr(metadata)
@@ -1,119 +0,0 @@
1
- [
2
- {
3
- "cirq_type": "GridParallelXEBMetadata",
4
- "qubits": [
5
- {
6
- "cirq_type": "GridQubit",
7
- "row": 0,
8
- "col": 0
9
- },
10
- {
11
- "cirq_type": "GridQubit",
12
- "row": 0,
13
- "col": 1
14
- },
15
- {
16
- "cirq_type": "GridQubit",
17
- "row": 1,
18
- "col": 0
19
- },
20
- {
21
- "cirq_type": "GridQubit",
22
- "row": 1,
23
- "col": 1
24
- }
25
- ],
26
- "two_qubit_gate": {
27
- "cirq_type": "ISwapPowGate",
28
- "exponent": 1.0,
29
- "global_shift": 0.0
30
- },
31
- "num_circuits": 10,
32
- "repetitions": 10000,
33
- "cycles": [
34
- 2,
35
- 4,
36
- 6,
37
- 8,
38
- 10
39
- ],
40
- "layers": [
41
- {
42
- "cirq_type": "GridInteractionLayer",
43
- "col_offset": 0,
44
- "vertical": true,
45
- "stagger": true
46
- },
47
- {
48
- "cirq_type": "GridInteractionLayer",
49
- "col_offset": 1,
50
- "vertical": true,
51
- "stagger": true
52
- }
53
- ],
54
- "seed": 1234
55
- },
56
- {
57
- "cirq_type": "GridParallelXEBMetadata",
58
- "qubits": [
59
- {
60
- "cirq_type": "GridQubit",
61
- "row": 0,
62
- "col": 0
63
- },
64
- {
65
- "cirq_type": "GridQubit",
66
- "row": 0,
67
- "col": 1
68
- },
69
- {
70
- "cirq_type": "GridQubit",
71
- "row": 0,
72
- "col": 2
73
- },
74
- {
75
- "cirq_type": "GridQubit",
76
- "row": 1,
77
- "col": 0
78
- },
79
- {
80
- "cirq_type": "GridQubit",
81
- "row": 1,
82
- "col": 1
83
- },
84
- {
85
- "cirq_type": "GridQubit",
86
- "row": 1,
87
- "col": 2
88
- }
89
- ],
90
- "two_qubit_gate": {
91
- "cirq_type": "CZPowGate",
92
- "exponent": 1.0,
93
- "global_shift": 0.0
94
- },
95
- "num_circuits": 50,
96
- "repetitions": 1000,
97
- "cycles": [
98
- 3,
99
- 6,
100
- 9,
101
- 12
102
- ],
103
- "layers": [
104
- {
105
- "cirq_type": "GridInteractionLayer",
106
- "col_offset": 1,
107
- "vertical": false,
108
- "stagger": true
109
- },
110
- {
111
- "cirq_type": "GridInteractionLayer",
112
- "col_offset": 0,
113
- "vertical": false,
114
- "stagger": true
115
- }
116
- ],
117
- "seed": null
118
- }
119
- ]
@@ -1 +0,0 @@
1
- [cirq.experiments.grid_parallel_two_qubit_xeb.GridParallelXEBMetadata(qubits=[cirq.GridQubit(0, 0), cirq.GridQubit(0, 1), cirq.GridQubit(1, 0), cirq.GridQubit(1, 1)], two_qubit_gate=cirq.ISWAP, num_circuits=10, repetitions=10000, cycles=[2, 4, 6, 8, 10], layers=[cirq.experiments.GridInteractionLayer(col_offset=0, vertical=True, stagger=True), cirq.experiments.GridInteractionLayer(col_offset=1, vertical=True, stagger=True)], seed=1234), cirq.experiments.grid_parallel_two_qubit_xeb.GridParallelXEBMetadata(qubits=[cirq.GridQubit(0, 0), cirq.GridQubit(0, 1), cirq.GridQubit(0, 2), cirq.GridQubit(1, 0), cirq.GridQubit(1, 1), cirq.GridQubit(1, 2)], two_qubit_gate=cirq.CZ, num_circuits=50, repetitions=1000, cycles=[3, 6, 9, 12], layers=[cirq.experiments.GridInteractionLayer(col_offset=1, vertical=False, stagger=True), cirq.experiments.GridInteractionLayer(col_offset=0, vertical=False, stagger=True)], seed=None)]