Skip to content

Commit

Permalink
Fix typo in sparse_pauli_op.py (#11882)
Browse files Browse the repository at this point in the history
indicies -> indices

(cherry picked from commit 900e910)

# Conflicts:
#	qiskit/quantum_info/operators/symplectic/sparse_pauli_op.py
  • Loading branch information
eltociear authored and mergify[bot] committed Feb 26, 2024
1 parent 31c97a8 commit c04bd28
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions qiskit/quantum_info/operators/symplectic/sparse_pauli_op.py
Original file line number Diff line number Diff line change
Expand Up @@ -1138,8 +1138,15 @@ def apply_layout(
f"applied to a {n_qubits} qubit operator"
)
n_qubits = num_qubits
<<<<<<< HEAD
if any(x >= n_qubits for x in layout):
raise QiskitError("Provided layout contains indicies outside the number of qubits.")
=======
if layout is not None and any(x >= n_qubits for x in layout):
raise QiskitError("Provided layout contains indices outside the number of qubits.")
if layout is None:
layout = list(range(self.num_qubits))
>>>>>>> 900e910a5 (Fix typo in sparse_pauli_op.py (#11882))
new_op = type(self)("I" * n_qubits)
return new_op.compose(self, qargs=layout)

Expand Down

0 comments on commit c04bd28

Please sign in to comment.