Skip to content

Commit

Permalink
removing unnecessary-list-index-lookup from lint exclusions and updat…
Browse files Browse the repository at this point in the history
…es (Qiskit#12285)
  • Loading branch information
joesho112358 authored Apr 21, 2024
1 parent 5fb343f commit 7175368
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
1 change: 0 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,6 @@ disable = [
"unnecessary-dict-index-lookup",
"unnecessary-dunder-call",
"unnecessary-lambda-assignment",
"unnecessary-list-index-lookup",
"unspecified-encoding",
"unsupported-assignment-operation",
"use-dict-literal",
Expand Down
2 changes: 1 addition & 1 deletion qiskit/transpiler/passes/routing/stochastic_swap.py
Original file line number Diff line number Diff line change
Expand Up @@ -323,7 +323,7 @@ def _mapper(self, circuit_graph, coupling_graph, trials=20):
# Update the DAG
if not self.fake_run:
self._layer_update(
dagcircuit_output, layerlist[i], best_layout, best_depth, best_circuit
dagcircuit_output, layer, best_layout, best_depth, best_circuit
)
continue

Expand Down
6 changes: 3 additions & 3 deletions test/python/compiler/test_transpiler.py
Original file line number Diff line number Diff line change
Expand Up @@ -294,10 +294,10 @@ def test_transpile_qft_grid(self):

qr = QuantumRegister(8)
circuit = QuantumCircuit(qr)
for i, _ in enumerate(qr):
for i, q in enumerate(qr):
for j in range(i):
circuit.cp(math.pi / float(2 ** (i - j)), qr[i], qr[j])
circuit.h(qr[i])
circuit.cp(math.pi / float(2 ** (i - j)), q, qr[j])
circuit.h(q)

new_circuit = transpile(
circuit, basis_gates=basis_gates, coupling_map=MELBOURNE_CMAP, seed_transpiler=42
Expand Down

0 comments on commit 7175368

Please sign in to comment.