MCPcopy Create free account
hub / github.com/NVIDIA/cuda-quantum / get_unitary_impl

Function get_unitary_impl

python/runtime/cudaq/algorithms/py_unitary.cpp:18–29  ·  view source on GitHub ↗

Compute the unitary of this kernel module.

Source from the content-addressed store, hash-verified

16
17/// Compute the unitary of this kernel module.
18static nanobind::object get_unitary_impl(const std::string &shortName,
19 MlirModule module,
20 cudaq::CompiledModule *compiled,
21 nanobind::args args) {
22 auto f = [=]() {
23 return cudaq::marshal_and_launch_module(shortName, module, args, compiled);
24 };
25
26 // Return as numpy array (dim, dim), complex128
27 auto temp = contrib::get_unitary_cmat(std::move(f));
28 return detail::cmat_to_numpy(temp);
29}
30
31/// Bind the get_unitary cudaq function
32void cudaq::bindPyUnitary(nanobind::module_ &mod) {

Callers

nothing calls this directly

Calls 2

get_unitary_cmatFunction · 0.85
cmat_to_numpyFunction · 0.85

Tested by

no test coverage detected