mbqc.measure_in_basis (::catalyst::mbqc::MeasureInBasisOp)

A parametric single-qubit projective measurement in an arbitrary basis.

Syntax:

operation ::= `mbqc.measure_in_basis` `[` $plane `,` $angle `]` $in_qubit (`postselect` $postselect^)? attr-dict `:` type(results)

A parametric single-qubit projective measurement is equivalent to the quantum.measure operation except that it supports measurements in an arbitrary basis, rather than the computational basis only. Specifically, the measurement basis is parameterized by a plane along the major axes of the Bloch sphere (either XY, YZ or ZX) and a rotation angle about that plane.

The convention we have adopted to denote the measurement plane is with a two-character string (one of “XY”, “YZ” or “ZX”), where the first character indicates the axis along which the basis vector is aligned for a rotation angle of 0, and the second character indicates the other axis that forms the plane. For instance, the measurement basis defined by the XY plane with a rotation angle of 0 is the Pauli-X basis, with orthonormal basis vector |+> and |->, which point along the +x and -x axes of the Bloch sphere, respectively. For more details, see the documentation for the ``qml.ftqc.measure_arbitrary_basis()` <https://docs.pennylane.ai/en/stable/code/api/pennylane.ftqc.measure_arbitrary_basis.html>`_ function.

Attributes:

AttributeMLIR TypeDescription
plane::catalyst::mbqc::MeasurementPlaneAttrPlanes in the Bloch sphere representation with support for arbitrary-basis measurements
postselect::mlir::IntegerAttr32-bit signless integer attribute whose minimum value is 0 whose maximum value is 1

Operands:

Operand

Description

in_qubit

A value-semantic qubit (state).

angle

64-bit float

Results:

Result

Description

mres

1-bit signless integer

out_qubit

A value-semantic qubit (state).