| 60 | constexpr std::array<std::string_view, 2> filterAdjointNames = {"s", "t"}; |
| 61 | |
| 62 | static SmallVector<Value> filterArgs(Operation *op, ValueRange adaptedArgs) { |
| 63 | auto arrAttr = op->getAttrOfType<ArrayAttr>(InitialArgTypesAttrName); |
| 64 | if (!arrAttr) |
| 65 | return {}; |
| 66 | SmallVector<Value> result; |
| 67 | assert(arrAttr.size() == adaptedArgs.size()); |
| 68 | for (auto [tyAttr, argval] : llvm::zip(arrAttr, adaptedArgs)) |
| 69 | if (cudaq::quake::isQuantumValueType(cast<TypeAttr>(tyAttr).getValue())) |
| 70 | result.push_back(argval); |
| 71 | return result; |
| 72 | } |
| 73 | |
| 74 | template <typename OP> |
| 75 | std::pair<std::string, bool> generateGateFunctionName(OP op) { |
no test coverage detected