-
Notifications
You must be signed in to change notification settings - Fork 201
Avoid statevector copy in qsim.simulate(qc, initial_state=sv) #617
Copy link
Copy link
Open
Labels
area/c++Involves the C++ code portions of qsimInvolves the C++ code portions of qsimarea/performanceInvolves performance problems or improvementsInvolves performance problems or improvementsarea/pythonInvolves the Python code in qsimInvolves the Python code in qsimcontributors welcomeHelp with this would be appreciatedHelp with this would be appreciatedno QC knowledge neededDoes not require knowledge of quantum computingDoes not require knowledge of quantum computing
Milestone
Metadata
Metadata
Assignees
Labels
area/c++Involves the C++ code portions of qsimInvolves the C++ code portions of qsimarea/performanceInvolves performance problems or improvementsInvolves performance problems or improvementsarea/pythonInvolves the Python code in qsimInvolves the Python code in qsimcontributors welcomeHelp with this would be appreciatedHelp with this would be appreciatedno QC knowledge neededDoes not require knowledge of quantum computingDoes not require knowledge of quantum computing
Type
Fields
Give feedbackNo fields configured for Enhancement.
Projects
Status
No status
I have a use case where I am simulating my circuit piece by piece so using the ability to pass an initial state to qsim is very handy.
However I have noticed this makes a copy of the initial_state here:
Is there a way to avoid the expensive copy?
If there is a little patch that can be applied (I assume couple of lines in void init_state() should do it) I would be happy to apply it locally and re-build qsim.
Thanks!