Skip to content

Commit

Permalink
Make identity pauli gadget still have correct qubits
Browse files Browse the repository at this point in the history
  • Loading branch information
willsimmons1465 committed Jul 18, 2023
1 parent e994992 commit a701314
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tket/src/Circuit/CircUtils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,7 @@ Circuit pauli_gadget(
QubitPauliTensor pauli, Expr angle, CXConfigType cx_config) {
Expr converted_angle = pauli_angle_convert_or_throw(pauli.coeff, angle);
if (pauli.string.is_identity()) {
Circuit phase_circ(0);
Circuit phase_circ(pauli.string.map.size());
phase_circ.add_phase(-converted_angle / 2);
return phase_circ;
}
Expand Down

0 comments on commit a701314

Please sign in to comment.