Skip to content

dq.sepropagator

sepropagator(
    H: ArrayLike | TimeArray,
    tsave: ArrayLike,
    *,
    solver: Solver | None = None,
    gradient: Gradient | None = None,
    options: Options = Options()
) -> SEPropagatorResult

Compute the propagator of the Schrödinger equation.

This function computes the propagator \(U(t)\) at time \(t\) of the Schrödinger equation (with \(\hbar=1\)) $$ U(t) = \mathscr{T}\exp\left(-i\int_0^tH(t')\dt'\right), $$ where \(\mathscr{T}\) is the time-ordering symbol and \(H\) is the system's Hamiltonian. The formula simplifies to \(U(t)=e^{-iHt}\) if the Hamiltonian does not depend on time.

If the Hamiltonian is constant or piecewise constant, the propagator is computed by directly exponentiating the Hamiltonian. Otherwise, the propagator is computed by solving the Schrödinger equation with an ODE solver.

Defining a time-dependent Hamiltonian

If the Hamiltonian depends on time, it can be converted to a time-array using dq.pwc(), dq.modulated(), or dq.timecallable(). See the Time-dependent operators tutorial for more details.

Running multiple simulations concurrently

The Hamiltonian H can be batched to compute multiple propagators concurrently. All other arguments are common to every batch. See the Batching simulations tutorial for more details.

Parameters

  • H (array-like or time-array of shape (...H, n, n)) –

    Hamiltonian.

  • tsave (array-like of shape (ntsave,)) –

    Times at which the propagators are saved. The equation is solved from tsave[0] to tsave[-1], or from t0 to tsave[-1] if t0 is specified in options.

  • solver –

    Solver for the integration. Defaults to None which redirects to dq.solver.Expm (explicit matrix exponentiation) or dq.solver.Tsit5 depending on the Hamiltonian type (supported: Expm, Tsit5, Dopri5, Dopri8, Kvaerno3, Kvaerno5, Euler).

  • gradient –

    Algorithm used to compute the gradient. The default is solver-dependent, refer to the documentation of the chosen solver for more details.

  • options –

    Generic options, see dq.Options.

Returns

dq.SEPropagatorResult object holding the result of the propagator computation. Use the attribute propagators to access saved quantities, more details in dq.SEPropagatorResult.