Skip to content

Avoid statevector copy in qsim.simulate(qc, initial_state=sv) #617

@hthayko

Description

@hthayko

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!

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/c++Involves the C++ code portions of qsimarea/performanceInvolves performance problems or improvementsarea/pythonInvolves the Python code in qsimcontributors welcomeHelp with this would be appreciatedno QC knowledge neededDoes not require knowledge of quantum computing
    No fields configured for Enhancement.

    Projects

    Status

    No status

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions