Sergei Isakov

Results 20 comments of Sergei Isakov

> because the cuQuantum Appliance would still contain (proprietary? [1]) modifications over qsim Yes, it seems the cuQuantum Appliance contains proprietary modifications over qsim.

The free at [pybind_main.cpp:788](https://github.com/quantumlib/qsim/blob/master/pybind_interface/pybind_main.cpp#L788) deallocates the memory allocated on the C++ side. If the memory is allocated by Python then this free tries to perform additional deallocation.

A note on performance. Just running ```Python sim = cirq.Simulator() sim.simulate(qc_cirq) ``` doesn't really perform any simulation. Running, say, ```Python sim = cirq.Simulator() result = sim.simulate(qc_cirq) print(result.state_vector()[0]) ``` performs simulation...

There is also a memory alignment issue. You see seg fault before printing when the state vector is not properly aligned.

> I believe the OOM issue on a2-highgpu-1g happens even on deep circuits Yes, the OOM issue happens even on deep circuits. I think this issue should be fixed on...

> However, is it safe to do so? I think it should be safe to do so. > I suppose, in addition to reusing the buffer from the C++ layer,...

I think it shouldn't be deterministic. You can try to add `printf("%lu\n", (uint64_t) ptr % 32)` or `printf("%lu\n", (uint64_t) ptr % 64)` (depending on what you have: AVX or AVX512)...

@mchan90, thank you for filling an issue. Could you share a minimal code that reproduces this error?

There is no native multi-GPU support in qsim and there are no plans to implement it. Note that there is multi-GPU support in qsimcirq via [NVIDIA cuQuantum Appliance](https://catalog.ngc.nvidia.com/orgs/nvidia/containers/cuquantum-appliance).