Skip to content

Commit

Permalink
format
Browse files Browse the repository at this point in the history
  • Loading branch information
josephleekl committed Oct 21, 2024
1 parent e8f16c0 commit 07c38a1
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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<std::size_t> &controlled_wires,
const std::vector<bool> &controlled_values,
const std::vector<std::size_t> &wires, bool inverse = false) {
Expand Down Expand Up @@ -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.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -704,7 +704,6 @@ TEMPLATE_TEST_CASE("StateVectorKokkos::applyCSWAP",
}
}


TEMPLATE_TEST_CASE("StateVectorKokkos::applyMatrix/Controlled-Operation",
"[StateVectorKokkos_Nonparam]", float, double) {
using StateVectorT = StateVectorKokkos<TestType>;
Expand Down Expand Up @@ -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<TestType> sv_normal{num_qubits};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,6 @@ TEMPLATE_TEST_CASE("StateVectorKokkos::applyMatrix/Operation",
}
}


TEMPLATE_TEST_CASE("StateVectorKokkos::applyMatrix/Controlled Operation",
"[StateVectorKokkos_Operation]", float, double) {
using StateVectorT = StateVectorKokkos<TestType>;
Expand Down
2 changes: 1 addition & 1 deletion pennylane_lightning/lightning_kokkos/_state_vector.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(

Check warning on line 206 in pennylane_lightning/lightning_kokkos/_state_vector.py

View check run for this annotation

Codecov / codecov/patch

pennylane_lightning/lightning_kokkos/_state_vector.py#L205-L206

Added lines #L205 - L206 were not covered by tests
qml.matrix(operation.base),
Expand Down

0 comments on commit 07c38a1

Please sign in to comment.