Loading mlir/qir_qrt/qir-qrt.hpp +12 −1 Original line number Diff line number Diff line Loading @@ -159,7 +159,18 @@ void __quantum__rt__capture_update_reference_count(Callable *clb, void __quantum__rt__capture_update_alias_count(Callable *clb, int32_t count); void __quantum__rt__callable_memory_management(int32_t index, Callable *clb, int64_t parameter); Callable *__quantum__rt__callable_make_adjoint(Callable *clb); Callable *__quantum__rt__callable_make_controlled(Callable *clb); // Implementation table: 4x callables of a specific signature typedef struct impl_table_t { void (*f[4])(TuplePtr, TuplePtr, TuplePtr); } impl_table_t; typedef struct mem_management_cb_t { void (*f[2])(TuplePtr, int64_t); } mem_management_cb_t; // Create callable (from Q#): // See spec: https://github.com/microsoft/qsharp-language/blob/main/Specifications/QIR/Callables.md Callable* __quantum__rt__callable_create(impl_table_t* ft, mem_management_cb_t* callbacks, TuplePtr capture); // Classical Runtime: // https://github.com/microsoft/qsharp-language/blob/main/Specifications/QIR/Classical-Runtime.md#classical-runtime void __quantum__rt__fail(QirString *str); Loading mlir/qir_qrt/quantum_rt_callable.cpp +10 −0 Original line number Diff line number Diff line Loading @@ -40,4 +40,14 @@ void __quantum__rt__callable_memory_management(int32_t index, Callable *clb, if (verbose) std::cout << "CALL: " << __PRETTY_FUNCTION__ << "\n"; } Callable *__quantum__rt__callable_make_adjoint(Callable *clb) { std::cout << "CALL: " << __PRETTY_FUNCTION__ << "\n"; } Callable *__quantum__rt__callable_make_controlled(Callable *clb) { std::cout << "CALL: " << __PRETTY_FUNCTION__ << "\n"; } Callable* __quantum__rt__callable_create(impl_table_t* ft, mem_management_cb_t* callbacks, TuplePtr capture) { std::cout << "CALL: " << __PRETTY_FUNCTION__ << "\n"; } } No newline at end of file Loading
mlir/qir_qrt/qir-qrt.hpp +12 −1 Original line number Diff line number Diff line Loading @@ -159,7 +159,18 @@ void __quantum__rt__capture_update_reference_count(Callable *clb, void __quantum__rt__capture_update_alias_count(Callable *clb, int32_t count); void __quantum__rt__callable_memory_management(int32_t index, Callable *clb, int64_t parameter); Callable *__quantum__rt__callable_make_adjoint(Callable *clb); Callable *__quantum__rt__callable_make_controlled(Callable *clb); // Implementation table: 4x callables of a specific signature typedef struct impl_table_t { void (*f[4])(TuplePtr, TuplePtr, TuplePtr); } impl_table_t; typedef struct mem_management_cb_t { void (*f[2])(TuplePtr, int64_t); } mem_management_cb_t; // Create callable (from Q#): // See spec: https://github.com/microsoft/qsharp-language/blob/main/Specifications/QIR/Callables.md Callable* __quantum__rt__callable_create(impl_table_t* ft, mem_management_cb_t* callbacks, TuplePtr capture); // Classical Runtime: // https://github.com/microsoft/qsharp-language/blob/main/Specifications/QIR/Classical-Runtime.md#classical-runtime void __quantum__rt__fail(QirString *str); Loading
mlir/qir_qrt/quantum_rt_callable.cpp +10 −0 Original line number Diff line number Diff line Loading @@ -40,4 +40,14 @@ void __quantum__rt__callable_memory_management(int32_t index, Callable *clb, if (verbose) std::cout << "CALL: " << __PRETTY_FUNCTION__ << "\n"; } Callable *__quantum__rt__callable_make_adjoint(Callable *clb) { std::cout << "CALL: " << __PRETTY_FUNCTION__ << "\n"; } Callable *__quantum__rt__callable_make_controlled(Callable *clb) { std::cout << "CALL: " << __PRETTY_FUNCTION__ << "\n"; } Callable* __quantum__rt__callable_create(impl_table_t* ft, mem_management_cb_t* callbacks, TuplePtr capture) { std::cout << "CALL: " << __PRETTY_FUNCTION__ << "\n"; } } No newline at end of file