SciPy keywords
About this backend
The scipy backend builds operators as SciPy
CSR matrices.
build_op and get_ops return labeled factories that construct these
matrices when called. Pass the factories to public ed, xas, and rixs;
the primary Hamiltonian’s .backend label selects SciPy. The backend calls
each supplied factory at calculation start, including repeated arguments.
See Operator factories and solver dispatch.
The backend-specific ed_scipy, xas_scipy, and rixs_scipy functions
also require factories. These can return NumPy arrays, SciPy sparse matrices,
or a matrix-free
LinearOperator.
ED uses SciPy’s
LOBPCG eigensolver;
XAS and RIXS use EDRIXS’s Lanczos routines, and the RIXS correction-vector
step uses SciPy’s
GMRES solver.
XAS and RIXS use the lowest retained initial energy and the first incident
energy as internal references. Assuming the incident grid is near resonance,
this centers the intermediate Hamiltonian; RIXS also centers the final
Hamiltonian on the initial energy. Dense and sparse diagonals are shifted
before matrix-vector multiplication, without changing the input operators.
The public energy grids and returned RIXS pole energies retain their original
reference. Spectra are evaluated before restoring the pole energies.
For a custom LinearOperator, shifting is necessarily applied after its
matrix-vector product and cannot recover precision lost inside that product.
Options are specific to the stage where they are supplied.
build_op and get_ops
Option |
Default |
Description |
|---|---|---|
|
|
Discard operator coefficients whose magnitude does not exceed this threshold. |
Here tol controls operator truncation. It is separate from the
eigensolver tolerance accepted by ed.
ed
Option |
Default |
Description |
|---|---|---|
|
|
LOBPCG block size; defaults to the requested number of eigenpairs. |
|
|
LOBPCG convergence tolerance. |
|
|
Maximum LOBPCG iterations. |
|
|
Seed used to generate the initial LOBPCG block. |
|
|
Initial LOBPCG block with shape (dimension, blocksize). |
|
|
Suppress SciPy nonconvergence warnings; results are still returned. |
xas
Option |
Default |
Description |
|---|---|---|
|
|
Maximum intermediate-state Lanczos dimension. |
rixs
Option |
Default |
Description |
|---|---|---|
|
|
Maximum final-state Lanczos dimension. |
|
|
GMRES relative convergence tolerance (rtol; tol in older SciPy). |
|
|
Maximum GMRES restart cycles. |
|
|
GMRES restart interval. |
linsys_tol sets GMRES’s relative tolerance, passed as rtol (or tol
in older SciPy). With the rtol API, EDRIXS sets the absolute tolerance
atol to zero.