-
Notifications
You must be signed in to change notification settings - Fork 28
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adding parametric compilation for QVM and QPU (#39)
* Fixes the plugin to support pyquil 2.16 * bump pyQuil version * added rewiring * Fixed qubit measuring order * store compiled program * remove partial rewiring * return partial * fix wiring key error * First draft of porting to QubitDevice * Modifying BasisState such that it uses the wires passed (instead of enumerate); rename CCNOT to Toffoli; fix test for test_qvm * Fixing qvm and qpu and their tests * Fixes for the wavelength simulator and tests * Fixing WavefunctionDevice and NumpyWaveFunction Device; added functionality to raise an error for QVM analytic=True case (test included) * Increasing shots for QPU tests * Modifying comments, removing active_wires from test * Update pennylane_forest/qpu.py Co-Authored-By: Josh Izaac <josh146@gmail.com> * Implementing feedback * Docstring * First draft * Using keyword arguments for apply, fixing matrices that were used previously from default.qubit, increasing number of shots such that the stochastic tests will more likely pass * Adding the lookup table, unit tests and a WIP integration test * First draft of lookup table and parametric compilation (tests to be modified) * Modifying the requirements file for the checks * Making the parameter dictionaries instance attributes, such that there are no conflicts between devices * Decreasing number of shots and adding flaky tests to stochastic test cases (each is tried 10 times and they need to pass at least once) * Rename apply_wiring to remap_wires * Adding timeouts that can be defined for qvms, adding tests * Adding timeouts that can be defined for qpus, adding tests * Adding tests for the mutable QNode cases * Docstrings * Tweak tests * Remove no longer used instance attribute _eigs from QVMDevice * Moving the compilation specific changes to to QVMDevice (as no other ForestDevice would have the concept implemented); restricting the QPU lattices in the qvm and qpu tests such that only 5 qubit devices are chosen; adding tests for coverage (e.g. BasisState not used as first) * Move Variable attribute init to test * Docstrings and refactor to apply_rotations * Refactor QVMDevice such that generate_samples returns samples instead of returning and assigning it to dev._samples; adjusting the tests accordingly * Docstrings to attributes and apply_rotations method * Adding comments to parametric compilation logic * Moving comments before if statements, renaming lookup_table * Remove unused imports * Modfying qpu test to be a parametrized test * Adjust flaky runs * Add comment to test * Correct previous error * Remove parameter_map and parameter_reference_map attributes from ForestDevice -> fixing the resulting failing tests by defining reset method in QVMDevice containing a resetting of these attributes; adding compiled_program property (and underlying attribute) which contains the latest compiled program (regardless of whether parametric compilation is turned on or off); refactor generate_samples and place comments inside; adding parametrized tests; adding tests for compiled_program * Modify timeout for test where server failed to respond * Timeout * Update pennylane_forest/qpu.py Co-Authored-By: Josh Izaac <josh146@gmail.com> * Update pennylane_forest/qpu.py Co-Authored-By: Josh Izaac <josh146@gmail.com> * Update pennylane_forest/qpu.py Co-Authored-By: Josh Izaac <josh146@gmail.com> * Docstrings * Reverting pennylane version requirement in requirements.txt * Blacking * Reverting requirements modification; version can be incremented upon release Co-authored-by: Josh Izaac <josh146@gmail.com>
- Loading branch information
1 parent
c03085e
commit 73369e7
Showing
12 changed files
with
1,287 additions
and
673 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.