supergrad.quantum_system.KronObj#
- class supergrad.quantum_system.KronObj(inpt=None, dims=None, locs=None, _nested_inpt=False, diag_unitary=None)[source]#
The Kronecker Object (KronObj) class is designed to represent k-body Hamiltonian in Kronecker product format. It’s particularly useful for representing the sparse total system Hamiltonian in a form convenient for computing Einstein summation.
Additionally, the KronObj class supports mathematical operations such as addition(+) and multiplication(@) between KronObj instances.
- Parameters:
inpt (list) – list of array The local Hamiltonian that represents the Hamiltonian of each subsystem in a composite system. Each element of the inpt corresponds to the local Hamiltonian of the corresponding subsystem tagged in the locs.
dims (list) – list of int Dimensions of subsystems in the composited Hilbert Space.
locs (list) – list of int Location information of corresponding local Hamiltonian. For example, the first element of locs is the index of the first subsystem in self.dims, and so on.
diag_unitary (array) – Unitary of diagonal-unitary format.
_nested_inpt (bool) – For internal using only.
Methods
__init__([inpt, dims, locs, _nested_inpt, ...])compute_contraction_path([op_list, ...])Compute tensor network contraction path.
conjugate()Conjugate over tensor product
dag()Conjugate transpose over tensor product
dense()Return new KronObj contain dense matrix
diagonalize_operator()Diagonalize Hermitian to diagonal-unitary representation.
expm([right_vec, trotter_order, tn_expr])Calculate matrix exponentiation of KronObj.
full()Dense matrix from the result of Kronecker product.
get_data()set_data(data)transpose()Transpose over tensor product
tree_flatten()Specifies a flattening recipe.
tree_unflatten(aux_data, children)Specifies an unflattening recipe.
Attributes
datadiag_statusThe diagonal-unitary format status of subsystems.
loc_statusThe local Hamiltonian format status of subsystems.
shapeThe shape of unitary