quil-lang / qvm

The high-performance and featureful Quil simulator.
Other
413 stars 57 forks source link

removing old :AMPLITUDE initarg references in qvm-app #221

Closed sophiaponte closed 4 years ago

sophiaponte commented 4 years ago

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's STATE, and :AMPLITUDES is no longer a valid initarg for any QVM. This PR changes the QVM-APP to call the :STATE initarg instead of the :AMPLITUDES initarg when make-instanceing 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 uses make-instance when creating a QVM with an already allocated amplitudes vector.

sophiaponte commented 4 years ago

This addresses #220. I re-ran the pyquil tests with the qvm in server mode on this branch, and the errors @appleby reported seem to be fixed.