Class LightningKokkosSimulator

Inheritance Relationships

Base Type

  • public Catalyst::Runtime::QuantumDevice

Class Documentation

class LightningKokkosSimulator : public Catalyst::Runtime::QuantumDevice

Kokkos state vector class wrapper for Catalyst. This class inherits from the QuantumDevice class defined in Catalyst. More info: https://github.com/PennyLaneAI/catalyst/blob/main/runtime/include/QuantumDevice.hpp.

Public Functions

inline explicit LightningKokkosSimulator(const std::string &kwargs = "{}") noexcept
~LightningKokkosSimulator() noexcept = default
LightningKokkosSimulator(const LightningKokkosSimulator&) = delete
LightningKokkosSimulator &operator=(const LightningKokkosSimulator&) = delete
LightningKokkosSimulator(LightningKokkosSimulator&&) = delete
LightningKokkosSimulator &operator=(LightningKokkosSimulator&&) = delete
auto AllocateQubit() -> QubitIdType override
auto AllocateQubits(std::size_t num_qubits) -> std::vector<QubitIdType> override
void ReleaseQubit(QubitIdType q) override
void ReleaseAllQubits() override
auto GetNumQubits() const -> std::size_t override
void StartTapeRecording() override
void StopTapeRecording() override
void SetDeviceShots(std::size_t shots) override
void SetDevicePRNG(std::mt19937*) override
void SetState(DataView<std::complex<double>, 1>&, std::vector<QubitIdType>&) override
void SetBasisState(DataView<int8_t, 1>&, std::vector<QubitIdType>&) override
auto GetDeviceShots() const -> std::size_t override
void PrintState() override
auto Zero() const -> Result override
auto One() const -> Result override
void NamedOperation(const std::string &name, const std::vector<double> &params, const std::vector<QubitIdType> &wires, bool inverse = false, const std::vector<QubitIdType> &controlled_wires = {}, const std::vector<bool> &controlled_values = {}) override
void MatrixOperation(const std::vector<std::complex<double>> &matrix, const std::vector<QubitIdType> &wires, bool inverse = false, const std::vector<QubitIdType> &controlled_wires = {}, const std::vector<bool> &controlled_values = {}) override
auto Observable(ObsId id, const std::vector<std::complex<double>> &matrix, const std::vector<QubitIdType> &wires) -> ObsIdType override
auto TensorObservable(const std::vector<ObsIdType> &obs) -> ObsIdType override
auto HamiltonianObservable(const std::vector<double> &coeffs, const std::vector<ObsIdType> &obs) -> ObsIdType override
auto Expval(ObsIdType obsKey) -> double override
auto Var(ObsIdType obsKey) -> double override
void State(DataView<std::complex<double>, 1> &state) override
void Probs(DataView<double, 1> &probs) override
void PartialProbs(DataView<double, 1> &probs, const std::vector<QubitIdType> &wires) override
void Sample(DataView<double, 2> &samples, std::size_t shots) override
void PartialSample(DataView<double, 2> &samples, const std::vector<QubitIdType> &wires, std::size_t shots) override
void Counts(DataView<double, 1> &eigvals, DataView<int64_t, 1> &counts, std::size_t shots) override
void PartialCounts(DataView<double, 1> &eigvals, DataView<int64_t, 1> &counts, const std::vector<QubitIdType> &wires, std::size_t shots) override
auto Measure(QubitIdType wire, std::optional<int32_t> postselect = std::nullopt) -> Result override
void Gradient(std::vector<DataView<double, 1>> &gradients, const std::vector<std::size_t> &trainParams) override
auto CacheManagerInfo() -> std::tuple<std::size_t, std::size_t, std::size_t, std::vector<std::string>, std::vector<ObsIdType>>