-
Notifications
You must be signed in to change notification settings - Fork 28
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
Fixes for version 0.16.0 #73
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice fix @antalszava. Just noticed that two of the tests have the same name and docstring, so I think the first one is never run. Otherwise it looks great!
Quite interesting to compare our different ways of solving the same way, see this _expand_state
function. Just tested using that one here as well, as a comparison, and both pass your tests. 😄
Co-authored-by: Theodor <theodor@xanadu.ai>
…orest into fix_qubit_expand
Co-authored-by: Theodor <theodor@xanadu.ai>
…orest into fix_qubit_expand
Thanks for the catch @thisac! Should be updated now. Hmm, maybe that could mean that we could consider a standardized |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice work @antalszava! 💯
maybe that could mean that we could consider a standardized QubitDevice method for expanding the state
Could be a nice thing to keep in mind at least. I agree!
expand_state
method for the Wavefunction simulator device. Previously it always took the Kronecker product of the subsystems made up of the active wires followed by the subsystems of the inactive wires:|psi> ⊗ |0...0>
. This, however, is incorrect in cases such as having 3 qubits, such that the middle qubit is inactive:|psiA> ⊗ |0> ⊗ |psiB>
is not equal to|psiA>⊗ |psiB> ⊗ |0>
.