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
Add a graph_state_prep operation to the MBQC dialect (#1965)
**Context:** We require a more compact way to express graph states in
the IR for MBQC workloads, and one that is more akin to eventual
hardware-native instructions for allocating resources for a new graph
state.
**Description of the Change:** Adds a new operation to the MBQC dialect
called `mbqc.graph_state_prep`, which logically is equivalent to the
PennyLane operation
[`qml.ftqc.GraphStatePrep`](https://docs.pennylane.ai/en/stable/code/api/pennylane.ftqc.GraphStatePrep.html),
except that it only expresses the desired form of the graph state in the
IR without decomposing it to its equivalent set of quantum gate
operations (such a decomposition can be added in the future as a
compilation pass). For more details on this new operation, please refer
to the documentation included in the op definition.
Some unit tests for other MBQC-dialect ops have also been renamed for
better code organization.
**Example**
```mlir
%adj_matrix = arith.constant dense<[1, 0, 1, 0, 0, 1]> : tensor<6xi1>
%graph_reg = mbqc.graph_state_prep (%adj_matrix : tensor<6xi1>) [init "Hadamard", entangle "CZ"] : !quantum.reg
```
[sc-97319]
*`catalyst.accelerate`, `catalyst.debug.callback`, and `catalyst.pure_callback`, `catalyst.debug.print`, and `catalyst.debug.print_memref` now work when capture is enabled.
0 commit comments