From 07c38a170c7c184ee60cbe445398fda487ebb802 Mon Sep 17 00:00:00 2001 From: Joseph Lee Date: Mon, 21 Oct 2024 18:21:02 +0000 Subject: [PATCH] format --- .../src/simulators/lightning_kokkos/StateVectorKokkos.hpp | 4 ++-- .../gates/tests/Test_StateVectorKokkos_NonParam.cpp | 4 ++-- .../gates/tests/Test_StateVectorKokkos_Param.cpp | 1 - pennylane_lightning/lightning_kokkos/_state_vector.py | 2 +- 4 files changed, 5 insertions(+), 6 deletions(-) diff --git a/pennylane_lightning/core/src/simulators/lightning_kokkos/StateVectorKokkos.hpp b/pennylane_lightning/core/src/simulators/lightning_kokkos/StateVectorKokkos.hpp index 946069cd5..d6bff0c77 100644 --- a/pennylane_lightning/core/src/simulators/lightning_kokkos/StateVectorKokkos.hpp +++ b/pennylane_lightning/core/src/simulators/lightning_kokkos/StateVectorKokkos.hpp @@ -613,7 +613,7 @@ class StateVectorKokkos final "number of wires"); applyMatrix(matrix.data(), wires, inverse); } - inline void applyControlledMatrix( + inline void applyControlledMatrix( ComplexT *matrix, const std::vector &controlled_wires, const std::vector &controlled_values, const std::vector &wires, bool inverse = false) { @@ -662,7 +662,7 @@ class StateVectorKokkos final applyControlledMatrix(matrix.data(), controlled_wires, controlled_values, wires, inverse); } - + /** * @brief Apply a single generator to the state vector using the given * kernel. diff --git a/pennylane_lightning/core/src/simulators/lightning_kokkos/gates/tests/Test_StateVectorKokkos_NonParam.cpp b/pennylane_lightning/core/src/simulators/lightning_kokkos/gates/tests/Test_StateVectorKokkos_NonParam.cpp index 5f2b319b4..fa1512753 100644 --- a/pennylane_lightning/core/src/simulators/lightning_kokkos/gates/tests/Test_StateVectorKokkos_NonParam.cpp +++ b/pennylane_lightning/core/src/simulators/lightning_kokkos/gates/tests/Test_StateVectorKokkos_NonParam.cpp @@ -704,7 +704,6 @@ TEMPLATE_TEST_CASE("StateVectorKokkos::applyCSWAP", } } - TEMPLATE_TEST_CASE("StateVectorKokkos::applyMatrix/Controlled-Operation", "[StateVectorKokkos_Nonparam]", float, double) { using StateVectorT = StateVectorKokkos; @@ -857,7 +856,8 @@ TEMPLATE_TEST_CASE("StateVectorKokkos::applyMultiQubitOp", } } -TEMPLATE_TEST_CASE("StateVectorKokkos::applyNCMultiQubitOp","[StateVectorKokkos_Nonparam][Inverse]", float, double) { +TEMPLATE_TEST_CASE("StateVectorKokkos::applyNCMultiQubitOp", + "[StateVectorKokkos_Nonparam][Inverse]", float, double) { const bool inverse = GENERATE(true, false); std::size_t num_qubits = 3; StateVectorKokkos sv_normal{num_qubits}; diff --git a/pennylane_lightning/core/src/simulators/lightning_kokkos/gates/tests/Test_StateVectorKokkos_Param.cpp b/pennylane_lightning/core/src/simulators/lightning_kokkos/gates/tests/Test_StateVectorKokkos_Param.cpp index 2b79169f0..5c277a886 100644 --- a/pennylane_lightning/core/src/simulators/lightning_kokkos/gates/tests/Test_StateVectorKokkos_Param.cpp +++ b/pennylane_lightning/core/src/simulators/lightning_kokkos/gates/tests/Test_StateVectorKokkos_Param.cpp @@ -116,7 +116,6 @@ TEMPLATE_TEST_CASE("StateVectorKokkos::applyMatrix/Operation", } } - TEMPLATE_TEST_CASE("StateVectorKokkos::applyMatrix/Controlled Operation", "[StateVectorKokkos_Operation]", float, double) { using StateVectorT = StateVectorKokkos; diff --git a/pennylane_lightning/lightning_kokkos/_state_vector.py b/pennylane_lightning/lightning_kokkos/_state_vector.py index 5d59dcf77..cd8d23cee 100644 --- a/pennylane_lightning/lightning_kokkos/_state_vector.py +++ b/pennylane_lightning/lightning_kokkos/_state_vector.py @@ -201,7 +201,7 @@ def _apply_lightning_controlled(self, operation): inv = False param = operation.parameters method(control_wires, control_values, target_wires, inv, param) - else: # apply gate as an n-controlled matrix + else: # apply gate as an n-controlled matrix method = getattr(state, "applyControlledMatrix") method( qml.matrix(operation.base),