cirq-core 1.5.0.dev20250227213459__py3-none-any.whl → 1.5.0.dev20250228190359__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 +1 -1
- cirq/_version_test.py +1 -1
- cirq/transformers/dynamical_decoupling.py +8 -12
- {cirq_core-1.5.0.dev20250227213459.dist-info → cirq_core-1.5.0.dev20250228190359.dist-info}/METADATA +1 -1
- {cirq_core-1.5.0.dev20250227213459.dist-info → cirq_core-1.5.0.dev20250228190359.dist-info}/RECORD +8 -8
- {cirq_core-1.5.0.dev20250227213459.dist-info → cirq_core-1.5.0.dev20250228190359.dist-info}/LICENSE +0 -0
- {cirq_core-1.5.0.dev20250227213459.dist-info → cirq_core-1.5.0.dev20250228190359.dist-info}/WHEEL +0 -0
- {cirq_core-1.5.0.dev20250227213459.dist-info → cirq_core-1.5.0.dev20250228190359.dist-info}/top_level.txt +0 -0
cirq/_version.py
CHANGED
cirq/_version_test.py
CHANGED
|
@@ -58,6 +58,8 @@ def _pauli_up_to_global_phase(gate: ops.Gate) -> Union[ops.Pauli, None]:
|
|
|
58
58
|
def _validate_dd_sequence(dd_sequence: Tuple[ops.Gate, ...]) -> None:
|
|
59
59
|
"""Validates a given dynamical decoupling sequence.
|
|
60
60
|
|
|
61
|
+
The sequence should only consists of Pauli gates and is essentially an identity gate.
|
|
62
|
+
|
|
61
63
|
Args:
|
|
62
64
|
dd_sequence: Input dynamical sequence to be validated.
|
|
63
65
|
|
|
@@ -93,7 +95,7 @@ def _parse_dd_sequence(
|
|
|
93
95
|
_validate_dd_sequence(schema)
|
|
94
96
|
dd_sequence = schema
|
|
95
97
|
|
|
96
|
-
# Map
|
|
98
|
+
# Map gate to Pauli gate. This is necessary as dd sequence might contain gates like X^-1.
|
|
97
99
|
pauli_map: Dict[ops.Gate, ops.Pauli] = {}
|
|
98
100
|
for gate in dd_sequence:
|
|
99
101
|
pauli_gate = _pauli_up_to_global_phase(gate)
|
|
@@ -171,19 +173,13 @@ def _try_merge_single_qubit_ops_of_two_moments(
|
|
|
171
173
|
def _calc_pulled_through(
|
|
172
174
|
moment: circuits.Moment, input_pauli_ops: ops.PauliString
|
|
173
175
|
) -> ops.PauliString:
|
|
174
|
-
"""Calculates the pulled_through such that circuit(
|
|
176
|
+
"""Calculates the pulled_through such that circuit(input_pauli_ops, moment.clifford_ops) is
|
|
175
177
|
equivalent to circuit(moment.clifford_ops, pulled_through).
|
|
176
178
|
"""
|
|
177
179
|
clifford_ops_in_moment: list[ops.Operation] = [
|
|
178
180
|
op for op in moment.operations if _is_clifford_op(op)
|
|
179
181
|
]
|
|
180
|
-
|
|
181
|
-
# fixed.
|
|
182
|
-
affected_qubits = [q for op in clifford_ops_in_moment for q in op.qubits]
|
|
183
|
-
all_cliffords_in_gate: ops.CliffordGate = ops.CliffordGate.from_op_list(
|
|
184
|
-
clifford_ops_in_moment, affected_qubits
|
|
185
|
-
)
|
|
186
|
-
return input_pauli_ops.after(all_cliffords_in_gate.on(*affected_qubits))
|
|
182
|
+
return input_pauli_ops.after(clifford_ops_in_moment)
|
|
187
183
|
|
|
188
184
|
|
|
189
185
|
def _get_stop_qubits(moment: circuits.Moment) -> set[ops.Qid]:
|
|
@@ -197,7 +193,7 @@ def _get_stop_qubits(moment: circuits.Moment) -> set[ops.Qid]:
|
|
|
197
193
|
|
|
198
194
|
|
|
199
195
|
def _need_merge_pulled_through(op_at_q: ops.Operation, is_at_last_busy_moment: bool) -> bool:
|
|
200
|
-
"""With a pulling through
|
|
196
|
+
"""With a pulling through pauli gate before op_at_q, need to merge with the
|
|
201
197
|
pauli in the conditions below."""
|
|
202
198
|
# The op must be mergable and single-qubit
|
|
203
199
|
if not (_is_single_qubit_operation(op_at_q) and has_unitary(op_at_q)):
|
|
@@ -234,7 +230,7 @@ def add_dynamical_decoupling(
|
|
|
234
230
|
|
|
235
231
|
busy_moment_range_by_qubit = _calc_busy_moment_range_of_each_qubit(orig_circuit)
|
|
236
232
|
|
|
237
|
-
# Stores all the moments of the output circuit
|
|
233
|
+
# Stores all the moments of the output circuit chronologically.
|
|
238
234
|
transformed_moments: list[circuits.Moment] = []
|
|
239
235
|
# A PauliString stores the result of 'pulling' Pauli gates past each operations
|
|
240
236
|
# right before the current moment.
|
|
@@ -247,7 +243,7 @@ def add_dynamical_decoupling(
|
|
|
247
243
|
pulled_through *= pauli_map[insert_gate].on(q)
|
|
248
244
|
return insert_gate.on(q)
|
|
249
245
|
|
|
250
|
-
# Insert and pull remaining
|
|
246
|
+
# Insert and pull remaining Pauli ops through the whole circuit.
|
|
251
247
|
# General ideas are
|
|
252
248
|
# * Pull through Clifford gates.
|
|
253
249
|
# * Stop at multi-qubit non-Clifford ops (and other non-mergable ops).
|
{cirq_core-1.5.0.dev20250227213459.dist-info → cirq_core-1.5.0.dev20250228190359.dist-info}/METADATA
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: cirq-core
|
|
3
|
-
Version: 1.5.0.
|
|
3
|
+
Version: 1.5.0.dev20250228190359
|
|
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
|
{cirq_core-1.5.0.dev20250227213459.dist-info → cirq_core-1.5.0.dev20250228190359.dist-info}/RECORD
RENAMED
|
@@ -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=
|
|
8
|
-
cirq/_version_test.py,sha256=
|
|
7
|
+
cirq/_version.py,sha256=UPJl349FxWjsWizkDjDz05XDqCc58wJwpkqU6dNSAoA,1206
|
|
8
|
+
cirq/_version_test.py,sha256=WxfP0VcQ44lunBhOHyKvVZlDlkkDzUmaA1tXcjOeBm4,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
|
|
@@ -1045,7 +1045,7 @@ cirq/transformers/drop_empty_moments.py,sha256=Rtn_BrpwkLXyZBdLzwdnsnEGWTdYuf1xO
|
|
|
1045
1045
|
cirq/transformers/drop_empty_moments_test.py,sha256=G8pZmTfi8NG2NpGz_K3LZu5NQoqa-xPMCuZjwEu07xk,1907
|
|
1046
1046
|
cirq/transformers/drop_negligible_operations.py,sha256=8eyOMy7bra2wJAjORbk6QjwHiLdL5SfwRaz8D2Dazbw,2083
|
|
1047
1047
|
cirq/transformers/drop_negligible_operations_test.py,sha256=gqL6RoDPm6Zf4RxtprBenFyIsZQPUxmPur9oRl0Yr3U,3823
|
|
1048
|
-
cirq/transformers/dynamical_decoupling.py,sha256=
|
|
1048
|
+
cirq/transformers/dynamical_decoupling.py,sha256=w3Gv9_dFMl2u6h0oKWWYTUuYXDFTqgBlP5HT3NpSyCc,14700
|
|
1049
1049
|
cirq/transformers/dynamical_decoupling_test.py,sha256=XCLH9Clco1KM6NXQmaVYCpUR1SALBRofgFgCH79RBuI,44690
|
|
1050
1050
|
cirq/transformers/eject_phased_paulis.py,sha256=usuPCxHgZf6Aw6pqIU4vOvaOypH4SiT2lY8VwAnlObs,13975
|
|
1051
1051
|
cirq/transformers/eject_phased_paulis_test.py,sha256=-mXsfbi3V0ojC_YqoQM5otzdW4kjGusCx6F-kCv8M98,15834
|
|
@@ -1202,8 +1202,8 @@ cirq/work/sampler.py,sha256=bE5tmVkcR6cZZMLETxDfHehdsYUMbx2RvBeIBetehI4,19187
|
|
|
1202
1202
|
cirq/work/sampler_test.py,sha256=hL2UWx3dz2ukZVNxWftiKVvJcQoLplLZdQm-k1QcA40,13282
|
|
1203
1203
|
cirq/work/zeros_sampler.py,sha256=x1C7cup66a43n-3tm8QjhiqJa07qcJW10FxNp9jJ59Q,2356
|
|
1204
1204
|
cirq/work/zeros_sampler_test.py,sha256=JIkpBBFPJe5Ba4142vzogyWyboG1Q1ZAm0UVGgOoZn8,3279
|
|
1205
|
-
cirq_core-1.5.0.
|
|
1206
|
-
cirq_core-1.5.0.
|
|
1207
|
-
cirq_core-1.5.0.
|
|
1208
|
-
cirq_core-1.5.0.
|
|
1209
|
-
cirq_core-1.5.0.
|
|
1205
|
+
cirq_core-1.5.0.dev20250228190359.dist-info/LICENSE,sha256=tAkwu8-AdEyGxGoSvJ2gVmQdcicWw3j1ZZueVV74M-E,11357
|
|
1206
|
+
cirq_core-1.5.0.dev20250228190359.dist-info/METADATA,sha256=p3OgCYwcU1pqIZeYsnSyDQ8HPxItCupvMiURqO6bqNQ,4817
|
|
1207
|
+
cirq_core-1.5.0.dev20250228190359.dist-info/WHEEL,sha256=tZoeGjtWxWRfdplE7E3d45VPlLNQnvbKiYnx7gwAy8A,92
|
|
1208
|
+
cirq_core-1.5.0.dev20250228190359.dist-info/top_level.txt,sha256=Sz9iOxHU0IEMLSFGwiwOCaN2e9K-jFbBbtpPN1hB73g,5
|
|
1209
|
+
cirq_core-1.5.0.dev20250228190359.dist-info/RECORD,,
|
{cirq_core-1.5.0.dev20250227213459.dist-info → cirq_core-1.5.0.dev20250228190359.dist-info}/LICENSE
RENAMED
|
File without changes
|
{cirq_core-1.5.0.dev20250227213459.dist-info → cirq_core-1.5.0.dev20250228190359.dist-info}/WHEEL
RENAMED
|
File without changes
|
|
File without changes
|