NVIDIA / cuda-quantum

C++ and Python support for the CUDA Quantum programming model for heterogeneous quantum-classical workflows
https://nvidia.github.io/cuda-quantum/
Other
491 stars 181 forks source link

Kernel construction from serialized quantum circuit #755

Open MartinBeseda opened 12 months ago

MartinBeseda commented 12 months ago

Required prerequisites

Describe the feature

I'm looking for a way to construct CUDA quantum kernel from pre-defined quantum circuit. It'd be nice to be able to have some text-based representation of the circuit other than direct Python or C++ code, which would directly be provided to a constructor.

I'd think about maybe using OpenQASM code provided in an external file like

OPENQASM 2.0;
include "qelib1.inc";

qreg q[1];
creg c[1];
x q[0];
h q[0];

or anything else like JSON representation and subsequently having a constructor like cuda::make_kernel(qasm_file).

If that's already possible in any format, I'm thankful for the info and sorry for delaying you :smile:

Thank you very much!

gzquse commented 3 months ago

any updates for reading kernel from qasm?