2929#include < mlir/Interfaces/SideEffectInterfaces.h>
3030#include < optional>
3131#include < string>
32- #include < unsupported/Eigen/KroneckerProduct>
3332#include < variant>
3433
3534#define DIALECT_NAME_QCO " qco"
5554
5655namespace mlir ::qco {
5756
58- /* *
59- * @brief Retrieve C++ type of static mlir::Value.
60- * @details The returned float attribute can be used to get the value of the
61- * given parameter as a C++ type.
62- */
63- [[nodiscard]] inline std::optional<double >
64- tryGetParameterAsDouble (UnitaryOpInterface op, size_t i);
6557/* *
6658 * @brief Trait for operations with a fixed number of target qubits and
6759 * parameters
@@ -71,11 +63,6 @@ tryGetParameterAsDouble(UnitaryOpInterface op, size_t i);
7163 * verification and code generation optimizations.
7264 * @tparam T The target arity.
7365 * @tparam P The parameter arity.
74- * @tparam MatrixDefinition A function returning the matrix definition of the
75- * operation. The operation will be provided as the
76- * only argument of the function. If the operation does
77- * not have a matrix definition, set this value to
78- * nullptr.
7966 */
8067template <size_t T, size_t P> class TargetAndParameterArityTrait {
8168public:
@@ -144,14 +131,6 @@ template <size_t T, size_t P> class TargetAndParameterArityTrait {
144131 llvm::reportFatalUsageError (
145132 " Given qubit is not an input of the operation" );
146133 }
147-
148- protected:
149- [[nodiscard]] const Operation* getConstOperation () const {
150- auto * concrete = static_cast <const ConcreteType*>(this );
151- // use dereference operator instead of getOperation() of mlir::Op; the
152- // operator provides a const overload, getOperation() does not
153- return *concrete;
154- }
155134 };
156135};
157136
@@ -163,11 +142,3 @@ template <size_t T, size_t P> class TargetAndParameterArityTrait {
163142
164143#define GET_OP_CLASSES
165144#include " mlir/Dialect/QCO/IR/QCOOps.h.inc" // IWYU pragma: export
166-
167- namespace mlir ::qco {
168-
169- [[nodiscard]] inline UnitaryOpInterface getControlledOp (UnitaryOpInterface op) {
170- return llvm::cast<CtrlOp>(op).getBodyUnitary ();
171- }
172-
173- } // namespace mlir::qco
0 commit comments