Skip to content

Commit

Permalink
Update graphix/pauli.py
Browse files Browse the repository at this point in the history
Co-authored-by: S.S. <66886825+EarlMilktea@users.noreply.github.com>
  • Loading branch information
jemappellesami and EarlMilktea authored Aug 21, 2024
1 parent d4a6073 commit df17ca3
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions graphix/pauli.py
Original file line number Diff line number Diff line change
Expand Up @@ -263,13 +263,14 @@ def get_eigenstate(self, eigenvalue=0) -> BasicStates:

if self.symbol == IXYZ.X:
return BasicStates.PLUS if eigenvalue == 0 else BasicStates.MINUS
elif self.symbol == IXYZ.Y:
if self.symbol == IXYZ.Y:
return BasicStates.PLUS_I if eigenvalue == 0 else BasicStates.MINUS_I
elif self.symbol == IXYZ.Z:
if self.symbol == IXYZ.Z:
return BasicStates.ZERO if eigenvalue == 0 else BasicStates.ONE
# Any state is eigenstate of the identity
elif self.symbol == IXYZ.I:
if self.symbol == IXYZ.I:
return BasicStates.PLUS
typing_extensions.assert_never(self.symbol)

def __repr__(self) -> str:
return self.__unit.prefix(self.__symbol.name)
Expand Down

0 comments on commit df17ca3

Please sign in to comment.