MLIR Passes v1.0
Loading...
Searching...
No Matches
Decompositions.hpp File Reference

Go to the source code of this file.

Macros

#define CUDAQ_PREFIX_FUNCTION   "__nvqpp__mlirgen__"
 Macro defining the prefix of each quantum kernel generated by MLIR/Quake. This macro is used to identify MLIR/Quake quantum kernels.
 

Functions

std::unique_ptr< mlir::Pass > mqss::opt::createCxToHCzHDecompositionPass ()
 MLIR/Quake pass that decomposes two qubits CNot (XOp).
 
std::unique_ptr< mlir::Pass > mqss::opt::createCzToHCxHDecompositionPass ()
 MLIR/Quake pass that decomposes two qubits ZOp.
 
std::unique_ptr< mlir::Pass > mqss::opt::createReverseCxPass ()
 MLIR/Quake pass that operates on each CNot gate in a given quantum circuit.
 
std::unique_ptr< mlir::Pass > mqss::opt::createSAdjToSPass ()
 MLIR/Quake pass that operates on the pattern composed of S adjoint and single-qubit gate Z a replaces by a S gate.
 
std::unique_ptr< mlir::Pass > mqss::opt::createSToSAdjPass ()
 MLIR/Quake pass that operates on the pattern composed of S and single-qubit gate Z a replaces by a S adjoint gate.
 

Detailed Description

Header file that defines the signature for each MLIR/Quake defined into the Munich Quantum Software Stack (MQSS).

This header must be included to use the collection of decomposition passes that are part of the MQSS.

Function Documentation

◆ createCxToHCzHDecompositionPass()

std::unique_ptr< mlir::Pass > mqss::opt::createCxToHCzHDecompositionPass ( )

MLIR/Quake pass that decomposes two qubits CNot (XOp).

This method constructs an mlir::Pass of the type CxToHCzHDecompositionPass. This decomposition pass operates on any two qubits XOp operation in a given MLIR/Quake module and performs its replacement by a pattern composed of a Hadamard, Z and Hadamard operations, as follows.

Returns
An mlir::Pass object containing the definition of the CxToHCzHDecompositionPass. This mlir::Pass object has to be passed to an mlir::PassManager to take effect on any given MLIR module.

◆ createCzToHCxHDecompositionPass()

std::unique_ptr< mlir::Pass > mqss::opt::createCzToHCxHDecompositionPass ( )

MLIR/Quake pass that decomposes two qubits ZOp.

This method constructs an mlir::Pass of the type CzToHCxHDecompositionPass. This decomposition pass operates on any two qubits ZOp operation in a given MLIR/Quake module and performs its replacement by a pattern composed of a Hadamard, X and Hadamard operations, as follows.

Returns
An mlir::Pass object containing the definition of the CzToHCxHDecompositionPass. This mlir::Pass object has to be passed to an mlir::PassManager to take effect on any given MLIR module.

◆ createReverseCxPass()

std::unique_ptr< mlir::Pass > mqss::opt::createReverseCxPass ( )

MLIR/Quake pass that operates on each CNot gate in a given quantum circuit.

This method constructs an mlir::Pass of the type ReverseCNotPass. This pass operates on all two-qubit CNot gates and reverses the target and controls by introducing additional Hadamard gates, in a given MLIR/Quake module, as follows.

Returns
An mlir::Pass object containing the definition of the ReverseCNotPass. This mlir::Pass object has to be passed to an mlir::PassManager to take effect on any given MLIR module.

◆ createSAdjToSPass()

std::unique_ptr< mlir::Pass > mqss::opt::createSAdjToSPass ( )

MLIR/Quake pass that operates on the pattern composed of S adjoint and single-qubit gate Z a replaces by a S gate.

This method constructs an mlir::Pass of the type SAdjToSPass. This pass operates on the pattern S adjoint and Z, as follows.

Returns
An mlir::Pass object containing the definition of the SAdjToSPass. This mlir::Pass object has to be passed to an mlir::PassManager to take effect on any given MLIR module.

◆ createSToSAdjPass()

std::unique_ptr< mlir::Pass > mqss::opt::createSToSAdjPass ( )

MLIR/Quake pass that operates on the pattern composed of S and single-qubit gate Z a replaces by a S adjoint gate.

This method constructs an mlir::Pass of the type SAdjToSPass. This pass operates on the pattern S and Z, as follows.

Returns
An mlir::Pass object containing the definition of the SToSAdjPass. This mlir::Pass object has to be passed to an mlir::PassManager to take effect on any given MLIR module.