From cd3aac70591b75aada1f554252e056e94c8df4f7 Mon Sep 17 00:00:00 2001 From: chensgit169 Date: Thu, 30 Nov 2023 16:11:43 +0800 Subject: [PATCH] fix: use lower case of instruction name --- quafu/visualisation/circuitPlot.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/quafu/visualisation/circuitPlot.py b/quafu/visualisation/circuitPlot.py index 4866ce7..dcc5eac 100644 --- a/quafu/visualisation/circuitPlot.py +++ b/quafu/visualisation/circuitPlot.py @@ -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