Skip to content

Commit

Permalink
correct code lint
Browse files Browse the repository at this point in the history
  • Loading branch information
raunakkumarsingh committed Jul 19, 2024
1 parent 6613701 commit aec527c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion circuit_knitting/utils/transforms.py
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ def _partition_labels_from_circuit(
# Determine which qubit wires are idle/unused
idle_wires = set(range(circuit.num_qubits))
for instruction in circuit.data:
if instruction.operation.name == 'barrier':
if instruction.operation.name == "barrier":
continue
for q1 in instruction.qubits:
q1_id = circuit.find_bit(q1).index
Expand Down
4 changes: 2 additions & 2 deletions test/utils/test_transforms.py
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,7 @@ def test_separate_circuit(self):
self.assertEqual(
[("A", 0), ("B", 0), ("C", 0)], separated_circuits.qubit_map
)

with self.subTest("barriers are ignored"):
qreg = QuantumRegister(3)
circuit = QuantumCircuit(qreg)
Expand Down Expand Up @@ -303,7 +303,7 @@ def test_separate_circuit(self):
self.assertEqual(
[("A", 0), ("B", 0), ("C", 0)], separated_circuits.qubit_map
)

with self.subTest("Test bit mapping with partition labels"):
# Prepare a HWEA and add some measurements to clbits in a random order
circuit = prepare_hwea()
Expand Down

0 comments on commit aec527c

Please sign in to comment.