Skip to content

Commit 71c5ffa

Browse files
committed
fixed a bug that was introduced with compilation acceleration within comparison computation
1 parent 476d57a commit 71c5ffa

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/qrisp/arithmetic/comparisons.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ def less_than(a, b):
128128
if isinstance(a, QuantumFloat) and isinstance(b, QuantumFloat):
129129
lt_gate = less_than_gate(a, b)
130130

131-
lt_qbl = QuantumBool()
131+
lt_qbl = QuantumBool(qs = a.qs, name = "lt_qbl*")
132132

133133
anc_amount = lt_gate.num_qubits - a.size - b.size - 1
134134

@@ -163,7 +163,7 @@ def less_than(a, b):
163163

164164
lt_gate = less_than_gate(a, b)
165165

166-
lt_qbl = QuantumBool()
166+
lt_qbl = QuantumBool(qs = a.qs, name = "lt_qbl*")
167167

168168
anc_amount = lt_gate.num_qubits - a.size - 1
169169

@@ -205,7 +205,7 @@ def less_than(a, b):
205205
def equal(qf_0, qf_1):
206206
from qrisp import QuantumBool, QuantumFloat, cx, mcx
207207

208-
eq_qbl = QuantumBool()
208+
eq_qbl = QuantumBool(qs = qf_0.qs, name = "eq_qbl*")
209209

210210
if isinstance(qf_1, QuantumFloat):
211211
if qf_1.signed and not qf_0.signed:

0 commit comments

Comments
 (0)