Skip to content

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
  • Loading branch information
aeddins-ibm committed Aug 1, 2024
1 parent 8c5a322 commit e5aad3c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@ def paulis(self, value):
raise ValueError(
f"incorrect number of operators: expected {len(self.paulis)}, got {len(value)}"
)
self.coeffs *= (-1j)**value.phase
self.coeffs *= (-1j) ** value.phase
self._pauli_list = PauliList.from_symplectic(value.z, value.x, phase=0)

@property
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1096,7 +1096,7 @@ def test_paulis_setter_rejects_bad_inputs(self):
op.paulis = PauliList([Pauli("X"), Pauli("Y")])
with self.assertRaisesRegex(ValueError, "incorrect number of operators"):
op.paulis = PauliList([Pauli("XY"), Pauli("ZX"), Pauli("YZ")])

def test_paulis_setter_absorbs_phase(self):
"""Test that the setter for `paulis` absorbs `paulis.phase` to `self.coeffs`."""
coeffs_init = np.array([1, 1j])
Expand Down

0 comments on commit e5aad3c

Please sign in to comment.