-
Notifications
You must be signed in to change notification settings - Fork 58
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
removing old :AMPLITUDE initarg references in qvm-app #221
Conversation
…osed to the amplitudes initarg.
…rg when make-instance-ing a pure state qvm.
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.
one question about finalizers; otherwise lgtm
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.
LGTM.
However, I'd like to point out that the use of the generic function and the keyword argument named num-qubits
(in the initialize-instance
s of state-representation.lisp
) is inconsistent with the use of number-of-qubits
throughout the rest of the qvm. I'd like to have a consistent interface for that at some point.
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.
LGTM. See @appleby's comments, however.
Before the qvm state representation refactor,
:AMPLITUDES
was an initarg for the different QVM classes to store the wavefunction data of a qvm. This functionality is now replaced by the QVM'sSTATE
, and:AMPLITUDES
is no longer a valid initarg for any QVM. This PR changes theQVM-APP
to call the:STATE
initarg instead of the:AMPLITUDES
initarg whenmake-instance
ing a QVM.This could possibly be more cleanly fixed by having more elegant
make-xxx-qvm
functions that can take pre-allocated amplitudes as arguments for the different types of QVMs. Since these functions do not exist, the QVM-APP usesmake-instance
when creating a QVM with an already allocated amplitudes vector.