You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Users have noted that calling qsim_simulator.simulate() from Cirq takes considerably longer than the qsim simulation itself. This is likely due to the added cost of copying results from C++ to Python, which in theory can be avoided.
To resolve this issue, the pybind layer should ensure that results from Python are captured in C++ objects without copying.
The text was updated successfully, but these errors were encountered:
Calling results = qsim_simulator.simulate() from Cirq takes about the same time as the qsim simulation itself. The results are not copied from C++ to Python. Calling results.state_vector() from Cirq may take considerable time for large circuits. The problem is in Cirq not in qsimcirq, see line 215 in https://github.com/quantumlib/Cirq/blob/master/cirq/sim/state_vector_simulator.py.
Aha! That means this is a victim of Cirq PR 3115, which is meant to prevent mutation of the state vector in other simulators. I'll redirect this issue to Cirq.
Users have noted that calling
qsim_simulator.simulate()
from Cirq takes considerably longer than the qsim simulation itself. This is likely due to the added cost of copying results from C++ to Python, which in theory can be avoided.To resolve this issue, the pybind layer should ensure that results from Python are captured in C++ objects without copying.
The text was updated successfully, but these errors were encountered: