tnpy.tsdrg.TreeTensorNetworkSDRG
4.3. tnpy.tsdrg.TreeTensorNetworkSDRG#
- class tnpy.tsdrg.TreeTensorNetworkSDRG(mpo, chi)[source]#
Bases:
object
The tree tensor network version of strong disorder renormalization group algorithm.
- Parameters
mpo (MatrixProductOperator) – The matrix product operator.
chi (int) – The truncation dimensions.
Examples
The tSDRG algorithm can be launched by calling
run()
method.>>> tsdrg = TreeTensorNetworkSDRG(mpo, chi=32) >>> tsdrg.run()
After executing
run()
, one can access the binary tensor treeTensorTree
through the attributetree
. For measurements, please refer tomeasurements
orTreeTensorNetworkMeasurements
.- __init__(mpo, chi)[source]#
The tree tensor network version of strong disorder renormalization group algorithm.
- Parameters
mpo (tnpy.operators.MatrixProductOperator) – The matrix product operator.
chi (int) – The truncation dimensions.
Examples
The tSDRG algorithm can be launched by calling
run()
method.>>> tsdrg = TreeTensorNetworkSDRG(mpo, chi=32) >>> tsdrg.run()
After executing
run()
, one can access the binary tensor treeTensorTree
through the attributetree
. For measurements, please refer tomeasurements
orTreeTensorNetworkMeasurements
.
Methods
__init__
(mpo, chi)The tree tensor network version of strong disorder renormalization group algorithm.
block_eigen_solver
(locus)Solve the 2-site Hamiltonian with
chi
lowest eigen-pairs.block_hamiltonian
(locus)Construct the 2-site Hamiltonian from coarse-graining MPO.
run
()Start the algorithm.
spectrum_projector
(locus, evecs)Coarse-grain the MPO with given evecs which is used to form a projector.
truncation_gap
(evals)Return the gap upon
chi
eigenvalues kept.Attributes
The input bond dimensions.
The renormalized eigenvalues, with length
chi
.Call available measurements in
TreeTensorNetworkMeasurements
.The input matrix product operator.
Number of sites, i.e. the system size.
The tree.
- class GapCache(tsdrg, evecs=<factory>, gap=<factory>)[source]#
Bases:
object
Helper class for caching the energy gap in
TreeTensorNetworkSDRG
algorithm.- Parameters
tsdrg (tnpy.tsdrg.TreeTensorNetworkSDRG) –
evecs (List[numpy.ndarray]) –
gap (List[float]) –
- Return type
None
- evecs: List[numpy.ndarray]#
- gap: List[float]#
- neighbouring_bonds(bond)[source]#
Obtain the neighbouring bonds of input bond.
- Parameters
bond (int) –
- Return type
List[int]
Returns:
- update(max_gapped_bond)[source]#
Update the gap accordingly after 2 nodes are fused. This will only examine neighbours of 2 fused nodes.
- Parameters
max_gapped_bond (int) – The bond between 2 fused nodes.
Returns:
- __init__(tsdrg, evecs=<factory>, gap=<factory>)#
- Parameters
tsdrg (tnpy.tsdrg.TreeTensorNetworkSDRG) –
evecs (List[numpy.ndarray]) –
gap (List[float]) –
- Return type
None
- __init__(mpo, chi)[source]#
The tree tensor network version of strong disorder renormalization group algorithm.
- Parameters
mpo (tnpy.operators.MatrixProductOperator) – The matrix product operator.
chi (int) – The truncation dimensions.
Examples
The tSDRG algorithm can be launched by calling
run()
method.>>> tsdrg = TreeTensorNetworkSDRG(mpo, chi=32) >>> tsdrg.run()
After executing
run()
, one can access the binary tensor treeTensorTree
through the attributetree
. For measurements, please refer tomeasurements
orTreeTensorNetworkMeasurements
.
- property mpo: tnpy.operators.MatrixProductOperator#
The input matrix product operator.
- property chi: int#
The input bond dimensions. That is, number of eigenvectors to keep in the projection.
- property tree: tnpy.tsdrg.TensorTree#
The tree.
- property n_sites: int#
Number of sites, i.e. the system size.
- property evals: numpy.ndarray | None#
The renormalized eigenvalues, with length
chi
.- Returns
The approximated eigenvalues. Return None is the algorithm is not run yet.
- block_eigen_solver(locus)[source]#
Solve the 2-site Hamiltonian with
chi
lowest eigen-pairs.- Parameters
locus (int) – The site in coarse-grained system during the RG process.
- Returns
A tuple (
evals
,evecs
), whereevals
are the lowestchi
eigenvalues, andevecs
are the corresponding eigenvectors.- Return type
Tuple[numpy.ndarray, numpy.ndarray]
- truncation_gap(evals)[source]#
Return the gap upon
chi
eigenvalues kept.- Parameters
evals (numpy.ndarray) – The eigenvalues (energy spectrum).
- Returns
The truncation gap, evals[chi+1] - evals[chi].
- Return type
float
- block_hamiltonian(locus)[source]#
Construct the 2-site Hamiltonian from coarse-graining MPO.
- Parameters
locus (int) – The site in coarse-grained system during the RG process.
- Returns
The 2-site Hamiltonian.
- Return type
Warning
This implicitly assumes the boundary vectors of MPO are the first row and the last column.
- spectrum_projector(locus, evecs)[source]#
Coarse-grain the MPO with given evecs which is used to form a projector.
- Parameters
locus (int) – The site in coarse-grained system during the RG process.
evecs (numpy.ndarray) –
- Returns
The projector.
- Return type
- property measurements: tnpy.tsdrg.TreeTensorNetworkMeasurements#
Call available measurements in
TreeTensorNetworkMeasurements
.Returns: