diff --git a/src/qibolab/backends.py b/src/qibolab/backends.py index 229b2c015..b2207505c 100644 --- a/src/qibolab/backends.py +++ b/src/qibolab/backends.py @@ -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) @@ -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(