Skip to content

Commit

Permalink
Update qasm.py to follow PEP8
Browse files Browse the repository at this point in the history
  • Loading branch information
NoriyukiK-1qbit authored Sep 27, 2023
1 parent 3914ca9 commit 06d5bd2
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/qutip_qip/qasm.py
Original file line number Diff line number Diff line change
Expand Up @@ -889,12 +889,12 @@ def read_qasm(qasm_input, mode="qiskit", version="2.0", strmode=False):
# QASMBench Benchmark Suite has lines that have comments after instructions.
# Not sure if QASM standard allows this.
for i in range(len(qasm_lines)):
qasm_line = qasm_lines[i]
loc_comment = qasm_line.find("//")
if loc_comment >= 0:
qasm_line = qasm_line[0:loc_comment]
qasm_lines[i] = qasm_line
qasm_line = qasm_lines[i]
loc_comment = qasm_line.find("//")
if loc_comment >= 0:
qasm_line = qasm_line[0:loc_comment]
qasm_lines[i] = qasm_line

if version != "2.0":
raise NotImplementedError(
"QASM: Only OpenQASM 2.0 \
Expand Down

0 comments on commit 06d5bd2

Please sign in to comment.