How to use from_state in python cudaq

I am trying to call cuda.from_state but I am getting the error “AttributeError: module ‘cudaq’ has no attribute ‘from_state’”. Even more odd, when I try to search the source code, I see that this method is not yet implemented in this file: cuda-quantum/python/cudaq/kernel/kernel_builder.py at 8174e141fcb6dfc8550cafa78ab405a8a5da413d · NVIDIA/cuda-quantum · GitHub

What is the right way to construct a kernel using a wavefunction as an array?

I am running on ubuntu using the docker image nvcr.io/nvidia/nightly/cuda-quantum:latest (I just updated my container to ensure I have the latest code).

Hi! A reimplementation of from_state() for the new and improved Python API is WIP: [RFC] [Language] Quantum allocation with state initialization · Issue #1086 · NVIDIA/cuda-quantum · GitHub

This forum is primarily for the cuQuantum libraries rather than CUDA-Q. Would you be willing to post this and future questions as a Discussion on the GitHub? That is checked and responded to regularly by the CUDA-Q team: NVIDIA/cuda-quantum · Discussions · GitHub

1 Like

Excellent, that is very helpful. Thank you! I can post there too but I will catch up to speed on the status of that RFC etc first.