MLIR Passes v1.0
Loading...
Searching...
No Matches
CodeGen.hpp
Go to the documentation of this file.
1/* This code and any associated documentation is provided "as is"
2
3Copyright 2024 Munich Quantum Software Stack Project
4
5Licensed under the Apache License, Version 2.0 with LLVM Exceptions (the
6"License"); you may not use this file except in compliance with the License.
7You may obtain a copy of the License at
8
9https://github.com/Munich-Quantum-Software-Stack/passes/blob/develop/LICENSE
10
11Unless required by applicable law or agreed to in writing, software
12distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
13WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
14License for the specific language governing permissions and limitations under
15the License.
16
17SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
18*************************************************************************
19 author Martin Letras
20 date February 2025
21 version 1.0
22*************************************************************************/
33#pragma once
34
35#include "mlir/Pass/Pass.h"
36#include "mlir/Pass/PassManager.h"
37#include "mlir/Pass/PassRegistry.h"
38
39#include "llvm/Support/raw_ostream.h"
40
41#include <stdexcept>
42
48#define CUDAQ_PREFIX_FUNCTION "__nvqpp__mlirgen__"
49
50namespace mqss::opt {
51
62std::unique_ptr<mlir::Pass>
63createQuakeToTikzPass(llvm::raw_string_ostream &ostream);
64
76std::unique_ptr<mlir::Pass>
77createQASM3ToQuakePass(std::istringstream &qasmStream,
78 bool measureAllQubits = false);
79} // namespace mqss::opt
std::unique_ptr< mlir::Pass > createQASM3ToQuakePass(std::istringstream &qasmStream, bool measureAllQubits=false)
Pass that generates a quake module form a given QASM3 circuit.
std::unique_ptr< mlir::Pass > createQuakeToTikzPass(llvm::raw_string_ostream &ostream)
MLIR/Quake pass that generates a tikz diagram to be built using LaTeX.