hqs_spin_mapper.spin_mapper_protocols
Module containing the protocols for transformable objects of the HQS Spin Mapper.
Classes
| 
 | Collection of the matrix representations of the system Hamiltonian. | 
| 
 | Protocol for systems that allow for a Schrieffer-Wolff transformation. | 
| 
 | Protocol for transformable systems with the prerequisites for spin-orbital optimization. | 
Exceptions
| 
 | Custom exception for the case that objects do not satisfy the required protocol. | 
- exception hqs_spin_mapper.spin_mapper_protocols.InsufficientProtocolError(obj: Any, specified_protocol: Any)
- Custom exception for the case that objects do not satisfy the required protocol. - Instantiate the error and print the error message. - Parameters:
- obj (Any) – Object that doesn’t satisfy the specified protocol. 
- specified_protocol (Any) – The specified protocol that is required. 
 
 - __init__(obj: Any, specified_protocol: Any) None
- Instantiate the error and print the error message. - Parameters:
- obj (Any) – Object that doesn’t satisfy the specified protocol. 
- specified_protocol (Any) – The specified protocol that is required. 
 
 
 - add_note()
- Exception.add_note(note) – add a note to the exception 
 - args
 - with_traceback()
- Exception.with_traceback(tb) – set self.__traceback__ to tb and return self. 
 
- class hqs_spin_mapper.spin_mapper_protocols.Hamiltonian_Matrices(H0_uu: ndarray, H0_dd: ndarray, H0_ud: ndarray, HU: ndarray, Jz: ndarray | None = None, Jp: ndarray | None = None, Jc: ndarray | None = None, HR: ndarray | None = None)
- Collection of the matrix representations of the system Hamiltonian. - H0_uu (np.ndarray): Quadratic Hamiltonian, spin directions up-up H0_dd (np.ndarray): Quadratic Hamiltonian, spin directions down-down H0_uu (np.ndarray): Quadratic Hamiltonian, spin directions up-down HU (np.ndarray): Density-Density interaction matrix or interaction tensors Jz (np.ndarray): Sz-Sz interaction matrix Jp (np.ndarray): S+-S- interaction matrix Jc (np.ndarray): vec{S}xvec{S} interaction matrix HR (np.ndarray): Remainder bath interaction tensor - H0_uu: ndarray
 - H0_dd: ndarray
 - H0_ud: ndarray
 - HU: ndarray
 - Jz: ndarray | None = None
 - Jp: ndarray | None = None
 - Jc: ndarray | None = None
 - HR: ndarray | None = None
 - __init__(H0_uu: ndarray, H0_dd: ndarray, H0_ud: ndarray, HU: ndarray, Jz: ndarray | None = None, Jp: ndarray | None = None, Jc: ndarray | None = None, HR: ndarray | None = None) None
 
- class hqs_spin_mapper.spin_mapper_protocols.Supports_SW_Transformation(*args, **kwargs)
- Protocol for systems that allow for a Schrieffer-Wolff transformation. - property hamiltonians: Hamiltonian_Matrices
- Return the matrices of the terms in the Hamiltonian describing the system. 
 - property rotation_matrix: ndarray
- Return the rotation matrix that transforms the system to the spin-optimized basis. 
 - property spin_indices: Set[int]
- Return the set of indices of the spin-like orbitals. 
 - __init__(*args, **kwargs)
 - _abc_impl = <_abc._abc_data object>
 - _is_protocol = True
 - _is_runtime_protocol = True
 - property system_size: int
- Return the system size i.e. the number of orbitals. 
 - property site_type: str
- Return the type of orbitals (e.g. - spinful_fermionsor- spinless_fermions).
 - property prefactor_cutoff: float
- Return the cutoff for the prefactors of terms to be considered in the transformation. 
 - property generator: ExpressionSpinful | ExpressionSpinful_complex
- Return the generator \(S\) of the Schrieffer-Wolff transformation. 
 - property transformed_hamiltonian: ExpressionSpinful | ExpressionSpinful_complex
- Return the Schrieffer-Wolff transformed Hamiltonian \(\tilde{H}\). 
 
- class hqs_spin_mapper.spin_mapper_protocols.Supports_Spin_Optimization(*args, **kwargs)
- Protocol for transformable systems with the prerequisites for spin-orbital optimization. - property tolerance: float
- Return the tolerated parity deviation \(\delta\) in \(P=(-1 + \delta)\) for an orbital to be considered a spin-orbital. 
 - property optimization_steps: int
- Return the number of optimization loops. 
 - property immutable_indices: Set[int]
- Return the orbital indices that should remain unaltered by the optimization. 
 - property rdm1: ndarray | Tuple[ndarray, ...]
- Return the matrices of the 1-RDM (\(\langle c^{\dagger}_{i\sigma} c_{j\sigma'}\rangle\)). 
 - property rdm2: ndarray
- Return the tensor of the 2-RDM (\(\langle c^{\dagger}_{i\uparrow} c^{\dagger}_{j\downarrow} c_{k\downarrow} c_{l\uparrow}\rangle\)). 
 - __init__(*args, **kwargs)
 - _abc_impl = <_abc._abc_data object>
 - _is_protocol = True
 - _is_runtime_protocol = True