Solvers (qiskit_dynamics.solvers)

This module provides classes and functions for solving differential equations.

Table 1 summarizes the standard solver interfaces exposed in this module. It includes a high level class Solver for solving models of quantum systems, as well as low-level functions for solving both ordinary differential equations \(\dot{y}(t) = f(t, y(t))\) and linear matrix differential equations \(\dot{y}(t) = G(t)y(t)\).

Additionally, this module contains more specialized solvers for linear matrix differential equations based on perturbative expansions, described below.

Table 1 Solver interfaces

Object

Description

Solver

High level solver class for both Hamiltonian and Lindblad dynamics. Automatically constructs the relevant model type based on system details, and the solve() method automatically handles qiskit.quantum_info input types.

solve_ode()

Low level solver function for ordinary differential equations:

\[\dot{y}(t) = f(t, y(t)),\]

for \(y(t)\) arrays of arbitrary shape and \(f\) specified as an arbitrary callable.

solve_lmde()

Low level solver function for linear matrix differential equations in standard form:

\[\dot{y}(t) = G(t)y(t),\]

where \(G(t)\) is either a callable or a qiskit_dynamics model type, and \(y(t)\) arrays of suitable shape for the matrix multiplication above.

Perturbative Solvers

The classes DysonSolver and MagnusSolver implement advanced solvers detailed in [1], with the DysonSolver implementing a variant of the Dysolve algorithm originally introduced in [2].

The solvers are specialized to linear matrix differential equations with \(G(t)\) decomposed as:

\[G(t) = G_0 + \sum_j Re[f_j(t)e^{i2\pi\nu_jt}]G_j,\]

and are fixed step with a pre-defined step size \(\Delta t\). The differential equation is solved by either computing a truncated Dyson series, or taking the exponential of a truncated Magnus expansion.

Add reference to both userguide and perturbation theory module documentation.

Solver classes

Solver([static_hamiltonian, ...])

Solver class for simulating both Hamiltonian and Lindblad dynamics, with high level type-handling of input states.

DysonSolver(operators, rotating_frame, dt, ...)

Solver for linear matrix differential equations based on the Dyson series.

MagnusSolver(operators, rotating_frame, dt, ...)

Solver for linear matrix differential equations based on the Magnus expansion.

Solver functions

solve_ode(rhs, t_span, y0[, method, t_eval])

General interface for solving Ordinary Differential Equations (ODEs).

solve_lmde(generator, t_span, y0[, method, ...])

General interface for solving Linear Matrix Differential Equations (LMDEs) in standard form.

References