Skip to content

Commit

Permalink
Add the controllable property to QubitUnitary in LQ. This will avoid …
Browse files Browse the repository at this point in the history
…the decomposition of ctrl(LQ) and hardcode of expanded controlled matrices in the IR. LightningKokkos zero-qubit device initialization is not supported on Windows.
  • Loading branch information
maliasadi committed Jun 10, 2024
1 parent 9b933a2 commit 0700397
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,15 @@ class StateVectorKokkos final
}
}

#ifdef _WIN32
constexpr bool no_qubit_init = false;
#else
constexpr bool no_qubit_init = true;
#endif
PL_ABORT_IF_NOT(num_qubits || no_qubit_init,
"LightningKokkos zero-qubit device initialization is "
"not supported on Windows.");

data_ = std::make_unique<KokkosVector>("data_", exp2(num_qubits));
setBasisState(0U);
};
Expand Down
2 changes: 1 addition & 1 deletion pennylane_lightning/lightning_qubit/lightning_qubit.toml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ PauliX = { properties = [ "invertible", "controllable", "differe
PauliY = { properties = [ "invertible", "controllable", "differentiable" ] }
PauliZ = { properties = [ "invertible", "controllable", "differentiable" ] }
PhaseShift = { properties = [ "invertible", "controllable", "differentiable" ] }
QubitUnitary = { properties = [ "invertible", ] }
QubitUnitary = { properties = [ "invertible", "controllable", ] }
Rot = { properties = [ "invertible", "controllable", ] }
RX = { properties = [ "invertible", "controllable", "differentiable" ] }
RY = { properties = [ "invertible", "controllable", "differentiable" ] }
Expand Down

0 comments on commit 0700397

Please sign in to comment.