MLIR Passes v1.0
Loading...
Searching...
No Matches
CodeGen.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::createQuakeToTikzPass (llvm::raw_string_ostream &ostream)
 MLIR/Quake pass that generates a tikz diagram to be built using LaTeX.
 
std::unique_ptr< mlir::Pass > mqss::opt::createQASM3ToQuakePass (std::istringstream &qasmStream, bool measureAllQubits=false)
 Pass that generates a quake module form a given QASM3 circuit.
 

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 code generation passes that are part of the MQSS.

Function Documentation

◆ createQASM3ToQuakePass()

std::unique_ptr< mlir::Pass > mqss::opt::createQASM3ToQuakePass ( std::istringstream & qasmStream,
bool measureAllQubits = false )

Pass that generates a quake module form a given QASM3 circuit.

This method constructs an mlir::Pass of the type QASM3ToQuakePass. This pass generates a MLIR/Quake module of a given input QASM3 circuit.

Parameters
[in]measureAllQubits(optional), if this arguments is set true, the output QASM circuit will measure all the qubits using a single instruction.
[out]qasmStreamA raw stream object that stores the QASM circuit.
Returns
An mlir::Pass object containing the definition of the QASM3ToQuakePass. This mlir::Pass object has to be passed to an mlir::PassManager to take effect on any given MLIR module.

◆ createQuakeToTikzPass()

std::unique_ptr< mlir::Pass > mqss::opt::createQuakeToTikzPass ( llvm::raw_string_ostream & ostream)

MLIR/Quake pass that generates a tikz diagram to be built using LaTeX.

This method constructs an mlir::Pass of the type QuakeToTikzPass. This pass generates a tizk diagram of a given input MLIR/Quake module.

Parameters
[out]ostreamA raw stream object that stores the tikz diagram that later can be built using LaTeX.
Returns
An mlir::Pass object containing the definition of the QuakeToTikzPass. This mlir::Pass object has to be passed to an mlir::PassManager to take effect on any given MLIR module.