-
Notifications
You must be signed in to change notification settings - Fork 39
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
Lightning qubit2 upgrade api #628
Lightning qubit2 upgrade api #628
Conversation
… lightning-qubit2-add-measurements
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## lightning-qubit2-interface #628 +/- ##
===========================================================
Coverage 98.63% 98.64%
===========================================================
Files 172 172
Lines 24337 24348 +11
===========================================================
+ Hits 24004 24017 +13
+ Misses 333 331 -2 ☔ View full report in Codecov by Sentry. |
…s' into lightning-qubit2-upgrade-API
4a3f95f
to
d6fdb79
Compare
… lightning-qubit2-upgrade-API
… lightning-qubit2-upgrade-API
_CPP_BINARY_AVAILABLE = LQ_CPP_BINARY_AVAILABLE | ||
short_name = "lightning.qubit2" |
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.
Was the lack of a short_name
breaking something in particular?
Potentially we could have a deprecation cycle around this pointing to name
instead?
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.
At first I could not properly initialize a device with it's name and I thought I should add this by analogy with lightning.qubit
. But the issue was the missing symlink lightning_qubit2
, I think. So we can remove or keep it.
* update * adding tests from add-simulate branch * merge conflicts * create state vector on initialization * remove import of modifier from lightning * Update pennylane_lightning/lightning_qubit/lightning_qubit2.py * minor test updates * register with setup.py, state vector fixes * add LightningQubit2 to init and format * add cpp binary available variable * Auto update version * reduce dependency on DefaultQubit for tests * update LightningQubit2 * Introduce _new_API and fix/skip few tests. * Fix few more tests. * Skip shots, adjoint, vjp with new API. * Fix no-bin interface. * Remove duplicate class data. * Include LQ2 in linux ests. * --cov-append --------- Co-authored-by: albi3ro <chrissie.c.l@gmail.com> Co-authored-by: AmintorDusko <amintor_dusko@hotmail.com> Co-authored-by: Dev version update bot <github-actions[bot]@users.noreply.github.com>
* lightning interface for new device api * Auto update version * Merge Master * update version * update version * update lightning_qubit_2 * add LightningQubit2 to init * add LightningStateVector class * add LightningMeasurements class * add new QuantumScriptSerializer class * allow lightning.qubit2 to be tested within our suite * add tests and CI workflow for lightning_qubit_2 * update CI * update CI * add wire mapping, black * add tests for custom wires * add tests for custom wires * add review suggestions * format * remove python class to reverse order of PRs * update simulate to get a LightningStateVector * add reset state * update simulate * update docs * add Result import * Update pennylane_lightning/lightning_qubit/_measurements.py Co-authored-by: Christina Lee <chrissie.c.l@gmail.com> * Update pennylane_lightning/lightning_qubit/_measurements.py Co-authored-by: Christina Lee <chrissie.c.l@gmail.com> * fix reset state * Update pennylane_lightning/lightning_qubit/_state_vector.py Co-authored-by: Christina Lee <chrissie.c.l@gmail.com> * Update pennylane_lightning/lightning_qubit/_state_vector.py Co-authored-by: Christina Lee <chrissie.c.l@gmail.com> * Update pennylane_lightning/lightning_qubit/_state_vector.py Co-authored-by: Christina Lee <chrissie.c.l@gmail.com> * remove LightningQubit2 references * remove unnecessary modules * merging Serializer classes * update serialize tests * update measurements with new serialize class * remove outdated test * remove obsolete tests * remove unused dtype input from simulate * update measurements * update state_vector * update lightning_qubit2 * format * pylint * Update pennylane_lightning/lightning_qubit/_state_vector.py Co-authored-by: Christina Lee <chrissie.c.l@gmail.com> * remove old comment * some review suggestions * Auto update version * remove print * update state vector class * add state vector class tests * adding measurement tests * update state vector and tests * move and rename test files, and format * Auto update version * skip measurements class for other devices and in the absence of binaries * format * update measurements class * expand measurement class testing * garbage collection * typo * update coverage and StateVector class * expand measurements class coverage * Auto update version * add coverage for n-controlled operations * add map to standard wires to get_final_state for safety * update jax config import * Auto update version * trigger CI * update state vector class and tests for improved coverage * update measurement class tests * update dev version * remove device definition * update dev version * clean test_measurements_class.py * isort+black * review suggestion * fix docs * increase tolerance * Auto update version * isort * update dev version * add LightningAdjointJacobian class * add unit tests for the LightningAdjointJacobian class * format * add changelog for PR #613 * update changelog * update adjoint Jacobian * codefactor * fix processing_fn_expval * make a proper new_tape * trigger CI * Update .github/CHANGELOG.md Co-authored-by: Vincent Michaud-Rioux <vincentm@nanoacademic.com> * Update pennylane_lightning/lightning_qubit/_adjoint_jacobian.py Co-authored-by: Vincent Michaud-Rioux <vincentm@nanoacademic.com> * Update pennylane_lightning/lightning_qubit/_adjoint_jacobian.py Co-authored-by: Vincent Michaud-Rioux <vincentm@nanoacademic.com> * Add probs support. * Add double-obs tests. * Add qml.var support. * Add probs support. * Add measurement tests with wires. * pytest.skip tests * Fix format * update * adding tests from add-simulate branch * merge conflicts * create state vector on initialization * remove import of modifier from lightning * Update pennylane_lightning/lightning_qubit/lightning_qubit2.py * minor test updates * register with setup.py, state vector fixes * add LightningQubit2 to init and format * add cpp binary available variable * reduce dependency on DefaultQubit for tests * update LightningQubit2 * Fixing rebase artifacts * remove adjoint diff support from supports derivatives * [skip ci] Added skeleton file for LQ2 unit tests * Lightning qubit2 upgrade api (#628) * update * adding tests from add-simulate branch * merge conflicts * create state vector on initialization * remove import of modifier from lightning * Update pennylane_lightning/lightning_qubit/lightning_qubit2.py * minor test updates * register with setup.py, state vector fixes * add LightningQubit2 to init and format * add cpp binary available variable * Auto update version * reduce dependency on DefaultQubit for tests * update LightningQubit2 * Introduce _new_API and fix/skip few tests. * Fix few more tests. * Skip shots, adjoint, vjp with new API. * Fix no-bin interface. * Remove duplicate class data. * Include LQ2 in linux ests. * --cov-append --------- Co-authored-by: albi3ro <chrissie.c.l@gmail.com> Co-authored-by: AmintorDusko <amintor_dusko@hotmail.com> Co-authored-by: Dev version update bot <github-actions[bot]@users.noreply.github.com> * Added init tests; Added skeleton tests for helpers * Resolving rebase artifacts * Added tests; integrated jacobian * Update pennylane_lightning/lightning_qubit/lightning_qubit2.py Co-authored-by: Amintor Dusko <87949283+AmintorDusko@users.noreply.github.com> * Auto update version * Small update to simulate_and_jacobian * Added execution tests; TODO: diff tests * Added derivative tests; TODO: tape batch tests * Finished adding LQ2 tests; TODO: Add var, probs tests * Minor test change * Added var tests; TODO: add probs tests * Auto update version * Added helpers to probs test file * Fixing tests * Fixed no trainable params test * Fixing test collection for new API * Updated apply tests, made LQ2 ops/obs attributes instead of properties * Fixed comparison,expval,gate tests * Added tests; Hamiltonian diff tests are failing * Updated tests for mode adjoint cases * Added more observables; stopped skipping adj-jac tests * Auto update version * Trigger CI * Fixed tests; added docstrings * Linting; formatting * Updated tests per code review * Linting * Fixed gate tests * Trigger CI * Trigger CI * Fixed adj-jac tests * Tidying up * Fixed tf/jax adj-jac tests * Apply suggestions from code review Co-authored-by: Amintor Dusko <87949283+AmintorDusko@users.noreply.github.com> * Adding coverage; addressing code review * Minor updates per code review * Auto update version * Skipping finite shots measurements tests * Update PL requirements; add LQ2 to test without binaries * Apply suggestions from code review Co-authored-by: Amintor Dusko <87949283+AmintorDusko@users.noreply.github.com> * Upadte unnecessarily skipped tests * Auto update version * [skip ci] Skip CI * Removing overlap test * Added dtype to old and new API; updating tests * Added Fallback device dtype property * Updated no binary tests * Auto update version * [skip ci] Skip CI * Trigger CI * Running isort * Trigger CI * Fixed LQ import in MP test; changed docstrings to inline comments * Update tests to use new API * Add changelog entry * Update changelog entry * Apply suggestions from code review Co-authored-by: Ali Asadi <10773383+maliasadi@users.noreply.github.com> * Added TODOs; Updated derivative tests to use batch_obs --------- Co-authored-by: Dev version update bot <github-actions[bot]@users.noreply.github.com> Co-authored-by: AmintorDusko <amintor_dusko@hotmail.com> Co-authored-by: Amintor Dusko <87949283+AmintorDusko@users.noreply.github.com> Co-authored-by: Vincent Michaud-Rioux <vincentm@nanoacademic.com> Co-authored-by: Vincent Michaud-Rioux <vincent.michaud-rioux@xanadu.ai> Co-authored-by: Mudit Pandey <mudit.pandey@xanadu.ai> Co-authored-by: Ali Asadi <10773383+maliasadi@users.noreply.github.com>
* Merge Master * update version * update version * update lightning_qubit_2 * add LightningQubit2 to init * add LightningStateVector class * add LightningMeasurements class * add new QuantumScriptSerializer class * allow lightning.qubit2 to be tested within our suite * add tests and CI workflow for lightning_qubit_2 * update CI * update CI * add wire mapping, black * add tests for custom wires * add tests for custom wires * add review suggestions * format * update * adding tests from add-simulate branch * remove python class to reverse order of PRs * merge conflicts * update simulate to get a LightningStateVector * add reset state * update simulate * update docs * add Result import * create state vector on initialization * remove import of modifier from lightning * Update pennylane_lightning/lightning_qubit/lightning_qubit2.py * Update pennylane_lightning/lightning_qubit/_measurements.py Co-authored-by: Christina Lee <chrissie.c.l@gmail.com> * Update pennylane_lightning/lightning_qubit/_measurements.py Co-authored-by: Christina Lee <chrissie.c.l@gmail.com> * minor test updates * fix reset state * Update pennylane_lightning/lightning_qubit/_state_vector.py Co-authored-by: Christina Lee <chrissie.c.l@gmail.com> * Update pennylane_lightning/lightning_qubit/_state_vector.py Co-authored-by: Christina Lee <chrissie.c.l@gmail.com> * Update pennylane_lightning/lightning_qubit/_state_vector.py Co-authored-by: Christina Lee <chrissie.c.l@gmail.com> * remove LightningQubit2 references * remove unnecessary modules * merging Serializer classes * update serialize tests * update measurements with new serialize class * remove outdated test * register with setup.py, state vector fixes * remove obsolete tests * remove unused dtype input from simulate * update measurements * update state_vector * update lightning_qubit2 * format * pylint * Update pennylane_lightning/lightning_qubit/_state_vector.py Co-authored-by: Christina Lee <chrissie.c.l@gmail.com> * remove old comment * some review suggestions * Auto update version * remove print * update state vector class * add state vector class tests * adding measurement tests * update state vector and tests * move and rename test files, and format * Auto update version * skip measurements class for other devices and in the absence of binaries * format * add LightningQubit2 to init and format * update measurements class * expand measurement class testing * garbage collection * typo * update coverage and StateVector class * expand measurements class coverage * Auto update version * add coverage for n-controlled operations * add map to standard wires to get_final_state for safety * update jax config import * Auto update version * trigger CI * update state vector class and tests for improved coverage * update measurement class tests * update dev version * add cpp binary available variable * remove device definition * update dev version * Auto update version * reduce dependency on DefaultQubit for tests * update LightningQubit2 * clean test_measurements_class.py * isort+black * review suggestion * fix docs * Add qml.var support. * Add probs support. * increase tolerance * Auto update version * isort * Add double-obs tests. * Pin pytest version (#624) * update dev version * update changelog * pin pytest version in requirement files * add a requirements file for tests against Pennylane master * update wheels' workflows * Version Bump (#626) * post release version bump * trigger CI --------- Co-authored-by: AmintorDusko <AmintorDusko@users.noreply.github.com> Co-authored-by: AmintorDusko <amintor_dusko@hotmail.com> * increase tolerance * Introduce isort. (#623) * Introduce isort. * Auto update version * Update changelog * Auto update version * Update changelog. * trigger ci --------- Co-authored-by: Dev version update bot <github-actions[bot]@users.noreply.github.com> * Auto update version * isort * Add qml.var support. * Add probs support. * Add measurement tests with wires. * review suggestions * remove unused imports * Introduce _new_API and fix/skip few tests. * Fix few more tests. * Skip shots, adjoint, vjp with new API. * remove diagonalization gate application from state vector * pytest.skip tests * Auto update version * Fix format * Fix no-bin interface. * WIP * Initial shots support + fix test_measurement tests. * update * adding tests from add-simulate branch * merge conflicts * create state vector on initialization * remove import of modifier from lightning * Update pennylane_lightning/lightning_qubit/lightning_qubit2.py * minor test updates * register with setup.py, state vector fixes * add LightningQubit2 to init and format * add cpp binary available variable * reduce dependency on DefaultQubit for tests * update LightningQubit2 * Fixing rebase artifacts * Add fewLQ2 tests. * remove adjoint diff support from supports derivatives * Remove print from test_apply * Add expval/var tests. * Remove duplicate class data. * Include LQ2 in linux ests. * Add _group_measurements support. * --cov-append * Add mcmc capability + tests. * Auto update version * update dev version * add LightningAdjointJacobian class * add unit tests for the LightningAdjointJacobian class * format * add changelog for PR #613 * [skip ci] Added skeleton file for LQ2 unit tests * update changelog * update adjoint Jacobian * Auto update version * codefactor * Add shots tests and fix bugs in LQ, LQ2. * Lightning qubit2 upgrade api (#628) * update * adding tests from add-simulate branch * merge conflicts * create state vector on initialization * remove import of modifier from lightning * Update pennylane_lightning/lightning_qubit/lightning_qubit2.py * minor test updates * register with setup.py, state vector fixes * add LightningQubit2 to init and format * add cpp binary available variable * Auto update version * reduce dependency on DefaultQubit for tests * update LightningQubit2 * Introduce _new_API and fix/skip few tests. * Fix few more tests. * Skip shots, adjoint, vjp with new API. * Fix no-bin interface. * Remove duplicate class data. * Include LQ2 in linux ests. * --cov-append --------- Co-authored-by: albi3ro <chrissie.c.l@gmail.com> Co-authored-by: AmintorDusko <amintor_dusko@hotmail.com> Co-authored-by: Dev version update bot <github-actions[bot]@users.noreply.github.com> * fix processing_fn_expval * make a proper new_tape * Added init tests; Added skeleton tests for helpers * Fix more bug with shots. * trigger CI * Change pennylane branch for CI. * Update .github/CHANGELOG.md Co-authored-by: Vincent Michaud-Rioux <vincentm@nanoacademic.com> * Update pennylane_lightning/lightning_qubit/_adjoint_jacobian.py Co-authored-by: Vincent Michaud-Rioux <vincentm@nanoacademic.com> * Update pennylane_lightning/lightning_qubit/_adjoint_jacobian.py Co-authored-by: Vincent Michaud-Rioux <vincentm@nanoacademic.com> * Add probs support. * Add double-obs tests. * Add qml.var support. * Add probs support. * Add measurement tests with wires. * pytest.skip tests * Fix format * update * adding tests from add-simulate branch * merge conflicts * create state vector on initialization * remove import of modifier from lightning * Update pennylane_lightning/lightning_qubit/lightning_qubit2.py * minor test updates * register with setup.py, state vector fixes * add LightningQubit2 to init and format * add cpp binary available variable * reduce dependency on DefaultQubit for tests * update LightningQubit2 * Fixing rebase artifacts * remove adjoint diff support from supports derivatives * [skip ci] Added skeleton file for LQ2 unit tests * Lightning qubit2 upgrade api (#628) * update * adding tests from add-simulate branch * merge conflicts * create state vector on initialization * remove import of modifier from lightning * Update pennylane_lightning/lightning_qubit/lightning_qubit2.py * minor test updates * register with setup.py, state vector fixes * add LightningQubit2 to init and format * add cpp binary available variable * Auto update version * reduce dependency on DefaultQubit for tests * update LightningQubit2 * Introduce _new_API and fix/skip few tests. * Fix few more tests. * Skip shots, adjoint, vjp with new API. * Fix no-bin interface. * Remove duplicate class data. * Include LQ2 in linux ests. * --cov-append --------- Co-authored-by: albi3ro <chrissie.c.l@gmail.com> Co-authored-by: AmintorDusko <amintor_dusko@hotmail.com> Co-authored-by: Dev version update bot <github-actions[bot]@users.noreply.github.com> * Added init tests; Added skeleton tests for helpers * Resolving rebase artifacts * Refactor shots test. * Added tests; integrated jacobian * Update pennylane_lightning/lightning_qubit/lightning_qubit2.py Co-authored-by: Amintor Dusko <87949283+AmintorDusko@users.noreply.github.com> * Auto update version * Small update to simulate_and_jacobian * Auto update version * Rerun isort. * Uncomment integration tests. * Reformat * Delete symlink * Fix pylint. * Run linux tests in parallel (when possible). * Run double obs tests with shots. * Revert linux tests * Fix bg in diag_gates. * Call isort/black with python -m * Add docstrings, rm C_DTYPE. * Auto update version * trigger ci * Update tests/test_expval.py Co-authored-by: Amintor Dusko <87949283+AmintorDusko@users.noreply.github.com> * Init mcmc params to None in measurements. * Reformat with python3.11 * Reformat black --------- Co-authored-by: AmintorDusko <amintor_dusko@hotmail.com> Co-authored-by: Christina Lee <chrissie.c.l@gmail.com> Co-authored-by: Amintor Dusko <87949283+AmintorDusko@users.noreply.github.com> Co-authored-by: Dev version update bot <github-actions[bot]@users.noreply.github.com> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: AmintorDusko <AmintorDusko@users.noreply.github.com> Co-authored-by: Mudit Pandey <mudit.pandey@xanadu.ai>
* fix reset state * Update pennylane_lightning/lightning_qubit/_state_vector.py * Update pennylane_lightning/lightning_qubit/_state_vector.py * Update pennylane_lightning/lightning_qubit/_state_vector.py * remove LightningQubit2 references * remove unnecessary modules * merging Serializer classes * update serialize tests * update measurements with new serialize class * remove outdated test * register with setup.py, state vector fixes * remove obsolete tests * remove unused dtype input from simulate * update measurements * update state_vector * update lightning_qubit2 * format * pylint * Update pennylane_lightning/lightning_qubit/_state_vector.py * remove old comment * some review suggestions * Auto update version * remove print * update state vector class * add state vector class tests * adding measurement tests * update state vector and tests * move and rename test files, and format * Auto update version * skip measurements class for other devices and in the absence of binaries * format * add LightningQubit2 to init and format * update measurements class * expand measurement class testing * garbage collection * typo * update coverage and StateVector class * expand measurements class coverage * Auto update version * add coverage for n-controlled operations * add map to standard wires to get_final_state for safety * update jax config import * Auto update version * trigger CI * update state vector class and tests for improved coverage * update measurement class tests * update dev version * add cpp binary available variable * remove device definition * update dev version * Auto update version * reduce dependency on DefaultQubit for tests * update LightningQubit2 * clean test_measurements_class.py * isort+black * review suggestion * fix docs * Add qml.var support. * Add probs support. * increase tolerance * Auto update version * isort * Add double-obs tests. * Pin pytest version (#624) * update dev version * update changelog * pin pytest version in requirement files * add a requirements file for tests against Pennylane master * update wheels' workflows * Version Bump (#626) * post release version bump * increase tolerance * Introduce isort. (#623) * Introduce isort. * Auto update version * Update changelog * Auto update version * Update changelog. * trigger ci * Auto update version * isort * Add qml.var support. * Add probs support. * Add measurement tests with wires. * review suggestions * remove unused imports * Introduce _new_API and fix/skip few tests. * Fix few more tests. * Skip shots, adjoint, vjp with new API. * remove diagonalization gate application from state vector * pytest.skip tests * Auto update version * Fix format * Fix no-bin interface. * WIP * Initial shots support + fix test_measurement tests. * update * adding tests from add-simulate branch * merge conflicts * create state vector on initialization * remove import of modifier from lightning * Update pennylane_lightning/lightning_qubit/lightning_qubit2.py * minor test updates * register with setup.py, state vector fixes * add LightningQubit2 to init and format * add cpp binary available variable * reduce dependency on DefaultQubit for tests * update LightningQubit2 * Fixing rebase artifacts * Add fewLQ2 tests. * remove adjoint diff support from supports derivatives * Remove print from test_apply * Add expval/var tests. * Remove duplicate class data. * Include LQ2 in linux tests. * Add _group_measurements support. * --cov-append * Add mcmc capability + tests. * Auto update version * update dev version * add LightningAdjointJacobian class * add unit tests for the LightningAdjointJacobian class * format * add changelog for PR #613 * [skip ci] Added skeleton file for LQ2 unit tests * update changelog * update adjoint Jacobian * Auto update version * codefactor * Add shots tests and fix bugs in LQ, LQ2. * Lightning qubit2 upgrade api (#628) * update * adding tests from add-simulate branch * merge conflicts * create state vector on initialization * remove import of modifier from lightning * Update pennylane_lightning/lightning_qubit/lightning_qubit2.py * minor test updates * register with setup.py, state vector fixes * add LightningQubit2 to init and format * add cpp binary available variable * Auto update version * reduce dependency on DefaultQubit for tests * update LightningQubit2 * Introduce _new_API and fix/skip few tests. * Fix few more tests. * Skip shots, adjoint, vjp with new API. * Fix no-bin interface. * Remove duplicate class data. * Include LQ2 in linux ests. * --cov-append * fix processing_fn_expval * make a proper new_tape * Added init tests; Added skeleton tests for helpers * Fix more bug with shots. * trigger CI * Change pennylane branch for CI. * Update .github/CHANGELOG.md * Update pennylane_lightning/lightning_qubit/_adjoint_jacobian.py * Update pennylane_lightning/lightning_qubit/_adjoint_jacobian.py * Add probs support. * Add double-obs tests. * Add qml.var support. * Add probs support. * Add measurement tests with wires. * pytest.skip tests * Fix format * update * adding tests from add-simulate branch * merge conflicts * create state vector on initialization * remove import of modifier from lightning * Update pennylane_lightning/lightning_qubit/lightning_qubit2.py * minor test updates * register with setup.py, state vector fixes * add LightningQubit2 to init and format * add cpp binary available variable * reduce dependency on DefaultQubit for tests * update LightningQubit2 * Fixing rebase artifacts * remove adjoint diff support from supports derivatives * [skip ci] Added skeleton file for LQ2 unit tests * Lightning qubit2 upgrade api (#628) * update * adding tests from add-simulate branch * merge conflicts * create state vector on initialization * remove import of modifier from lightning * Update pennylane_lightning/lightning_qubit/lightning_qubit2.py * minor test updates * register with setup.py, state vector fixes * add LightningQubit2 to init and format * add cpp binary available variable * Auto update version * reduce dependency on DefaultQubit for tests * update LightningQubit2 * Introduce _new_API and fix/skip few tests. * Fix few more tests. * Skip shots, adjoint, vjp with new API. * Fix no-bin interface. * Remove duplicate class data. * Include LQ2 in linux ests. * --cov-append * Added init tests; Added skeleton tests for helpers * Resolving rebase artifacts * Refactor shots test. * Added tests; integrated jacobian * Update pennylane_lightning/lightning_qubit/lightning_qubit2.py * Auto update version * Small update to simulate_and_jacobian * Auto update version * Rerun isort. * Uncomment integration tests. * Reformat * Delete symlink * Fix pylint. * Run linux tests in parallel (when possible). * Run double obs tests with shots. * Revert linux tests * Fix bg in diag_gates. * Call isort/black with python -m * update dev version * Add docstrings, rm C_DTYPE. * Auto update version * comment isort check * trigger ci * Update tests/test_expval.py * Init mcmc params to None in measurements. * Reformat with python3.11 * Reformat black * Auto update version * update QuantumScriptSerializer * remove LightningQubit2 from init * update setup.py * remove lightning.qubit2 from tests configuration * remove extra tests for lightning.qubit2 * migrate lightning.qubit2 to lightning.qubit on tests * make lightning.qubit2 the new lightning.qubit * add device name (necessary for pl-device-test) * Add _measure_hamiltonian_with_samples _measure_sum_with_samples * fix tests without binary * check for jac size before reshaping * remove obsolete tests * organize tests * fix test for Windows wheels * fix the fix for LightningKokkos * undo 'fix' * trigger CI * update changelog * Auto update version * commenting tests for Win wheels * trigger build wheels
* remove old comment * some review suggestions * Auto update version * remove print * update state vector class * add state vector class tests * adding measurement tests * update state vector and tests * move and rename test files, and format * Auto update version * skip measurements class for other devices and in the absence of binaries * format * add LightningQubit2 to init and format * update measurements class * expand measurement class testing * garbage collection * typo * update coverage and StateVector class * expand measurements class coverage * Auto update version * add coverage for n-controlled operations * add map to standard wires to get_final_state for safety * update jax config import * Auto update version * trigger CI * update state vector class and tests for improved coverage * update measurement class tests * update dev version * add cpp binary available variable * remove device definition * update dev version * Auto update version * reduce dependency on DefaultQubit for tests * update LightningQubit2 * clean test_measurements_class.py * isort+black * review suggestion * fix docs * Add qml.var support. * Add probs support. * increase tolerance * Auto update version * isort * Add double-obs tests. * Pin pytest version (#624) * update dev version * update changelog * pin pytest version in requirement files * add a requirements file for tests against Pennylane master * update wheels' workflows * Version Bump (#626) * post release version bump * trigger CI --------- Co-authored-by: AmintorDusko <AmintorDusko@users.noreply.github.com> Co-authored-by: AmintorDusko <amintor_dusko@hotmail.com> * increase tolerance * Introduce isort. (#623) * Introduce isort. * Auto update version * Update changelog * Auto update version * Update changelog. * trigger ci --------- Co-authored-by: Dev version update bot <github-actions[bot]@users.noreply.github.com> * Auto update version * isort * Add qml.var support. * Add probs support. * Add measurement tests with wires. * review suggestions * remove unused imports * Introduce _new_API and fix/skip few tests. * Fix few more tests. * Skip shots, adjoint, vjp with new API. * remove diagonalization gate application from state vector * pytest.skip tests * Auto update version * Fix format * Fix no-bin interface. * WIP * Initial shots support + fix test_measurement tests. * update * adding tests from add-simulate branch * merge conflicts * create state vector on initialization * remove import of modifier from lightning * Update pennylane_lightning/lightning_qubit/lightning_qubit2.py * minor test updates * register with setup.py, state vector fixes * add LightningQubit2 to init and format * add cpp binary available variable * reduce dependency on DefaultQubit for tests * update LightningQubit2 * Fixing rebase artifacts * Add fewLQ2 tests. * remove adjoint diff support from supports derivatives * Remove print from test_apply * Add expval/var tests. * Remove duplicate class data. * Include LQ2 in linux ests. * Add _group_measurements support. * --cov-append * Add mcmc capability + tests. * Auto update version * update dev version * add LightningAdjointJacobian class * add unit tests for the LightningAdjointJacobian class * format * add changelog for PR #613 * [skip ci] Added skeleton file for LQ2 unit tests * update changelog * update adjoint Jacobian * Auto update version * codefactor * Add shots tests and fix bugs in LQ, LQ2. * Lightning qubit2 upgrade api (#628) * update * adding tests from add-simulate branch * merge conflicts * create state vector on initialization * remove import of modifier from lightning * Update pennylane_lightning/lightning_qubit/lightning_qubit2.py * minor test updates * register with setup.py, state vector fixes * add LightningQubit2 to init and format * add cpp binary available variable * Auto update version * reduce dependency on DefaultQubit for tests * update LightningQubit2 * Introduce _new_API and fix/skip few tests. * Fix few more tests. * Skip shots, adjoint, vjp with new API. * Fix no-bin interface. * Remove duplicate class data. * Include LQ2 in linux ests. * --cov-append --------- Co-authored-by: albi3ro <chrissie.c.l@gmail.com> Co-authored-by: AmintorDusko <amintor_dusko@hotmail.com> Co-authored-by: Dev version update bot <github-actions[bot]@users.noreply.github.com> * fix processing_fn_expval * make a proper new_tape * Added init tests; Added skeleton tests for helpers * Fix more bug with shots. * trigger CI * Change pennylane branch for CI. * Update .github/CHANGELOG.md Co-authored-by: Vincent Michaud-Rioux <vincentm@nanoacademic.com> * Update pennylane_lightning/lightning_qubit/_adjoint_jacobian.py Co-authored-by: Vincent Michaud-Rioux <vincentm@nanoacademic.com> * Update pennylane_lightning/lightning_qubit/_adjoint_jacobian.py Co-authored-by: Vincent Michaud-Rioux <vincentm@nanoacademic.com> * Add probs support. * Add double-obs tests. * Add qml.var support. * Add probs support. * Add measurement tests with wires. * pytest.skip tests * Fix format * update * adding tests from add-simulate branch * merge conflicts * create state vector on initialization * remove import of modifier from lightning * Update pennylane_lightning/lightning_qubit/lightning_qubit2.py * minor test updates * register with setup.py, state vector fixes * add LightningQubit2 to init and format * add cpp binary available variable * reduce dependency on DefaultQubit for tests * update LightningQubit2 * Fixing rebase artifacts * remove adjoint diff support from supports derivatives * [skip ci] Added skeleton file for LQ2 unit tests * Lightning qubit2 upgrade api (#628) * update * adding tests from add-simulate branch * merge conflicts * create state vector on initialization * remove import of modifier from lightning * Update pennylane_lightning/lightning_qubit/lightning_qubit2.py * minor test updates * register with setup.py, state vector fixes * add LightningQubit2 to init and format * add cpp binary available variable * Auto update version * reduce dependency on DefaultQubit for tests * update LightningQubit2 * Introduce _new_API and fix/skip few tests. * Fix few more tests. * Skip shots, adjoint, vjp with new API. * Fix no-bin interface. * Remove duplicate class data. * Include LQ2 in linux ests. * --cov-append --------- Co-authored-by: albi3ro <chrissie.c.l@gmail.com> Co-authored-by: AmintorDusko <amintor_dusko@hotmail.com> Co-authored-by: Dev version update bot <github-actions[bot]@users.noreply.github.com> * Added init tests; Added skeleton tests for helpers * Resolving rebase artifacts * Refactor shots test. * Added tests; integrated jacobian * Update pennylane_lightning/lightning_qubit/lightning_qubit2.py Co-authored-by: Amintor Dusko <87949283+AmintorDusko@users.noreply.github.com> * Auto update version * Small update to simulate_and_jacobian * Auto update version * Rerun isort. * Uncomment integration tests. * Reformat * Delete symlink * Fix pylint. * Run linux tests in parallel (when possible). * Run double obs tests with shots. * Revert linux tests * Fix bg in diag_gates. * Call isort/black with python -m * update dev version * Add docstrings, rm C_DTYPE. * Auto update version * comment isort check * trigger ci * Update tests/test_expval.py Co-authored-by: Amintor Dusko <87949283+AmintorDusko@users.noreply.github.com> * Init mcmc params to None in measurements. * Reformat with python3.11 * Reformat black * Auto update version * update QuantumScriptSerializer * remove LightningQubit2 from init * update setup.py * remove lightning.qubit2 from tests configuration * remove extra tests for lightning.qubit2 * migrate lightning.qubit2 to lightning.qubit on tests * make lightning.qubit2 the new lightning.qubit * add device name (necessary for pl-device-test) * Add _measure_hamiltonian_with_samples _measure_sum_with_samples * fix tests without binary * check for jac size before reshaping * remove obsolete tests * organize tests * fix test for Windows wheels * fix the fix for LightningKokkos * Add MCM support initial work. * Update changelog. * Fix test_preprocess * Try & parallelize pytest * Increase timeout to 60 min. * Limit OMP_NUM_THREADS. * Do not parallelize Kokkos tests. * Update tests/test_native_mcm.py Co-authored-by: Amintor Dusko <87949283+AmintorDusko@users.noreply.github.com> * Update tests/test_native_mcm.py Co-authored-by: Amintor Dusko <87949283+AmintorDusko@users.noreply.github.com> * Update tests/test_native_mcm.py Co-authored-by: Amintor Dusko <87949283+AmintorDusko@users.noreply.github.com> * Update tests/test_native_mcm.py Co-authored-by: Amintor Dusko <87949283+AmintorDusko@users.noreply.github.com> * Auto update version * Update tests/test_native_mcm.py Co-authored-by: Amintor Dusko <87949283+AmintorDusko@users.noreply.github.com> * Update tests/test_native_mcm.py Co-authored-by: Amintor Dusko <87949283+AmintorDusko@users.noreply.github.com> * Update tests/test_native_mcm.py Co-authored-by: Amintor Dusko <87949283+AmintorDusko@users.noreply.github.com> * Update tests/test_native_mcm.py Co-authored-by: Amintor Dusko <87949283+AmintorDusko@users.noreply.github.com> * Update tests/test_native_mcm.py Co-authored-by: Amintor Dusko <87949283+AmintorDusko@users.noreply.github.com> * format * Auto update version * trigger ci * Update Makefile Co-authored-by: Ali Asadi <10773383+maliasadi@users.noreply.github.com> * Update tests/test_native_mcm.py Co-authored-by: Ali Asadi <10773383+maliasadi@users.noreply.github.com> * Update tests/test_native_mcm.py Co-authored-by: Ali Asadi <10773383+maliasadi@users.noreply.github.com> * Fix docstrings. * Auto update version * Update format.yml * Update format.yml --------- Co-authored-by: Christina Lee <chrissie.c.l@gmail.com> Co-authored-by: AmintorDusko <amintor_dusko@hotmail.com> Co-authored-by: Amintor Dusko <87949283+AmintorDusko@users.noreply.github.com> Co-authored-by: Dev version update bot <github-actions[bot]@users.noreply.github.com> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: AmintorDusko <AmintorDusko@users.noreply.github.com> Co-authored-by: Mudit Pandey <mudit.pandey@xanadu.ai> Co-authored-by: Ali Asadi <10773383+maliasadi@users.noreply.github.com>
* update jax config import * Auto update version * trigger CI * update state vector class and tests for improved coverage * update measurement class tests * update dev version * add cpp binary available variable * remove device definition * update dev version * Auto update version * reduce dependency on DefaultQubit for tests * update LightningQubit2 * clean test_measurements_class.py * isort+black * review suggestion * fix docs * Add qml.var support. * Add probs support. * increase tolerance * Auto update version * isort * Add double-obs tests. * Pin pytest version (#624) * update dev version * update changelog * pin pytest version in requirement files * add a requirements file for tests against Pennylane master * update wheels' workflows * Version Bump (#626) * post release version bump * trigger CI --------- Co-authored-by: AmintorDusko <AmintorDusko@users.noreply.github.com> Co-authored-by: AmintorDusko <amintor_dusko@hotmail.com> * increase tolerance * Introduce isort. (#623) * Introduce isort. * Auto update version * Update changelog * Auto update version * Update changelog. * trigger ci --------- Co-authored-by: Dev version update bot <github-actions[bot]@users.noreply.github.com> * Auto update version * isort * Add qml.var support. * Add probs support. * Add measurement tests with wires. * review suggestions * remove unused imports * Introduce _new_API and fix/skip few tests. * Fix few more tests. * Skip shots, adjoint, vjp with new API. * remove diagonalization gate application from state vector * pytest.skip tests * Auto update version * Fix format * Fix no-bin interface. * WIP * Initial shots support + fix test_measurement tests. * update * adding tests from add-simulate branch * merge conflicts * create state vector on initialization * remove import of modifier from lightning * Update pennylane_lightning/lightning_qubit/lightning_qubit2.py * minor test updates * register with setup.py, state vector fixes * add LightningQubit2 to init and format * add cpp binary available variable * reduce dependency on DefaultQubit for tests * update LightningQubit2 * Fixing rebase artifacts * Add fewLQ2 tests. * remove adjoint diff support from supports derivatives * Remove print from test_apply * Add expval/var tests. * Remove duplicate class data. * Include LQ2 in linux ests. * Add _group_measurements support. * --cov-append * Add mcmc capability + tests. * Auto update version * update dev version * add LightningAdjointJacobian class * add unit tests for the LightningAdjointJacobian class * format * add changelog for PR #613 * [skip ci] Added skeleton file for LQ2 unit tests * update changelog * update adjoint Jacobian * Auto update version * codefactor * Add shots tests and fix bugs in LQ, LQ2. * Lightning qubit2 upgrade api (#628) * update * adding tests from add-simulate branch * merge conflicts * create state vector on initialization * remove import of modifier from lightning * Update pennylane_lightning/lightning_qubit/lightning_qubit2.py * minor test updates * register with setup.py, state vector fixes * add LightningQubit2 to init and format * add cpp binary available variable * Auto update version * reduce dependency on DefaultQubit for tests * update LightningQubit2 * Introduce _new_API and fix/skip few tests. * Fix few more tests. * Skip shots, adjoint, vjp with new API. * Fix no-bin interface. * Remove duplicate class data. * Include LQ2 in linux ests. * --cov-append --------- Co-authored-by: albi3ro <chrissie.c.l@gmail.com> Co-authored-by: AmintorDusko <amintor_dusko@hotmail.com> Co-authored-by: Dev version update bot <github-actions[bot]@users.noreply.github.com> * fix processing_fn_expval * make a proper new_tape * Added init tests; Added skeleton tests for helpers * Fix more bug with shots. * trigger CI * Change pennylane branch for CI. * Update .github/CHANGELOG.md Co-authored-by: Vincent Michaud-Rioux <vincentm@nanoacademic.com> * Update pennylane_lightning/lightning_qubit/_adjoint_jacobian.py Co-authored-by: Vincent Michaud-Rioux <vincentm@nanoacademic.com> * Update pennylane_lightning/lightning_qubit/_adjoint_jacobian.py Co-authored-by: Vincent Michaud-Rioux <vincentm@nanoacademic.com> * Add probs support. * Add double-obs tests. * Add qml.var support. * Add probs support. * Add measurement tests with wires. * pytest.skip tests * Fix format * update * adding tests from add-simulate branch * merge conflicts * create state vector on initialization * remove import of modifier from lightning * Update pennylane_lightning/lightning_qubit/lightning_qubit2.py * minor test updates * register with setup.py, state vector fixes * add LightningQubit2 to init and format * add cpp binary available variable * reduce dependency on DefaultQubit for tests * update LightningQubit2 * Fixing rebase artifacts * remove adjoint diff support from supports derivatives * [skip ci] Added skeleton file for LQ2 unit tests * Lightning qubit2 upgrade api (#628) * update * adding tests from add-simulate branch * merge conflicts * create state vector on initialization * remove import of modifier from lightning * Update pennylane_lightning/lightning_qubit/lightning_qubit2.py * minor test updates * register with setup.py, state vector fixes * add LightningQubit2 to init and format * add cpp binary available variable * Auto update version * reduce dependency on DefaultQubit for tests * update LightningQubit2 * Introduce _new_API and fix/skip few tests. * Fix few more tests. * Skip shots, adjoint, vjp with new API. * Fix no-bin interface. * Remove duplicate class data. * Include LQ2 in linux ests. * --cov-append --------- Co-authored-by: albi3ro <chrissie.c.l@gmail.com> Co-authored-by: AmintorDusko <amintor_dusko@hotmail.com> Co-authored-by: Dev version update bot <github-actions[bot]@users.noreply.github.com> * Added init tests; Added skeleton tests for helpers * Resolving rebase artifacts * Refactor shots test. * Added tests; integrated jacobian * Update pennylane_lightning/lightning_qubit/lightning_qubit2.py Co-authored-by: Amintor Dusko <87949283+AmintorDusko@users.noreply.github.com> * Auto update version * Small update to simulate_and_jacobian * Auto update version * Rerun isort. * Uncomment integration tests. * Reformat * Delete symlink * Fix pylint. * Run linux tests in parallel (when possible). * Run double obs tests with shots. * Revert linux tests * Fix bg in diag_gates. * Call isort/black with python -m * update dev version * Add docstrings, rm C_DTYPE. * Auto update version * comment isort check * trigger ci * Update tests/test_expval.py Co-authored-by: Amintor Dusko <87949283+AmintorDusko@users.noreply.github.com> * Init mcmc params to None in measurements. * Reformat with python3.11 * Reformat black * Auto update version * update QuantumScriptSerializer * remove LightningQubit2 from init * update setup.py * remove lightning.qubit2 from tests configuration * remove extra tests for lightning.qubit2 * migrate lightning.qubit2 to lightning.qubit on tests * make lightning.qubit2 the new lightning.qubit * add device name (necessary for pl-device-test) * Add _measure_hamiltonian_with_samples _measure_sum_with_samples * fix tests without binary * check for jac size before reshaping * remove obsolete tests * organize tests * fix test for Windows wheels * Adding LC to supported obs list for all devices * Updating serialization * Trying out test changes * Updated PL dependency * Running isort * Update CPP layer for observable accessible functions * Auto update version * Allow output from TP CPP layer * Fixed serialize tests * Added legacy fixture to failing tests * Updated requirements with debug branch * Trigger CI * Auto update version * Trigger CI * Trigger CI * Added recursive logic to find projectors * format * mark tests to be dual tested and some small fixes * example of test failing * remove print and move ham to tape scope * Fixed expval test; isort * Auto update version * isort * Updated device tests; changelog entry * Update mpitests/test_apply.py * Auto update version * Fix terms in ham serialization. * Use requirements-dev.txt to install black/isort. * Mark test_single_return_value flaky. Add comment on split_obs. * Apply suggestions from code review Co-authored-by: Ali Asadi <10773383+maliasadi@users.noreply.github.com> Co-authored-by: Vincent Michaud-Rioux <vincentm@nanoacademic.com> * Auto update version * Auto update version * Trigger CI * Fix format * Updated PL branch in reqs-dev * Update requirements * Added fix for prod with overlapping wires * Formatting * Point requirements to PL master * Pinning cmake * Pinned cmake in workflows * Pinned cmake in more workflows * Trigger CI * Apply suggestions from code review Co-authored-by: Ali Asadi <10773383+maliasadi@users.noreply.github.com> * [skip ci] Apply suggestions from code review Co-authored-by: Ali Asadi <10773383+maliasadi@users.noreply.github.com> * Trigger CI * Fix indent. * Fix workflow files indentation * Comment triggers. (#662) * Comment triggers. * pytest -x * trigger ci * Do not skip comp for LQ. * Revert triggers * Revert changes --------- Co-authored-by: AmintorDusko <amintor_dusko@hotmail.com> Co-authored-by: Amintor Dusko <87949283+AmintorDusko@users.noreply.github.com> Co-authored-by: Dev version update bot <github-actions[bot]@users.noreply.github.com> Co-authored-by: Vincent Michaud-Rioux <vincent.michaud-rioux@xanadu.ai> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: AmintorDusko <AmintorDusko@users.noreply.github.com> Co-authored-by: Vincent Michaud-Rioux <vincentm@nanoacademic.com> Co-authored-by: albi3ro <chrissie.c.l@gmail.com> Co-authored-by: Lee J. O'Riordan <loriordan@gmail.com> Co-authored-by: Ali Asadi <10773383+maliasadi@users.noreply.github.com> Co-authored-by: Lee James O'Riordan <mlxd@users.noreply.github.com>
Before submitting
Please complete the following checklist when submitting a PR:
All new features must include a unit test.
If you've fixed a bug or added code that should be tested, add a test to the
tests
directory!All new functions and code must be clearly commented and documented.
If you do make documentation changes, make sure that the docs build and
render correctly by running
make docs
.Ensure that the test suite passes, by running
make test
.Add a new entry to the
.github/CHANGELOG.md
file, summarizing thechange, and including a link back to the PR.
Ensure that code is properly formatted by running
make format
.When all the above are checked, delete everything above the dashed
line and fill in the pull request template.
Context:
This PR merges #607 and #627 to enable integration testing.
Description of the Change:
Since #607 enables QNode execution, several tests under
tests
(namely all except those explicitly testing the old device API) become available, in principle that is since features like adjoint at still missing. This PR therefore introduces (as a temporary measure and until all old device API backends become deprecated) a_new_API
attribute which allows discriminating between backends. All tests with missing functionality (e.g. adjoint, shots, etc.) are markedskip
orxfail
.Benefits:
Leverage unit/integration tests that already exists.
Enable coexistence of old/new device API backends, likely needed if we cannot complete the port of L-GPU/Kokkos before next release.
Possible Drawbacks:
Related GitHub Issues: