Skip to content

Commit

Permalink
Fix typo and add more helpful assertion message. (#6221)
Browse files Browse the repository at this point in the history
  • Loading branch information
fdmalone committed Jul 31, 2023
1 parent 1c038c3 commit c15dd03
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion cirq-ft/cirq_ft/infra/gate_with_registers.py
Expand Up @@ -122,7 +122,9 @@ def merge_qubits(
) -> List[cirq.Qid]:
ret: List[cirq.Qid] = []
for reg in self:
assert reg.name in qubit_regs, "All qubit registers must pe present"
assert (
reg.name in qubit_regs
), f"All qubit registers must be present. {reg.name} not in qubit_regs"
qubits = qubit_regs[reg.name]
qubits = np.array([qubits] if isinstance(qubits, cirq.Qid) else qubits)
assert (
Expand Down

0 comments on commit c15dd03

Please sign in to comment.