Lightning Kokkos device

The lightning.kokkos device can run using a variety of HPC-focused backends, including GPUs, enabling accelerated simulation of quantum state-vector evolution.

A lightning.kokkos device can be loaded using:

import pennylane as qml
dev = qml.device("lightning.kokkos", wires=2)

The lightning.kokkos device also directly supports quantum circuit gradients using the adjoint differentiation method. This can be enabled at the PennyLane QNode level with:

qml.qnode(dev, diff_method="adjoint")
def circuit(params):
    ...

Check out the Lightning-Kokkos installation guide for more information.

Supported operations and observables

Supported operations:

BasisState

Prepares a single computational basis state.

CNOT

The controlled-NOT operator

ControlledPhaseShift

A qubit controlled phase shift.

ControlledQubitUnitary

Apply an arbitrary fixed unitary to wires with control from the control_wires.

CRot

The controlled-Rot operator

CRX

The controlled-RX operator

CRY

The controlled-RY operator

CRZ

The controlled-RZ operator

CSWAP

The controlled-swap operator

CY

The controlled-Y operator

CZ

The controlled-Z operator

DiagonalQubitUnitary

Apply an arbitrary diagonal unitary matrix with a dimension that is a power of two.

DoubleExcitation

Double excitation rotation.

DoubleExcitationMinus

Double excitation rotation with negative phase-shift outside the rotation subspace.

DoubleExcitationPlus

Double excitation rotation with positive phase-shift outside the rotation subspace.

ECR

An echoed RZX(\(\pi/2\)) gate.

Hadamard

The Hadamard operator

Identity

The Identity operator

IsingXX

Ising XX coupling gate

IsingXY

Ising (XX + YY) coupling gate

IsingYY

Ising YY coupling gate

IsingZZ

Ising ZZ coupling gate

ISWAP

The i-swap operator

MultiControlledX

Apply a Pauli X gate controlled on an arbitrary computational basis state.

MultiRZ

Arbitrary multi Z rotation.

OrbitalRotation

Spin-adapted spatial orbital rotation.

PauliX

The Pauli X operator

PauliY

The Pauli Y operator

PauliZ

The Pauli Z operator

PhaseShift

Arbitrary single qubit local phase shift

PSWAP

Phase SWAP gate

QFT

Apply a quantum Fourier transform (QFT).

QubitCarry

Apply the QubitCarry operation to four input wires.

QubitStateVector

QubitStateVector is deprecated and will be removed in version 0.40.

QubitSum

Apply a QubitSum operation on three input wires.

QubitUnitary

Apply an arbitrary unitary matrix with a dimension that is a power of two.

Rot

Arbitrary single qubit rotation

RX

The single qubit X rotation

RY

The single qubit Y rotation

RZ

The single qubit Z rotation

S

The single-qubit phase gate

SingleExcitation

Single excitation rotation.

SingleExcitationMinus

Single excitation rotation with negative phase-shift outside the rotation subspace.

SingleExcitationPlus

Single excitation rotation with positive phase-shift outside the rotation subspace.

SISWAP

The square root of i-swap operator.

SQISW

alias of SISWAP

SWAP

The swap operator

SX

The single-qubit Square-Root X operator.

T

The single-qubit T gate

Toffoli

Toffoli (controlled-controlled-X) gate.

Supported observables:

Identity

The Identity operator

Hadamard

The Hadamard operator

PauliX

The Pauli X operator

PauliY

The Pauli Y operator

PauliZ

The Pauli Z operator

Projector

Observable corresponding to the state projector \(P=\ket{\phi}\bra{\phi}\).

Hermitian

An arbitrary Hermitian observable.

Hamiltonian

alias of LinearCombination

SparseHamiltonian

A Hamiltonian represented directly as a sparse matrix in Compressed Sparse Row (CSR) format.

Exp

A symbolic operator representing the exponential of a operator.

Prod

Symbolic operator representing the product of operators.

SProd

Arithmetic operator representing the scalar product of an operator with the given scalar.

Sum

Symbolic operator representing the sum of operators.