From c4a5736646257fe8559f25d904f5a2928419c1fd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Elena=20Pe=C3=B1a=20Tapia?= Date: Thu, 11 Jan 2024 16:53:11 +0100 Subject: [PATCH] Fix lint --- qiskit/compiler/transpiler.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qiskit/compiler/transpiler.py b/qiskit/compiler/transpiler.py index fcecbe8b588a..258921e7774b 100644 --- a/qiskit/compiler/transpiler.py +++ b/qiskit/compiler/transpiler.py @@ -454,7 +454,7 @@ def _check_circuits_coupling_map(circuits, cmap, backend): for circuit in circuits: # If coupling_map is not None or num_qubits == 1 num_qubits = len(circuit.qubits) - if max_qubits > 0 and (num_qubits > max_qubits): + if 0 < num_qubits < max_qubits: raise CircuitTooWideForTarget( f"Number of qubits ({num_qubits}) in {circuit.name} " f"is greater than maximum ({max_qubits}) in the coupling_map"