Skip to content

Commit

Permalink
fix: update condition in temp fix
Browse files Browse the repository at this point in the history
  • Loading branch information
changsookim committed Oct 31, 2024
1 parent 9e9d625 commit 134efd2
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/qibolab/backends.py
Original file line number Diff line number Diff line change
Expand Up @@ -127,8 +127,8 @@ def execute_circuit(self, circuit, initial_state=None, nshots=1000):

# This should be done in qibo side
# Temporary fix: overwrite the wire names
if not all(q in circuit.wire_names for q in self.qubits):
circuit._wire_names = self.qubits
if not all(q in self.qubits for q in circuit.wire_names):
circuit._wire_names = self.qubits[: circuit.nqubits]

sequence, measurement_map = self.compiler.compile(circuit, self.platform)

Expand Down Expand Up @@ -175,8 +175,8 @@ def execute_circuits(self, circuits, initial_states=None, nshots=1000):
# This should be done in qibo side
# Temporary fix: overwrite the wire names
for circuit in circuits:
if not all(q in circuit.wire_names for q in self.qubits):
circuit._wire_names = self.qubits
if not all(q in self.qubits for q in circuit.wire_names):
circuit._wire_names = self.qubits[: circuit.nqubits]

# TODO: Maybe these loops can be parallelized
sequences, measurement_maps = zip(
Expand Down

0 comments on commit 134efd2

Please sign in to comment.