Skip to content

Commit

Permalink
fix tox
Browse files Browse the repository at this point in the history
  • Loading branch information
dakk committed Dec 7, 2023
1 parent 6da040f commit af31f46
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion qlasskit/algorithms/deutschjozsa.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ def __init__(

self.f: QlassF = f
self.search_space_size = len(f.args[0])
self._qcircuit = QCircuit(self.f.num_qubits, name=f"deutsch_" + f.name)
self._qcircuit = QCircuit(self.f.num_qubits, name=f"deutsch_{f.name}")

self._f_circuit = self.f.circuit()

Expand Down
2 changes: 1 addition & 1 deletion qlasskit/algorithms/grover.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ def __init__(

self.n_iterations = n_iterations

self._qcircuit = QCircuit(self.search_space_size, name=f"grover_" + oracle.name)
self._qcircuit = QCircuit(self.search_space_size, name=f"grover__{oracle.name}")

# State preparation
self._qcircuit.barrier(label="s")
Expand Down
2 changes: 1 addition & 1 deletion qlasskit/algorithms/simon.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ def __init__(

self.f: QlassF = f
self.search_space_size = len(f.args[0])
self._qcircuit = QCircuit(self.f.num_qubits, name=f"simon_" + f.name)
self._qcircuit = QCircuit(self.f.num_qubits, name=f"simon_{f.name}")

# State preparation
self._qcircuit.barrier(label="s")
Expand Down
4 changes: 3 additions & 1 deletion qlasskit/qcircuit/qcircuit.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,9 @@ def get_key_by_index(self, i: int):

def __repr__(self):
"""Return a string representation of the QCircuit"""
return f"QCircuit<{self.name}>({self.num_gates} gates, {self.num_qubits} qubits)"
return (
f"QCircuit<{self.name}>({self.num_gates} gates, {self.num_qubits} qubits)"
)

def __contains__(self, key: Union[str, Symbol, int]):
"""Return True if the circuit contain a qubit with a given name/symbol"""
Expand Down

0 comments on commit af31f46

Please sign in to comment.