Skip to content

Commit ca3fb90

Browse files
fix: nb_cbits setter inverse check
1 parent 224711e commit ca3fb90

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

mpqp/core/circuit.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -384,7 +384,7 @@ def nb_cbits(self, nb_cbits: int):
384384
if (
385385
isinstance(measure, BasisMeasure)
386386
and measure.c_targets is not None
387-
and any(target <= nb_cbits for target in measure.c_targets)
387+
and any(target >= nb_cbits for target in measure.c_targets)
388388
):
389389
raise ValueError(
390390
f"Targets of the measure {repr(measure)} are not "

0 commit comments

Comments
 (0)