Closed ohuettenhofer closed 1 week ago
Should be fine (failed test is probabilistic and has nothing to do with the changes here). I Accidentally created some conflicts by squashing commits from the previous PR. Sorry :-)
The conflict should be resolved, but I don't think there was a way to avoid this conflict. The alternative would be for me to keep the history clean directly so squashing isn't necessary, but then I have to rewrite the history every time I push a small change.
usually doesn't happen that much. You were just faster in development than I was with merging :-)
This pull request depends on https://github.com/tequilahub/tequila/pull/370.
For the Qulacs and Qiskit backend, it makes it possible to initialize circuits with arbitrary wavefunctions instead of only basis states. This also adds the parameter for sampling and to
tq.simulate
.I have added boolean flags to the backend circuit objects that indicate which backends support this and throw an error message when necessary. This doesn't seem ideal, but I didn't want to change the other backends that I can't test.
Also, combining initial states with a keymap is awkward, I think it only makes sense if we assume that all states on the inactive qubits are the same. For now I disabled it and throw an error message. I noticed that there's no keymap for sampling, can we get rid of it for simulating too?
Example usage: