Skip to content

Commit 2d84339

Browse files
committed
fixed an error in accelerated comparisons
1 parent 07eb51f commit 2d84339

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/qrisp/environments/quantum_conditionals.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -618,7 +618,11 @@ def q_eq(input_0, input_1, invert = False):
618618
)
619619

620620

621-
with conjugate(cx)(input_0, input_1):
621+
def multi_cx(input_0, input_1):
622+
for i in range(len(input_0)):
623+
cx(input_0[i], input_1[i])
624+
625+
with conjugate(multi_cx)(input_0, input_1):
622626
mcx(input_1, res, method="balauca", ctrl_state=0)
623627

624628

0 commit comments

Comments
 (0)