-
Notifications
You must be signed in to change notification settings - Fork 42
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
Ncontr add gens #555
Ncontr add gens #555
Conversation
Use generic names in controlled ops enums. Fix applyOperation/Generator methods in StateVectorLQubit. Add R[X-Z] n-controlled generators. Properly register n-controlled generators in dynamic dispatcher.
Hello. You may have forgotten to update the changelog!
|
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## sc-39665-support-arbitrary-controlled-operations-in #555 +/- ##
========================================================================================
+ Coverage 11.81% 96.51% +84.69%
========================================================================================
Files 10 144 +134
Lines 1151 17531 +16380
========================================================================================
+ Hits 136 16920 +16784
+ Misses 1015 611 -404
☔ View full report in Codecov by Sentry. |
aab2585
into
sc-39665-support-arbitrary-controlled-operations-in
* Add failing tests. * Add revWireParityN. * Fix applyMultiQubitOp implementation. * Auto update version * Update changelog * Refactor revWireParity overloads. * WIP fix Kokkos too. * Fix bug in multiQubitOpFunctor * Refactor unitary/hermitian tests and fix L-Kokkos multiQubit kernels. * Fix L-Qubit BitUtil. * Include algorithm header in BitUtil (sort). * Fix tidy issue. Fix failing test. * Make wires2Parity inline. * Update changelog. * Update pennylane_lightning/core/src/utils/BitUtil.hpp Co-authored-by: Amintor Dusko <[email protected]> * Init implementation for ControlledQubitUnitary * WIP * WIP * Move applyNQubitOp to LM kernels. * Register NQubitOp and add inverse branch in applyNQubitOp. * Auto update version * Update changelog. * Add test to improve controlled_matrix coverage. * Fix tidy warning. * Add doc [skip ci]. * Auto update version * trigger CI * WIP * WIP * Fix NCRZ kernel registration and add tests. * Add NCRY. * Add NCRX. * Create generic entry point for n-controlled kernels. * Add NC[X-Z] * Special treatment for MultiControlledX. * Add Hadamard, S, T, PhaseShift n-controlled gates. * Auto update version * Fix compiler warnings. * Address some of Lee's comments about naming and PL_ABORT. * Call NC kernels from non-NC ones. * Further reduce LM kernel code. * Template applyNC on has_controls. * Fix nw_tot if not has_controls * Branch template top level. * Auto update version * Ncontr add gens (#555) * Add ControlledGeneratorOperation (compiles). * Add applyNCGeneratorPhaseShift implementation. * WIP * Fix PhaseShift adjoint test. Use generic names in controlled ops enums. Fix applyOperation/Generator methods in StateVectorLQubit. Add R[X-Z] n-controlled generators. Properly register n-controlled generators in dynamic dispatcher. * All C++ test passing. Add n-controls to phaseshift test. * Simplify n-controlled generators. * Fix Python bindings. * Add n-controlled to _serialize. Add controlled adjoint diff example in tests. * Add n-controlled 2-qubit gates. * Formatting and doc. * Fix GPU-MPI bindings & mpitests. * Auto update version * Add skipif guard. * Fix noarch test * Fix bug in applyNCGen and reuse in applyGenR[X-Z]. * Fix pytest.skipif in adjoint tests. * Add n-controlled double-qubit gate generators. * Test multicontrolled two-qubit gates. --------- Co-authored-by: Dev version update bot <github-actions[bot]@users.noreply.github.com> * Remove whitelines [skip ci] * Fix codefactor warning. * Auto update version * Add tests for n-controlled kernels. * Auto update version * Fix tidy check. * Add C++ tests for controlled gates. * Remove whitespace. * Fix clang-tidy warning. * Fix ctrl adjoint diff c++ test. * Add tests for n-controlled unitaries. * Capture more n-controlled ops in L-Qubit. * Fix GPU workflow names. * Move controlled ops to private method. * Add coverage and fix gpu trigger. * Fix codecov uploads. * Update .github/CHANGELOG.md [skip ci] Co-authored-by: Amintor Dusko <[email protected]> * Update pennylane_lightning/core/src/simulators/lightning_qubit/StateVectorLQubit.hpp [skip ci] Co-authored-by: Amintor Dusko <[email protected]> * Update pennylane_lightning/core/src/simulators/lightning_qubit/StateVectorLQubit.hpp [skip ci] Co-authored-by: Amintor Dusko <[email protected]> * Update pennylane_lightning/core/src/simulators/lightning_qubit/StateVectorLQubit.hpp [skip ci] Co-authored-by: Amintor Dusko <[email protected]> * Update pennylane_lightning/core/_serialize.py Co-authored-by: Amintor Dusko <[email protected]> * Reorder controlled routine gate < generator < matrix. * Fix typos. * Auto update version * trigger ci * Serialize unfound ops as controlled qubit unitaries. * Update pennylane_lightning/core/src/simulators/lightning_qubit/algorithms/tests/Test_VectorJacobianProduct.cpp [skip ci] Co-authored-by: Amintor Dusko <[email protected]> * Update pennylane_lightning/core/src/simulators/lightning_qubit/algorithms/tests/Test_VectorJacobianProduct.cpp [skip ci] Co-authored-by: Amintor Dusko <[email protected]> * Fix wrong LCOV guards. * Update pennylane_lightning/core/src/algorithms/JacobianData.hpp [skip ci] Co-authored-by: Shuli Shu <[email protected]> * Update pennylane_lightning/core/src/algorithms/JacobianData.hpp [skip ci] Co-authored-by: Shuli Shu <[email protected]> * Auto update version * Address Shuli's comments. * Address Lee's comments. * WIP * Add n-controlled DoubleExcitation gate. * Add double excitation gates + cpp tests. * Add python tests. * Add adjoint diff support for double excitation gates. * Use FD to compute jac on adjoint tests. * Fix tidy warning. * Update pennylane_lightning/core/src/simulators/lightning_kokkos/StateVectorKokkos.hpp [skip ci] Co-authored-by: Amintor Dusko <[email protected]> * Auto update version * Refactor applyNCMultiQubitOp and add doc in GateImplLM.hpp. * Add n-controlled 1- and 2-qubit unitaries. * Refactor Constant.hpp according to Amintor's suggestions. * Add single/twoqubit n-controlled ops. * Move lightning_ops to conftest. * Fix noarch import. * Fix tidy warning * Fix tidy warning. * Small optim on parity2indices. * Handle generic control_values in controlled ops at the Python layer. * Auto update version * trigger ci * Apply 1-qubit 1-controlled gates as non-controlled 2-qubit gates. * Fix maybe_unused. * Remove comments. --------- Co-authored-by: Dev version update bot <github-actions[bot]@users.noreply.github.com> Co-authored-by: Amintor Dusko <[email protected]> Co-authored-by: Shuli Shu <[email protected]>
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:
Description of the Change:
Benefits:
Possible Drawbacks:
Related GitHub Issues: