Tools module (quspin.tools)

Classes and functions to manipulate quantum states and do calculations.

evolution

ED_state_vs_time(psi, E, V, times[, iterate])

Calculates the time evolution of initial state using a complete eigenbasis.

evolve(v0, t0, times, f[, solver_name, …])

Implements (imaginary) time evolution for a user-defined first-order ODE.

expm_multiply_parallel(A[, a, dtype, copy])

Implements scipy.sparse.linalg.expm_multiply() for openmp.

Lanczos

lanczos_full(A, v0, m[, full_ortho, out, eps])

Creates Lanczos basis; diagonalizes Krylov subspace in Lanczos basis.

lanczos_iter(A, v0, m[, return_vec_iter, …])

Creates generator for Lanczos basis; diagonalizes Krylov subspace in Lanczos basis.

expm_lanczos(E, V, Q_T[, a, out])

Calculates action of matrix exponential on vector using Lanczos algorithm.

lin_comb_Q_T(coeff, Q_T[, out])

Computes a linear combination of the Lanczos basis vectors:

LTLM_static_iteration(O_dict, E, V, Q_T[, beta])

Calculate iteration for low-temperature Lanczos method.

FTLM_static_iteration(O_dict, E, V, Q_T[, beta])

Calculate iteration for Finite-Temperature Lanczos method.

Floquet

Floquet(evo_dict[, HF, UF, thetaF, VF, n_jobs])

Calculates the Floquet spectrum, Floquet Hamiltonian and Floquet states.

Floquet_t_vec(Omega, N_const[, len_T, N_up, …])

Creates a Floquet time vector with fixed number of points per period.

measurements

ent_entropy(system_state, basis[, …])

DEPRECATED (cf basis.ent_entropy).

diag_ensemble(N, system_state, E2, V2[, …])

Calculates expectation values in the Diagonal ensemble of the initial state.

obs_vs_time(psi_t, times, Obs_dict[, …])

Calculates expectation value of observable(s) as a function of time in a time-dependent state.

block_tools

block_ops(blocks, static, dynamic, …[, …])

Splits up the dynamics of a state over various symmetry sectors.

block_diag_hamiltonian(blocks, static, …)

Block-diagonalises a Hamiltonian obeying a symmetry.

misc

matvec(array, other[, overwrite_out, out, a])

Calculates omp-parallelized matrix vector products.

get_matvec_function(array)

Determines automatically the matrix vector product routine for an array based on its type.

mean_level_spacing(E[, verbose])

Calculates the mean-level spacing of an energy spectrum.

project_op(Obs, proj[, dtype])

Projects observable onto symmetry-reduced subspace.

KL_div(p1, p2)

Calculates Kullback-Leibler divergence of two discrete probability distributions.

csr_matvec(A, v[, a, out, overwrite_out])

DEPRICATED (cf matvec).