Skip to content

Commit

Permalink
Fix the issue with assigning kernels to ops before registering kernel…
Browse files Browse the repository at this point in the history
…s on macOS (#582)

* Fix the issue with assigning kernels to ops before registering kernels on macOS

* Auto update version

* Update changelog

* Remove unnecessary code comments

---------

Co-authored-by: Dev version update bot <github-actions[bot]@users.noreply.github.com>
  • Loading branch information
maliasadi and github-actions[bot] committed Jan 2, 2024
1 parent 8101e42 commit 489cff7
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 7 deletions.
3 changes: 3 additions & 0 deletions .github/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,9 @@
* Fix MPI Python unit tests for the adjoint method.
[(#538)](https://github.com/PennyLaneAI/pennylane-lightning/pull/538)

* Fix the issue with assigning kernels to ops before registering kernels on macOS
[(#582)](https://github.com/PennyLaneAI/pennylane-lightning/pull/582)

### Contributors

This release contains contributions from (in alphabetical order):
Expand Down
2 changes: 1 addition & 1 deletion pennylane_lightning/core/_version.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@
Version number (major.minor.patch[-label])
"""

__version__ = "0.34.0-dev20"
__version__ = "0.34.0-dev21"
Original file line number Diff line number Diff line change
Expand Up @@ -105,11 +105,8 @@ template <typename PrecisionT> class DynamicDispatcher {

private:
std::unordered_map<std::string, GateOperation> str_to_gates_{};
std::unordered_map<std::string, ControlledGateOperation>
str_to_controlled_gates_{};

std::unordered_map<std::string, GeneratorOperation> str_to_gntrs_{};
std::unordered_map<std::string, ControlledGeneratorOperation>
str_to_controlled_gntrs_{};

std::unordered_map<std::pair<GateOperation, KernelType>, GateFunc, PairHash>
gate_kernels_{};
Expand All @@ -122,6 +119,14 @@ template <typename PrecisionT> class DynamicDispatcher {
PairHash>
matrix_kernels_{};

std::unordered_map<KernelType, std::string> kernel_names_{};

std::unordered_map<std::string, ControlledGateOperation>
str_to_controlled_gates_{};

std::unordered_map<std::string, ControlledGeneratorOperation>
str_to_controlled_gntrs_{};

std::unordered_map<std::pair<ControlledGateOperation, KernelType>,
ControlledGateFunc, PairHash>
controlled_gate_kernels_{};
Expand All @@ -134,8 +139,6 @@ template <typename PrecisionT> class DynamicDispatcher {
ControlledMatrixFunc, PairHash>
controlled_matrix_kernels_{};

std::unordered_map<KernelType, std::string> kernel_names_{};

DynamicDispatcher() {
constexpr static auto gntr_names_without_prefix =
Internal::generatorNamesWithoutPrefix();
Expand Down

0 comments on commit 489cff7

Please sign in to comment.