Skip to content

Commit 4e7d01a

Browse files
chore: Update mpqp/core/circuit.py
Co-authored-by: Henri-ColibrITD <133855265+Henri-ColibrITD@users.noreply.github.com>
1 parent 60efbae commit 4e7d01a

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

mpqp/core/circuit.py

+1-2
Original file line numberDiff line numberDiff line change
@@ -263,8 +263,7 @@ def _check_components_targets(self, components: Instruction | NoiseModel):
263263
if isinstance(components, NoiseModel):
264264
if (
265265
isinstance(components, DimensionalNoiseModel)
266-
and len(components.targets) != 0
267-
and len(components.targets) < components.dimension
266+
and 0 < len(components.targets) < components.dimension
268267
):
269268
raise ValueError(
270269
f"Number of target qubits {len(components.targets)} should be higher than "

0 commit comments

Comments
 (0)