‘quantum’ Dialect

A quantum computing dialect with value semantics.

The quantum dialect extends core MLIR with the necessary types and operations to form the core IR of the Catalyst compiler.

At a minimum, a representation of quantum programs typically contains qubit management, quantum gate operations, and measurements. The chosen representation for this dialect is closely aligned with the operations in the PennyLane quantum computing framework, but also allows for custom instruction sets.

In this dialect, quantum operations are expressed using value semantics. That is abstract qubit values are consumed and produced by operations, instead of operations merely acting on qubit references. This exposes the dataflow of the quantum program in the SSA graph of the MLIR. See QIRO: An SSA-based Quantum IR for Optimization.

Types

ObservableType

A quantum observable for use in measurements.

Syntax: !quantum.obs

QubitType

A value-semantic qubit (state).

Syntax: !quantum.bit

QuregType

An array of value-semantic qubits (i.e. quantum register).

Syntax: !quantum.reg

ResultType

A quantum measurement result.

Syntax: !quantum.res

Operations

Passes