Skip to content

Commit

Permalink
fix: use lower case of instruction name
Browse files Browse the repository at this point in the history
  • Loading branch information
chensgit169 committed Nov 30, 2023
1 parent e8d371c commit cd3aac7
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions quafu/visualisation/circuitPlot.py
Original file line number Diff line number Diff line change
Expand Up @@ -187,10 +187,9 @@ def __call__(self,
plt.show()

def _process_ins(self, ins: Instruction, append: bool = True):
name = ins.name
assert name in Instruction.ins_classes, 'If this should occur, please report a bug.'
name = ins.name.lower()
assert name in Instruction.ins_classes, 'Name: %s not registered, if this should occur, please report a bug.' % name

name = name.lower()
_which = slice(np.min(ins.pos), np.max(ins.pos) + 1)
depth = np.max(self.dorders[_which])
paras = ins.paras
Expand Down

0 comments on commit cd3aac7

Please sign in to comment.