Closed paaige closed 1 year ago
@paaige if you're using the cuQuantum Appliance, I'd recommend posting this issue on our GitHub as well so that we can follow/update this issue.
I did this on your behalf: https://github.com/NVIDIA/cuQuantum/issues/75
Added a clarifying note to the linked issue. In short: QSimOptions
only accepts individual option values, not a dict. The {string: value} input format referenced in the docstring can be passed to QSimSimulator
as the options
parameter.
I'm getting the following error (using the CuQuantum container here) when attempting to simulate the statevector of a circuit.
Was able to produce a MWE where this repros with:
Traceback (most recent call last): File "gpu_simulation.py", line 90, in
print(get_statevector(qc))
File "gpu_simulation.py", line 79, in get_statevector
sv = sim.simulate(program=circuit).final_state_vector
File "/home/cuquantum/conda/envs/cuquantum-23.03/lib/python3.8/site-packages/cirq/sim/simulator.py", line 495, in simulate
return self.simulate_sweep(
File "/home/cuquantum/conda/envs/cuquantum-23.03/lib/python3.8/site-packages/cirq/sim/simulator.py", line 510, in simulate_sweep
return list(self.simulate_sweep_iter(program, params, qubit_order, initial_state))
File "/home/cuquantum/conda/envs/cuquantum-23.03/lib/python3.8/site-packages/qsimcirq/qsim_simulator.py", line 523, in simulate_sweep_iter
qsim_state = fullstate_simulator_fn(options, initial_state)
RuntimeError: Unable to cast Python instance to C++ type (#define PYBIND11_DETAILED_ERROR_MESSAGES or compile in debug mode for details)
edit: this also repros with the example full state vector simulation in this tutorial here.
qsimcirq version 0.16.3 cuda version 11.8 Ubuntu 18.04
cc: @leofang