qvm icon indicating copy to clipboard operation
qvm copied to clipboard

Different wavefunction results for empty program and identity program

Open karalekas opened this issue 5 years ago • 1 comments

When using the wavefunction feature of the QVM (from pyQuil), sending the empty program returns a wavefunction array of length 1 (array([1.+0.j])), but sending the program I 0 returns a wavefunction array of length 2 (array([1.+0.j, 0.+0.j])). While I can certainly see the merit of these two returning different things, I'm not sure I would have expected the empty program to behave as such. Thoughts?

karalekas avatar Apr 08 '19 16:04 karalekas

This is the difference between using no qubits and using one qubit. :)

What would you suppose this should give back?

I 0
I 1

stylewarning avatar Apr 08 '19 23:04 stylewarning