LanczosEvolution

Inheritance Diagram

Inheritance diagram of tenpy.linalg.krylov_based.LanczosEvolution

Methods

LanczosEvolution.__init__(H, psi0, options)

LanczosEvolution.iadd_prefactor_other(w, ...)

LanczosEvolution.iscale_prefactor(w, scale)

LanczosEvolution.run(delta[, normalize])

Calculate expm(delta H).dot(psi0) using Lanczos.

class tenpy.linalg.krylov_based.LanczosEvolution(H, psi0, options)[source]

Bases: LanczosGroundState

Calculate \(exp(delta H) |psi0>\) using Lanczos.

It turns out that the Lanczos algorithm is also good for calculating the matrix exponential applied to the starting vector. Instead of diagonalizing the tri-diagonal h and taking the ground state, we now calculate exp(delta h) e_0 in the Krylov ONB, where e_0 = (1, 0, 0, ...) corresponds to psi0 in the original basis.

Parameters:
  • H – Hamiltonian, starting vector and parameters as defined in LanczosGroundState. The option :cfg:option`LanczosEvolution.P_tol` defines when convergence is reached, see _converged() for details.

  • psi0 – Hamiltonian, starting vector and parameters as defined in LanczosGroundState. The option :cfg:option`LanczosEvolution.P_tol` defines when convergence is reached, see _converged() for details.

  • options – Hamiltonian, starting vector and parameters as defined in LanczosGroundState. The option :cfg:option`LanczosEvolution.P_tol` defines when convergence is reached, see _converged() for details.

Options

config LanczosEvolution
option summary

cutoff (from KrylovBased) in KrylovBased

Cutoff to abort if the norm of the new krylov vector is too small. [...]

E_shift (from KrylovBased) in KrylovBased

Shift the energy (=eigenvalues) by that amount *during* the Lanczos run by [...]

E_tol

Ignored.

min_gap

Ignored.

N_cache (from LanczosGroundState) in LanczosGroundState

The maximum number of `psi` to keep in memory during the first iteration. [...]

N_max (from KrylovBased) in KrylovBased

Maximum number of steps to perform.

N_min (from KrylovBased) in KrylovBased

Minimum number of steps to perform.

P_tol (from KrylovBased) in KrylovBased

Tolerance for the error estimate from the Ritz Residual, [...]

reortho (from KrylovBased) in KrylovBased

For poorly conditioned matrices, one can quickly loose orthogonality of the [...]

option E_tol

Ignored.

option min_gap

Ignored.

delta

Prefactor of H in the exponential.

Type:

float/complex

_result_norm

Norm of the resulting vector.

Type:

float

run(delta, normalize=None)[source]

Calculate expm(delta H).dot(psi0) using Lanczos.

Parameters:
  • delta (float/complex) – Time step by which we should evolve psi0: prefactor of H in the exponential. Note that the complex i is not included!

  • normalize (bool) – Whether to normalize the resulting state. Defaults to np.real(delta) == 0.

Returns:

  • psi_f (Array) – Best approximation for expm(delta H).dot(psi0). If Lanczos.E_shift is used, it’s an approximation for expm(delta (H + E_shift)).dot(psi).

  • N (int) – Krylov space dimension used.