Skip to content

Commit

Permalink
Fixed f-string issue
Browse files Browse the repository at this point in the history
  • Loading branch information
edyounis committed Nov 29, 2023
1 parent dbc093c commit 7594954
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion bqskit/compiler/workflow.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ def name(self) -> str:
def __str__(self) -> str:
name_seq = f'Workflow: {self.name}\n\t'
pass_strs = [
f'{i}. {'Workflow: ' + p.name if isinstance(p, Workflow) else p}'
f'{i}. Workflow: {p.name if isinstance(p, Workflow) else p}'
for i, p in enumerate(self._passes)
]
return name_seq + '\n\t'.join(pass_strs)
Expand Down
2 changes: 1 addition & 1 deletion bqskit/passes/mapping/placement/trivial.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ async def run(self, circuit: Circuit, data: PassData) -> None:
model = BasePass.get_model(circuit, data)
data['placement'] = trivial_placement

_logger.info(f'Placed qudits on {data['placement']}')
_logger.info(f'Placed qudits on {data["placement"]}')

# Raise an error if this is not a valid placement
sg = model.coupling_graph.get_subgraph(data['placement'])
Expand Down
4 changes: 3 additions & 1 deletion tests/compiler/compile/test_pam_verify.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,6 @@ def test_pam_verify(compiler: Compiler, medium_qasm_file: str) -> None:
PI = PermutationMatrix.from_qubit_location(out_circuit.num_qudits, pi)
PF = PermutationMatrix.from_qubit_location(out_circuit.num_qudits, pf)
exact_error = out_utry.get_distance_from(PF.T @ circuit.get_unitary() @ PI)
assert upper_bound_error >= exact_error or abs(upper_bound_error - exact_error) < 5e-7
assert upper_bound_error >= exact_error or abs(
upper_bound_error - exact_error,
) < 5e-7

0 comments on commit 7594954

Please sign in to comment.