MLIR Passes v1.0
Loading...
Searching...
No Matches
Decompositions.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#ifndef DECOMPOSITIONS_H
34#define DECOMPOSITIONS_H
35
36#pragma once
37
38#include "mlir/Pass/Pass.h"
39#include "mlir/Pass/PassManager.h"
40#include "mlir/Pass/PassRegistry.h"
41
42#include "llvm/Support/raw_ostream.h"
43
44#include <stdexcept>
45
51#define CUDAQ_PREFIX_FUNCTION "__nvqpp__mlirgen__"
52
53namespace mqss::opt {
54
68std::unique_ptr<mlir::Pass> createCxToHCzHDecompositionPass();
69
83std::unique_ptr<mlir::Pass> createCzToHCxHDecompositionPass();
84
99std::unique_ptr<mlir::Pass> createReverseCxPass();
100
113std::unique_ptr<mlir::Pass> createSAdjToSPass();
114
127std::unique_ptr<mlir::Pass> createSToSAdjPass();
128} // namespace mqss::opt
129#endif // DECOMPOSITIONS_H
std::unique_ptr< mlir::Pass > createCxToHCzHDecompositionPass()
MLIR/Quake pass that decomposes two qubits CNot (XOp).
std::unique_ptr< mlir::Pass > createSToSAdjPass()
MLIR/Quake pass that operates on the pattern composed of S and single-qubit gate Z a replaces by a S ...
std::unique_ptr< mlir::Pass > createCzToHCxHDecompositionPass()
MLIR/Quake pass that decomposes two qubits ZOp.
std::unique_ptr< mlir::Pass > createSAdjToSPass()
MLIR/Quake pass that operates on the pattern composed of S adjoint and single-qubit gate Z a replaces...
std::unique_ptr< mlir::Pass > createReverseCxPass()
MLIR/Quake pass that operates on each CNot gate in a given quantum circuit.