-
Notifications
You must be signed in to change notification settings - Fork 54
Open
Description
from qrisp import *
@terminal_sampling
def main():
coeffs = jnp.array([1.,2.,1.,3.])
qb = QuantumBool()
h(qb)
qv = QuantumFloat(2)
with control(qb):
prepare(qv, coeffs, method="qswitch")
return qv
main()
Yields: ValueError: Tried to evaluate jaxpr with insufficient arguments: expected 7 (including 3 consts), got 10.
and
from qrisp import *
@terminal_sampling
def main():
coeffs = jnp.array([1.,2.,1.,3.])
qb = QuantumBool()
h(qb)
qv = QuantumFloat(2)
with invert():
prepare(qv, coeffs, method="qswitch")
return qv
main()
Yields: ValueError: Tried to evaluate jaxpr with insufficient arguments: expected 6 (including 3 consts), got 9.
Most likely, the prepare_qswitchmethod should be wrapped in @custom_control and @custom_inversion @PietropaoloFrisoni @positr0nium
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels