From 2d84339c2abf4abdea31740ba03bce5a77649841 Mon Sep 17 00:00:00 2001 From: positr0nium Date: Fri, 23 Feb 2024 17:53:41 +0100 Subject: [PATCH] fixed an error in accelerated comparisons --- src/qrisp/environments/quantum_conditionals.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/qrisp/environments/quantum_conditionals.py b/src/qrisp/environments/quantum_conditionals.py index ffaeb831..9a5ec29e 100644 --- a/src/qrisp/environments/quantum_conditionals.py +++ b/src/qrisp/environments/quantum_conditionals.py @@ -618,7 +618,11 @@ def q_eq(input_0, input_1, invert = False): ) - with conjugate(cx)(input_0, input_1): + def multi_cx(input_0, input_1): + for i in range(len(input_0)): + cx(input_0[i], input_1[i]) + + with conjugate(multi_cx)(input_0, input_1): mcx(input_1, res, method="balauca", ctrl_state=0)