Skip to content

Commit

Permalink
Whelp last one last one
Browse files Browse the repository at this point in the history
  • Loading branch information
brennanfreeze committed Oct 28, 2024
1 parent 6228edc commit a832665
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/tools/phase_angle.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,15 +36,15 @@ def phase_angle(

elif isinstance(show_bit, str):
phaseangle = int(show_bit, 2)
if 2**circuit_size <= phase_angle:
if 2**size <= phase_angle:
OutOfRangeError(
f"Cannot show bit of value {show_bit} as it is out of range"
)
phaseangle = mod(angle(state[phaseangle]), 2 * pi) * (180 / pi)

elif isinstance(show_bit, int):
phaseangle = show_bit
if 2**circuit_size <= phase_angle:
if 2**size <= phase_angle:
OutOfRangeError(
f"Cannot show bit of value {show_bit} as it is out of range"
)
Expand Down

0 comments on commit a832665

Please sign in to comment.