Skip to content

Commit

Permalink
🚨 fix ruff warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
burgholzer committed Jul 1, 2024
1 parent bde0df6 commit 44dbbd3
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions src/mqt/syrec/syrec_editor.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,12 +104,10 @@ def load(self, circ):
self.add_line_label(width, i * 30, circ.outputs[i], QtCore.Qt.AlignmentFlag.AlignLeft, circ.garbage[i])
)

index = 0
for g in circ:
for index, g in enumerate(circ):
gate_item = GateItem(g, index, self.circ)
gate_item.setPos(index * 30 + 15, 0)
self.scene().addItem(gate_item)
index += 1

def add_line_label(self, x, y, text, align, color):
text_item = self.scene().addText(text)
Expand Down Expand Up @@ -314,15 +312,12 @@ def stat(self):

def sim(self):
bit_mask = 0
bit_pos = 0
bit1_mask = 0

for i in self.circ.constants:
for bit_pos, i in enumerate(self.circ.constants):
if i is None:
bit_mask += 2**bit_pos

bit_pos += 1

no_of_bits = len(self.circ.constants)

input_list = [x & bit_mask for x in range(2**no_of_bits)]
Expand Down

0 comments on commit 44dbbd3

Please sign in to comment.