Skip to content

Commit

Permalink
Lint to contribution standard
Browse files Browse the repository at this point in the history
  • Loading branch information
gcalin committed Dec 21, 2023
1 parent bbe0df0 commit b593082
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
1 change: 0 additions & 1 deletion pytket/extensions/qulacs/backends/qulacs_backend.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@
from pytket.circuit import Pauli
from pytket.passes import auto_rebase_pass
from pytket.pauli import QubitPauliString
from pytket.architecture import Architecture
from pytket.utils.operators import QubitPauliOperator
from pytket.utils.outcomearray import OutcomeArray
from pytket.extensions.qulacs.qulacs_convert import (
Expand Down
11 changes: 6 additions & 5 deletions pytket/extensions/qulacs/qulacs_convert.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,9 @@ def get_register_offset_map(circuit: Circuit) -> dict[str, int]:
circuit (Circuit): The circuit for which to create the map.
Returns:
dict[str, int]: A dictionary where the keys are the names of the quantum registers
of the circuit and the values are the total number of qubits in preceeding registers.
dict[str, int]: A dictionary where the keys are the names of the quantum
registers of the circuit and the values are
the total number of qubits in preceeding registers.
"""
qubits_preceeding = 0
offset_dict: dict[str, int] = {}
Expand All @@ -57,7 +58,8 @@ def get_qubit_index_map(circuit: Circuit, reverse_order: bool) -> dict[Qubit, in
Returns:
dict[Qubit, int]: A dictionary where the keys are the circuit's qubits
and the values are the absolute positions of qubits, accounting for the register's position.
and the values are the absolute positions of qubits,
accounting for the register's position.
"""
# Get the dictionary accounting for register positions
offset_map = get_register_offset_map(circuit)
Expand Down Expand Up @@ -106,8 +108,7 @@ def tk_to_qulacs(
circ = circuit.copy()
if replace_implicit_swaps:
circ.replace_implicit_wire_swaps()
n_qubits = circ.n_qubits
qulacs_circ = QuantumCircuit(circ.n_qubits)
qulacs_circ = QuantumCircuit(circ.n_qubits)

# Dictionary mapping qubits to their absolute position
# Within the quantum circuit
Expand Down

0 comments on commit b593082

Please sign in to comment.