Skip to content

Commit 6612674

Browse files
committed
fix docstring and func name
1 parent eaf3251 commit 6612674

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

cirq-core/cirq/transformers/merge_single_qubit_gates.py

+6-5
Original file line numberDiff line numberDiff line change
@@ -168,22 +168,23 @@ def _values_of_sweep(sweep: Sweep, key: str | sympy.Symbol):
168168
return [resolver.value_of(p) for resolver in sweep]
169169

170170

171-
def _merge_single_qubit_gates_to_circuit_op_symbolized(
171+
def _merge_single_qubit_gates_to_phxz_symbolized(
172172
resolved_circuits: List['cirq.AbstractCircuit'],
173173
symbolized_single_tag: str,
174174
context: Optional['cirq.TransformerContext'],
175175
atol: float,
176176
) -> Tuple[List['cirq.Circuit'], frozenset[str], frozenset[str]]:
177-
"""Helper function to merge single qubit ops of resolved circuits to ops of CircuitOperation
178-
type using merge_k_qubit_unitaries.
177+
"""Helper function to merge single qubit ops of resolved circuits to PhasedXZ ops
178+
using merge_k_qubit_unitaries.
179179
180180
Args:
181181
resolved_circuits: A list of circuits where symbols have been replaced with concrete values.
182182
symbolized_single_tag: The tag applied to single-qubit operations that originally
183183
contained symbols before parameterizations.
184184
185185
Returns:
186-
Tuple of merge counts, merged circuits, and merge tags.
186+
Tuple of merge_counts, merged_circuits, and merge_tags, where
187+
merged ops in merged_circuits are tagged by merge_tags.
187188
"""
188189
merge_counts: list[int] = [] # number of merges per resolved_circuit
189190
merged_circuits: list['cirq.Circuit'] = []
@@ -391,7 +392,7 @@ def merge_single_qubit_gates_to_phxz_symbolized(
391392
]
392393

393394
# Step 1, merge single qubit gates of resolved circuits using merge_k_qubit_unitaries.
394-
merged_circuits, merge_tags, new_symbols = _merge_single_qubit_gates_to_circuit_op_symbolized(
395+
merged_circuits, merge_tags, new_symbols = _merge_single_qubit_gates_to_phxz_symbolized(
395396
resolved_circuits, symbolized_single_tag, context, atol
396397
)
397398

0 commit comments

Comments
 (0)