36#include "cudaq/Optimizer/Dialect/Quake/QuakeDialect.h"
37#include "cudaq/Optimizer/Dialect/Quake/QuakeOps.h"
38#include "cudaq/Support/Plugin.h"
39#include "mlir/Dialect/SCF/IR/SCF.h"
40#include "mlir/Rewrite/FrozenRewritePatternSet.h"
41#include "mlir/Transforms/DialectConversion.h"
43#include "llvm/Support/Casting.h"
44#include "llvm/Support/raw_ostream.h"
48namespace mqss::support::quakeDialect {
104 std::map<int, int> &measurements);
148 mlir::Value targetQubit);
160 mlir::Value targetQubit);
163namespace supportQuake = mqss::support::quakeDialect;
std::vector< double > getParametersValues(mlir::ValueRange array)
Function that get a vector of numerical values associated with a given mlir::ValueRange.
int getNumberOfClassicalBits(func::FuncOp circuit, std::map< int, int > &measurements)
Function that get the number of classical bits used by a given quantum kernel.
double extractDoubleArgumentValue(Operation *op)
Function that extracts a double numeric value from a numeric value in an MLIR module.
mlir::Operation * getNextOperationOnTarget(mlir::Operation *currentOp, mlir::Value targetQubit)
Function get the next operation on a given target qubit.
mlir::Operation * getPreviousOperationOnTarget(mlir::Operation *currentOp, mlir::Value targetQubit)
Function get the previous operation on a given target qubit.
std::vector< int > getIndicesOfValueRange(mlir::ValueRange array)
Function that get a vector of indices associated with a given mlir::ValueRange.
Value createFloatValue(OpBuilder &builder, Location loc, double value)
Function that creates an mlir::Value associated to a numeric value.
int64_t extractIndexFromQuakeExtractRefOp(Operation *op)
Function that extracts an index of a given ExtractRefOp operation.
int getNumberOfQubits(func::FuncOp circuit)
Function that get the number of qubits used by a given quantum kernel.