-
Notifications
You must be signed in to change notification settings - Fork 39
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Support arbitrary controlled operations in lightning.qubit (#516)
* 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]>
- Loading branch information
1 parent
d165de1
commit a248328
Showing
49 changed files
with
5,375 additions
and
1,757 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,4 +16,4 @@ | |
Version number (major.minor.patch[-label]) | ||
""" | ||
|
||
__version__ = "0.34.0-dev14" | ||
__version__ = "0.34.0-dev15" |
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
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.