Skip to content

Commit

Permalink
Fix lint
Browse files Browse the repository at this point in the history
  • Loading branch information
mtreinish committed Mar 30, 2022
1 parent c8766ad commit eea2444
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions qiskit/transpiler/passes/layout/vf2_layout.py
Original file line number Diff line number Diff line change
Expand Up @@ -213,15 +213,15 @@ def _score_layout(self, layout):
bits = layout.get_physical_bits()
score = 0
if self.target is not None and "measure" in self.target:
for bit in bits:
props = self.target["measure"].get((bit,))
if props is None or props.error is None:
score += (
self.coupling_map.graph.out_degree(bit)
+ self.coupling_map.graph.in_degree(bit)
) / len(self.coupling_map.graph)
else:
score += props.error
for bit in bits:
props = self.target["measure"].get((bit,))
if props is None or props.error is None:
score += (
self.coupling_map.graph.out_degree(bit)
+ self.coupling_map.graph.in_degree(bit)
) / len(self.coupling_map.graph)
else:
score += props.error
else:
if self.properties is None:
# Sum qubit degree for each qubit in chosen layout as really rough estimate of error
Expand Down

0 comments on commit eea2444

Please sign in to comment.