quil-lang / qvm

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

Fix density-qvm noisy gates and check kraus-ops and readout-povms #228

Closed appleby closed 4 years ago

appleby commented 4 years ago

Changes in this PR include

I've attempted to keep the changes here minimal in order to reduce the risk of introducing more bugs in case we want to try and squeeze these changes in for the 2.15.x forest release, and also because I'm still uncertain how all the pieces fit together.

Open questions + things that could potentially be done in this PR, or else in a follow on:

  1. Remove the call to check-kraus-ops in convert-to-kraus-list and thereby avoid paying that penalty on every transition involving a noisy gate. However, why not go one step further and just store the superoperators directly, and avoid the call to convert-to-kraus-list as well? I think this would be possible for noisy-qvm, but I am still not sure about channel-qvm or basic-noise-qvm...

  2. The base-qvm class has a superoperator-definitions slot. Why don't noisy-qvm and density-qvm use that rather than their noisy-gate-definitions slots?

  3. Why does noisy-qvm require a static gate, but density-qvm is happy to deal with parameters?

  4. Maybe moar tests