mentpy.mbqc.templates.from_pauli(pauli_op: PauliOp) MBQCircuit

Returns a graph state that can implement \(U=e^{-i \theta P}\)

Parameters:
pauli_op : PauliOp

The Pauli operator to implement.

Return type:

The graph state that can implement the Pauli operator.

Examples

Create a graph state that can implement a rotation around \(XYY\).

In [1]: g = mp.templates.from_pauli(mp.PauliOp("XYY"))

In [2]: p_op = g.flow.correction_op(10)

In [3]: mp.draw(g, pauliop=p_op)
Out[3]: (<Figure size 800x300 with 1 Axes>, <Axes: >)
../_images/from_pauli.png