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

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 tree TensorTree through the attribute tree. For measurements, please refer to measurements or TreeTensorNetworkMeasurements.

__init__(mpo, chi)[source]#

The tree tensor network version of strong disorder renormalization group algorithm.

Parameters

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 tree TensorTree through the attribute tree. For measurements, please refer to measurements or TreeTensorNetworkMeasurements.

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

chi

The input bond dimensions.

evals

The renormalized eigenvalues, with length chi.

measurements

Call available measurements in TreeTensorNetworkMeasurements.

mpo

The input matrix product operator.

n_sites

Number of sites, i.e. the system size.

tree

The tree.

class GapCache(tsdrg, evecs=<factory>, gap=<factory>)[source]#

Bases: object

Helper class for caching the energy gap in TreeTensorNetworkSDRG algorithm.

Parameters
Return type

None

tsdrg: tnpy.tsdrg.TreeTensorNetworkSDRG#
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
Return type

None

__init__(mpo, chi)[source]#

The tree tensor network version of strong disorder renormalization group algorithm.

Parameters

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 tree TensorTree through the attribute tree. For measurements, please refer to measurements or TreeTensorNetworkMeasurements.

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), where evals are the lowest chi eigenvalues, and evecs 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

numpy.ndarray

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

numpy.ndarray

run()[source]#

Start the algorithm.

property measurements: tnpy.tsdrg.TreeTensorNetworkMeasurements#

Call available measurements in TreeTensorNetworkMeasurements.

Returns: