qml.labs.trotter_error

Module containing functionality for computing Trotter error.

Warning

This module is experimental. Frequent changes will occur, with no guarantees of stability or backwards compatibility.

Trotter Base Classes

Abstract classes specifying the methods needed for implementing fragments and states in the Trotter error workflow.

AbstractState()

Abstract class used to define a state object for product formula error estimation.

Fragment()

Abstract class used to define a fragment object for product formula error estimation.

Fragment Classes

Classes representing fragments of different types of Hamiltonians.

GenericFragment(fragment[, norm_fn])

Abstract class used to define a generic fragment object for product formula error estimation.

RealspaceMatrix(states, modes[, blocks])

Implements a dictionary of RealspaceSum objects.

RealspaceSum(modes, ops)

Represents a linear combination of RealspaceOperator objects.

Realspace Hamiltonian Classes

Classes used to store representations of realspace Hamiltonians.

RealspaceCoeffs(tensor[, label])

Lightweight representation of a tensor of coefficients.

RealspaceOperator(modes, ops, coeffs)

Represents a linear combination of a product of position and momentum operators.

Fragment Functions

Functions used to retrieve fragments of various Hamiltonians.

generic_fragments(fragments[, norm_fn])

Instantiates GenericFragment objects.

vibrational_fragments(modes, freqs, ...[, ...])

Returns a list of fragments summing to a vibrational Hamiltonian.

vibronic_fragments(states, modes, freqs, ...)

Returns a list of fragments summing to a vibronic Hamiltonian.

Harmonic Oscillator Classes

Classes used to construct the representation of harmonic oscillator states.

HOState(modes, gridpoints, state)

Represent a wavefunction in the harmonic oscillator basis.

VibronicHO(states, modes, gridpoints, ho_states)

Represent the tensor product of harmonic oscillator states.

Error Estimation Functions

Functions for computing Trotter error estimates.

perturbation_error(fragments, states[, delta])

Computes the perturbation theory error using the second-order Trotter error operator.

trotter_error(fragments, delta)

Compute the second-order Trotter error operator.