triqs.atom_diag
Exact diagonalization of finite fermionic Hamiltonians and atomic Green’s functions.
This module performs exact diagonalization of a many-body Hamiltonian \(\hat H\) acting on the Fock space of a finite set of fermionic single-particle states. The Hilbert space is split into invariant subspaces of \(\hat H\), each of which is diagonalized independently:
where \(B\) indexes the subspaces, \(H_B\) is the Hamiltonian restricted to the subspace, \(U_B\) is the unitary matrix mapping the Fock basis of the subspace to the eigenbasis of the Hamiltonian, and \(E_B\) is the vector of eigenvalues. By convention the global ground-state energy is subtracted at construction, so that the smallest eigenvalue across all subspaces is zero. The invariant subspaces are built either by an auto-partition procedure, by an explicit list of quantum-number operators, or by a particle-number window, and each block is then diagonalized with the QR algorithm.
Notation used throughout the API:
\(B,\, B'\) : subspace index (parameter
sp_index),\(\dim(B)\) : dimension of subspace \(B\), returned by
AtomDiagReal.get_subspace_dim(),\(E_{B,i}\) : the \(i\)-th eigenvalue inside subspace \(B\),
\(N\) : dimension of the full Hilbert space.
Atomic Green’s function.
Derived from a solved diagonalization problem, the atomic Green’s function is built in the Lehmann (spectral) representation,
where \(\eta = +1\) for fermionic and \(\eta = -1\) for bosonic
statistics, \(Z\) is the partition function at inverse temperature
\(\beta\), and the orbital indices \(a, b\) run over one
Green’s-function block (per gf_struct). The only non-zero contributions
come from \((B, B')\) pairs that are connected by the application of a
creation/annihilation operator. The poles \(p = E_{B',j} - E_{B,i}\) and
the corresponding residues are first stored in the Lehmann data structure,
then evaluated on the requested target mesh (imaginary time, Matsubara,
Legendre, or real frequency).
What this module exposes.
The solver itself is exposed through AtomDiagReal and
AtomDiagComplex; the dispatching factory AtomDiag() chooses the
appropriate variant based on the Hamiltonian (real-valued is the fast,
memory-efficient default; the complex variant is required when the Hamiltonian
has non-trivial phases such as spin-orbit coupling or a complex hybridization).
A set of free functions builds thermodynamic averages
(partition_function(), atomic_density_matrix(),
trace_rho_op()), applies operators on states (act()), tabulates
quantum-number eigenvalues (quantum_number_eigenvalues(),
quantum_number_eigenvalues_checked()), and assembles the atomic Green’s
function on different meshes (atomic_g_tau(), atomic_g_iw(),
atomic_g_l(), atomic_g_w()) from a solved instance.
Examples
Diagonalize a three-orbital Hubbard-Kanamori atom and compute thermodynamic averages and atomic Green’s functions:
>>> import numpy as np
>>> from itertools import product
>>> from triqs.operators import n, c, c_dag
>>> from triqs.operators.util.hamiltonians import h_int_kanamori
>>> from triqs.atom_diag import AtomDiag, partition_function, atomic_density_matrix, trace_rho_op, atomic_g_iw
Set of fundamental operators (3 orbitals, 2 spins) and a Kanamori interaction:
>>> spin_names, n_orb = ('up', 'dn'), 3
>>> fops = [(sn, on) for sn, on in product(spin_names, range(n_orb))]
>>> H = h_int_kanamori(spin_names, n_orb,
... 3.0 * np.ones((3, 3)), 2.0 * np.ones((3, 3)), 0.5, True)
Diagonalize, letting the solver auto-partition the Hilbert space:
>>> ad = AtomDiag(H, fops)
>>> ad.n_subspaces
28
Thermodynamic quantities at inverse temperature beta and the atomic
Green’s function on a Matsubara mesh:
>>> beta = 3.0
>>> Z = partition_function(ad, beta)
>>> dm = atomic_density_matrix(ad, beta)
>>> docc = trace_rho_op(dm, n('up', 0) * n('dn', 0), ad)
>>> gf_struct = [('dn', n_orb), ('up', n_orb)]
>>> G_iw = atomic_g_iw(ad, beta, gf_struct, 100)
Functions
|
Construct an exact diagonalization solver, dispatched on the Hamiltonian type. |
Modules
Exact diagonalization of finite fermionic Hamiltonians. |