Symmetry-Reduced QMB Operator Operations
Sparse operator-kernel utilities acting directly on symmetry-sector configuration tables, with optional momentum-basis projection support.
Sparse operator-application kernels inside symmetry-reduced bases.
This module builds triplet-form sparse data (row, column, value) for local and few-body operators acting on symmetry-sector configuration tables. It also supports optional momentum-basis projection through precomputed sparse factors.
- edlgt.symmetries.sym_qmb_operations.nbody_term(op_list, op_sites_list, sector_configs, momentum_basis=None)[source]
Build triplets (row, col, value) for an n-body operator, optionally projected into a momentum sector.
- Parameters:
op_list (
numpy.ndarray) – Shape (n_ops, n_sites, d_loc, d_loc).op_sites_list (
numpy.ndarray) – Shape (n_ops,), int32 — the lattice sites the operator acts on.sector_configs (
numpy.ndarray) – Shape (n_states, n_sites), int32 — basis configurations in the (symmetry) sector.momentum_basis (
object, optional) – Momentum-projection data. If a dictionary is provided, it must contain the sparse left/right projection arrays with keys"L_col_ptr","L_row_idx","L_data","R_row_ptr","R_col_idx", and"R_data"("n_rows"/"n_cols"may also be present). If an ndarray is provided (legacy path), it is interpreted as a dense projection basis of shape(n_states, basis_dim). IfNone, the operator is built in the real-space symmetry sector.
- Returns:
(row_list, col_list, value_list)triplet arrays for the projected operator.- Return type:
- edlgt.symmetries.sym_qmb_operations.nbody_data(op_list, op_sites_list, sector_configs)[source]
Build sparse triplets for a generic n-body operator in a symmetry basis.
- Parameters:
op_list (
numpy.ndarray) – Site-resolved operator matrices.op_sites_list (
numpy.ndarray) – Site indices on which the operator acts.sector_configs (
numpy.ndarray) – Symmetry-sector configurations, one row per basis state.
- Returns:
(row_list, col_list, value_list)sparse triplet arrays.- Return type:
- edlgt.symmetries.sym_qmb_operations.nbody_data_2sites(op_list, op_sites_list, sector_configs)[source]
Build sparse triplets for a two-site operator in a symmetry basis.
- Parameters:
op_list (
numpy.ndarray) – Site-resolved operator matrices.op_sites_list (
numpy.ndarray) – Two site indices on which the operator acts.sector_configs (
numpy.ndarray) – Symmetry-sector configurations, one row per basis state.
- Returns:
(row_list, col_list, value_list)sparse triplet arrays.- Return type:
- edlgt.symmetries.sym_qmb_operations.localbody_data_par(op, op_site, sector_configs)[source]
Build sparse triplets for a diagonal single-site operator.
- Parameters:
op (
numpy.ndarray) – Site-resolved diagonal operator matrices.op_site (
int) – Site index where the operator acts.sector_configs (
numpy.ndarray) – Symmetry-sector configurations, one row per basis state.
- Returns:
(row_list, col_list, value_list)sparse triplet arrays for the diagonal operator restricted to nonzero entries.- Return type: