Quantum Many Body (QMB) Operations
- ed_lgt.modeling.qmb_operations.apply_basis_projection(op, op_name, basis_label, gauge_basis)[source]
Applies basis projection to an operator for a specific lattice site and updates its name.
- Parameters:
op (scipy.sparse matrix) – The operator to be projected.
op_name (str) – The name of the operator.
basis_label (str) – The label identifying the basis projection applicable to the lattice site.
gauge_basis (dict of scipy.sparse matrices) – Dictionary containing the basis projectors for each site, keyed by site labels.
- Returns:
A tuple containing the projected operator and its updated name.
- Return type:
tuple
- ed_lgt.modeling.qmb_operations.construct_operator_list(op_list, op_sites_list, lvals, has_obc, staggered_basis, gauge_basis)[source]
Constructs a dictionary of operators and a list of their names for a quantum many-body lattice. Each operator is placed at specified positions on the lattice, and its basis is projected according to the site’s characteristics.
- Parameters:
op_list (list of scipy.sparse matrices) – Single-site operators to be placed on the lattice.
op_sites_list (list of ints) – Indices in the lattice where each operator from ‘operators’ should be placed.
lvals (list of ints) – Dimensions of the lattice, representing the number of sites in each dimension.
has_obc (list of bool) – true for OBC, false for PBC along each direction
staggered_basis (bool) – Indicates if a staggered basis is used for the lattice.
gauge_basis (dict) – A dictionary containing the basis projectors for each site, keyed by site labels.
- Returns:
A tuple containing a dictionary of operators keyed by their names and a list of operator names.
- Return type:
tuple
- ed_lgt.modeling.qmb_operations.four_body_op(op_list, op_sites_list, lvals, has_obc, staggered_basis=False, gauge_basis=None, get_real=False)[source]
This function compute the single plaquette operator term on the lattice with 4 operators acting on 4 specific lattice sites (the rest is occupied by identities).
- Parameters:
op_list (list of 4 scipy.sparse.matrices) – list of the 4 operators involved in the Plaquette Term
op_sites_list (list of 4 int) – list of the positions of two operators in the 1D chain ordering 2d lattice sites
lvals (list) – Dimensions (# of sites) of a d-dimensional lattice
has_obc (list of bool) – true for OBC, false for PBC along each direction
staggered_basis (bool, optional) – Whether the lattice has staggered basis. Defaults to False.
gauge_basis (dict, optional) – Dictionary of Basis Projectors (sparse matrices) for lattice sites (corners, borders, lattice core, even/odd sites). Defaults to None.
get_real (bool, optional) – If true, it yields the real part of the operator. Defaults to False.
- Raises:
TypeError – If the input arguments are of incorrect types or formats.
- Returns:
QMB Hamiltonian in sparse form
- Return type:
scipy.sparse.matrix
- ed_lgt.modeling.qmb_operations.local_op(operator, op_site, lvals, has_obc, staggered_basis=False, gauge_basis=None)[source]
This function compute the single local operator term on the lattice where the operator acts on a specific site (the rest is occupied by identities).
- Parameters:
operator (scipy.sparse) – A single site sparse operator matrix.
op_site (scalar int) – position of the site along a certain 1D ordering in the 2D lattice
lvals (list) – Dimensions (# of sites) of a d-dimensional lattice
has_obc (list of bool) – true for OBC, false for PBC along each direction
staggered_basis (bool, optional) – Whether the lattice has staggered basis. Defaults to False.
gauge_basis (dict, optional) – Dictionary of Basis Projectors (sparse matrices) for lattice sites (corners, borders, lattice core, even/odd sites). Defaults to None.
- Raises:
TypeError – If the input arguments are of incorrect types or formats.
- Returns:
QMB Hamiltonian in sparse form
- Return type:
scipy.sparse.matrix
- ed_lgt.modeling.qmb_operations.qmb_operator(ops, op_names_list, add_dagger=False, get_real=False, get_imag=False)[source]
This function performs the QMB operation of an arbitrary long list of operators of arbitrary dimensions.
- Parameters:
ops (dict) – dictionary storing all the single site operators
op_names_list (list) – list of the names of the operators involved in the qmb operator
lattice (the list is assumed to be stored according to the zig-zag order on the)
strength (scalar) – real/complex coefficient applied in front of the operator
add_dagger (bool, optional) – if true, yields the hermitian conjugate. Defaults to False.
get_real (bool, optional) – if true, yields only the real part. Defaults to False.
get_imag (bool, optional) – if true, yields only the imaginary part. Defaults to False.
- Returns:
QMB sparse operator
- Return type:
csr_matrix
- ed_lgt.modeling.qmb_operations.two_body_op(op_list, op_sites_list, lvals, has_obc, staggered_basis=False, gauge_basis=None)[source]
This function compute the single twobody operator term on the lattice with 2 operators acting on two specific lattice sites (the rest is occupied by identities).
- Parameters:
op_list (list of 2 scipy.sparse.matrices) – list of the 4 operators involved in the Plaquette Term
op_sites_list (list of 2 int) – list of the positions of two operators in the 1D chain ordering 2d lattice sites
lvals (list) – Dimensions (# of sites) of a d-dimensional lattice
has_obc (list of bool) – true for OBC, false for PBC along each direction
staggered_basis (bool, optional) – Whether the lattice has staggered basis. Defaults to False.
gauge_basis (dict, optional) – Dictionary of Basis Projectors (sparse matrices) for lattice sites (corners, borders, lattice core, even/odd sites). Defaults to None.
- Raises:
TypeError – If the input arguments are of incorrect types or formats.
- Returns:
QMB Hamiltonian in sparse form
- Return type:
scipy.sparse.matrix
See also