pmm_tools.model_helper
Normalize symbolic chain parameters and define ordered fermionic modes.
Functions
| Name | Description |
|---|---|
define_operators | Return ordered annihilation operators for a spinless or spinful chain. |
prepare_parameters | Return parameter tuples in site or bond order. |
define_operatorsfunction#
def define_operators(length, spinful=False)Return ordered annihilation operators for a spinless or spinful chain.
Spinless modes are c_0,...,c_(length-1). Spinful modes alternate up/down at each site. These are noncommuting SymPy FermionOp objects; occupation matrices use the first mode as the most significant bit.
prepare_parametersfunction#
def prepare_parameters(parameters, specs)Return parameter tuples in site or bond order.
Each specification supplies len and real. Real parameters create
real symbols; other parameters create unrestricted complex symbols.
Values may be numeric/SymPy scalars, zero-dimensional NumPy arrays,
one-dimensional sequences of the required length, or the policies
"constant" and "space-dependent". Scalars repeat across the chain.
parameters=None creates uniform symbols for every parameter; an explicit
mapping must supply all parameters used by the constructor.