Skip to content

Conversation

@andrijapau
Copy link
Contributor

@andrijapau andrijapau commented Dec 2, 2025

This PR adds basic static wire connectivity support for operators and measurement nodes in the DAG.

@qml.qjit(autograph=True, target="mlir")
@qml.qnode(dev)
def my_workflow(x):
    if x == 2:
        qml.X(0)
    elif x == 3:
        qml.Y(0)
    else:
        qml.Z(0)

    for i in range(3):
        qml.H(0)

    counter = 0 
    while counter < 5:
        qml.RX(0.5, 0)
   
    return qml.expval(qml.PauliZ(0)), qml.probs(), qml.var(qml.X(0)), qml.state()
Screenshot 2025-12-11 at 12 14 40 PM

[sc-104323]

Base automatically changed from feature/visualize-nodes to feature/graph-visualization December 10, 2025 22:57
# TODO: This doesn't logically make sense, but quantum.compbasis
# is obs_op and function below just pulls out the static wires
wires = xdsl_to_qml_measurement(obs_op)
meas = xdsl_to_qml_measurement(op, wires=None if wires == [] else wires)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bit of a rough diff but I essentially merged all handlers into one.

@andrijapau andrijapau requested a review from mudit2812 December 11, 2025 16:22
@andrijapau andrijapau removed the wip PRs that are a Work-In-Progress label Dec 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

unified compiler Pull requests for the integration with xDSL

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants