Skip to content
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

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

Merged
merged 4 commits into from
Jan 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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