Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

In shared memory mode, should the QVM still rewire qubits? #67

Open
karalekas opened this issue Apr 8, 2019 · 2 comments
Open

In shared memory mode, should the QVM still rewire qubits? #67

karalekas opened this issue Apr 8, 2019 · 2 comments
Labels
bug Something isn't working

Comments

@karalekas
Copy link
Contributor

For example, when I send the program H 1, the QVM rewrites 1 -> 0 as is expected behavior for using the least number of qubits possible, but for shared memory mode I actually want to apply a Hadamard gate to the qubit indexed 1, because my wavefunction persists from run to run. One can work around this by just applying the identity gate to all qubits at the beginning of the program, but maybe there is a better solution.

@notmgsk
Copy link
Member

notmgsk commented Apr 8, 2019

I wonder if this question should instead be: should the QVM respect certain PRAGMAs like PRESERVE_BLOCK? or otherwise should the QVM be configurable to preserve qubits.

@stylewarning thoughts?

@stylewarning
Copy link
Member

This is really an issue with the idea of a persistent QVM. If a QVM persists, the interpretation of qubits shouldn't change from run to run. So the moral of this issue is correct. Shared memory mode sort of assumes that you're going to be repeatedly poking at memory, and you share the expectation as to where that memory will be.

We should incorporate this as a requirement for implementing persistent QVMs.

@stylewarning stylewarning added the bug Something isn't working label Apr 8, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants