From 134efd252649a5af93bc8a3a2cd75f7d55ce021a Mon Sep 17 00:00:00 2001 From: changsookim <> Date: Thu, 31 Oct 2024 14:20:04 +0400 Subject: [PATCH] fix: update condition in temp fix --- src/qibolab/backends.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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(