Alex McCaskey
Alex McCaskey
This is definitely a scoping issue. The following works fine ```python cudaq.set_target("nvidia-mqpu") k = ghz(4) cudaq.sample_async(k, qpu_id=0).get().dump() ``` since the kernel is stored to `k` and hence has a live...
I would think so.
The default target for kernel execution is the GPU-accelerated simulators. As a quantum computing user, if I am targeting a simulator, I expect that requesting an expectation value for an...
Just a note here - this is an error with iterating through a string, which we have not implement yet. This is not an error with if statements. If you...
@schweitzpgi I see this in ConvertCCToLLVM.cpp ```cpp void cudaq::opt::populateCCTypeConversions(LLVMTypeConverter *converter) { converter->addConversion([](cc::CallableType type) { return lambdaAsPairOfPointers(type.getContext()); }); ... } ``` Looks like this is setup for just lambdas?
This is also interesting ```llvm define { i8*, i64 } @function_kernel_to_sample._Z16kernel_to_sampleRKSt8functionIFvRN5cudaq7qvectorILm2EEEEE.thunk(i8* nocapture readnone %0, i1 %1) { %3 = tail call %Array* @__quantum__rt__qubit_allocate_array(i64 2) unreachable } define i64 @function_kernel_to_sample._Z16kernel_to_sampleRKSt8functionIFvRN5cudaq7qvectorILm2EEEEE.argsCreator(i8** nocapture...
Here's a test repo for all this https://github.com/amccaskey/test_cudaq_cpp_py_integration ```bash mkdir build && cd build cmake .. -G Ninja -DCUDAQ_DIR=/path/to/cudaq/lib/cmake/cudaq -DCMAKE_BUILD_TYPE=Debug ninja PYTHONPATH=/path/to/cudaq:$PWD gdb --args python3-dbg test.py ```
This is just the code snippet above, and run `cudaq-quake` on it.
@schweitzpgi I updated everything here to treat quantum structs with the value semantic operations `cc.undef`, `cc.insertvalue`, and `cc.extractvalue`. Please take a look and see if this fits better with the...
@schweitzpgi @annagrin We need to figure out how to pack the data for recursive `stdvec` types in `OpaqueArguments.h`