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

Add support for BlockEncode gate to lightning devices #599

Merged
merged 8 commits into from
Jan 24, 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
5 changes: 4 additions & 1 deletion .github/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@

### Improvements

* The `BlockEncode` operation from PennyLane is now supported on all Lightning devices.
[(#599)](https://github.com/PennyLaneAI/pennylane-lightning/pull/599)

* OpenMP acceleration can now be enabled at compile time for all `lightning.qubit` gate kernels using the "-DLQ_ENABLE_KERNEL_OMP=1" CMake argument.
[(#510)](https://github.com/PennyLaneAI/pennylane-lightning/pull/510)

Expand All @@ -35,7 +38,7 @@

This release contains contributions from (in alphabetical order):

Amintor Dusko, Vincent Michaud-Rioux, Lee J. O'Riordan, Shuli Shu
Amintor Dusko, David Ittah, Vincent Michaud-Rioux, Lee J. O'Riordan, Shuli Shu

---

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.35.0-dev6"
__version__ = "0.35.0-dev7"
1 change: 1 addition & 0 deletions pennylane_lightning/lightning_gpu/lightning_gpu.py
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,7 @@ def _mebibytesToBytes(mebibytes):
"OrbitalRotation",
"QFT",
"ECR",
"BlockEncode",
}

allowed_observables = {
Expand Down
3 changes: 2 additions & 1 deletion pennylane_lightning/lightning_gpu/lightning_gpu.toml
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ matrix = [
"QubitCarry",
"QubitSum",
"DiagonalQubitUnitary",
"BlockEncode",
]

[measurement_processes]
Expand Down Expand Up @@ -119,4 +120,4 @@ mid_circuit_measurement = false

# This field is currently unchecked but it is reserved for the purpose of
# determining if the device supports dynamic qubit allocation/deallocation.
dynamic_qubit_management = false
dynamic_qubit_management = false
1 change: 1 addition & 0 deletions pennylane_lightning/lightning_kokkos/lightning_kokkos.py
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,7 @@ def _kokkos_configuration():
"OrbitalRotation",
"QFT",
"ECR",
"BlockEncode",
}

allowed_observables = {
Expand Down
3 changes: 2 additions & 1 deletion pennylane_lightning/lightning_kokkos/lightning_kokkos.toml
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ matrix = [
"QubitCarry",
"QubitSum",
"DiagonalQubitUnitary",
"BlockEncode",
]

[measurement_processes]
Expand Down Expand Up @@ -119,4 +120,4 @@ mid_circuit_measurement = true

# This field is currently unchecked but it is reserved for the purpose of
# determining if the device supports dynamic qubit allocation/deallocation.
dynamic_qubit_management = false
dynamic_qubit_management = false
1 change: 1 addition & 0 deletions pennylane_lightning/lightning_qubit/lightning_qubit.py
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,7 @@
"OrbitalRotation",
"QFT",
"ECR",
"BlockEncode",
}

allowed_observables = {
Expand Down
1 change: 1 addition & 0 deletions pennylane_lightning/lightning_qubit/lightning_qubit.toml
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ matrix = [
"QubitCarry",
"QubitSum",
"DiagonalQubitUnitary",
"BlockEncode",
]

[measurement_processes]
Expand Down
1 change: 1 addition & 0 deletions tests/test_gates.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ def op(op_name):
"QubitSum": [qml.QubitSum, [], {"wires": [0, 1, 2]}],
"QubitCarry": [qml.QubitCarry, [], {"wires": [0, 1, 2, 3]}],
"QubitUnitary": [qml.QubitUnitary, [], {"U": np.eye(16) * 1j, "wires": [0, 1, 2, 3]}],
"BlockEncode": [qml.BlockEncode, [[[0.2, 0, 0.2], [-0.2, 0.2, 0]]], {"wires": [0, 1, 2]}],
}
return ops_list.get(op_name)

Expand Down
Loading