You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
from qadence2_expressions.core import compile, irc
phi = symbol("phi")
expr = RX(phi / 2)(1) * RY(phi / 2)(2)
# this compiles into IR and then into the native backend
api = compile(expr, backend='pyqtorch')
wf = api.run()
expval = api.expectation()
#in case the user wants to debug or inspect the IR which is used to compile into the API object
ir_repr = irc(expr)
print(ir_repr)
>>>Model(
register=AllocQubits(
num_qubits=3,
qubit_positions=[],
grid_type=None,
grid_scale=1.0,
options={},
),
inputs={},
instructions=[
Assign('%0', Call('mul', 0.5, Load('phi'))),
QuInstruct('rx', Support(target=(1,)), Load('%0')),
QuInstruct('ry', Support(target=(2,)), Load('%0')),
],
directives={},
settings={},
)
tagging @Roland-djee @Doomsk too
For debugging purposes
https://jax.readthedocs.io/en/latest/_autosummary/jax.make_jaxpr.html
The text was updated successfully, but these errors were encountered: