2.1. mbl.experiment.algorithm#

Classes

EDExperiment(model)

Run an exact diagonalization experiment against the model.

Experiment1D(model)

Abstractive class for running algorithm against the 1-dimensional model.

TSDRGExperiment(model, chi[, method])

Run a Tree Tensor Strong-Disorder Renormalization Group (tSDRG) experiment against the model.

class mbl.experiment.algorithm.Experiment1D(model)[source]#

Bases: abc.ABC

Abstractive class for running algorithm against the 1-dimensional model. One should inherit this class and implement Experiment1D._mpo_run_method() and Experiment1D.compute_df().

Parameters

model (tnpy.model.model_1d.Model1D) – An 1d model.

__init__(model)[source]#

Abstractive class for running algorithm against the 1-dimensional model. One should inherit this class and implement Experiment1D._mpo_run_method() and Experiment1D.compute_df().

Parameters

model (tnpy.model.model_1d.Model1D) – An 1d model.

property model: tnpy.model.model_1d.Model1D#
abstract compute_df()[source]#
Return type

pandas.core.frame.DataFrame

class mbl.experiment.algorithm.EDExperiment(model)[source]#

Bases: mbl.experiment.algorithm.Experiment1D

Run an exact diagonalization experiment against the model.

Parameters

model (tnpy.model.model_1d.Model1D) – An 1d model.

__init__(model)[source]#

Run an exact diagonalization experiment against the model.

Parameters

model (tnpy.model.model_1d.Model1D) – An 1d model.

property ed: tnpy.exact_diagonalization.ExactDiagonalization#

A reference to the exact diagonalization solver.

property evals: numpy.ndarray#

Eigenvalues in ascending order.

property total_sz: numpy.ndarray#

The total \(S^z\) for every eigenvectors.

Returns

An array in the order same as the eigenvalues.

entanglement_entropy(site)[source]#

Compute the von Neumann entanglement entropy for every eigenvectors.

Parameters

site (int) – The site to which the bi-partition is taken.

Returns

An array in the order same as the eigenvalues.

Return type

numpy.ndarray

abstract compute_df()[source]#
Return type

pandas.core.frame.DataFrame

class mbl.experiment.algorithm.TSDRGExperiment(model, chi, method='min')[source]#

Bases: mbl.experiment.algorithm.Experiment1D

Run a Tree Tensor Strong-Disorder Renormalization Group (tSDRG) experiment against the model.

Parameters
  • model (tnpy.model.model_1d.Model1D) – An 1d model.

  • chi (int) – The bond dimensions.

  • method (str) – Keep the highest or lowest chi eigenvectors in projection.

__init__(model, chi, method='min')[source]#

Run a Tree Tensor Strong-Disorder Renormalization Group (tSDRG) experiment against the model.

Parameters
  • model (tnpy.model.model_1d.Model1D) – An 1d model.

  • chi (int) – The bond dimensions.

  • method (str) – Keep the highest or lowest chi eigenvectors in projection.

property tsdrg: tnpy.tsdrg.TreeTensorNetworkSDRG#

A reference to the TSDRG solver.

property evals: numpy.ndarray#

Eigenvalues in ascending order.

property variance: numpy.ndarray#

Energy variance.

Returns

An array in the order same as the eigenvalues.

property total_sz: numpy.ndarray#

The total \(S^z\) for every eigenvectors.

Returns

An array in the order same as the eigenvalues.

property edge_entropy: numpy.ndarray#

Compute the von Neumann entanglement entropy for every eigenvectors, where the bi-partition is taken on the 1st bond. That is, part \(A\) contains only one site, leaving the rest of sites in part \(B\).

Returns

An array in the order same as the eigenvalues.

abstract compute_df()[source]#
Return type

pandas.core.frame.DataFrame

save_tree(filename)[source]#

Serialize the TensorTree as a pickle binary.

Parameters

filename (str) –

References

https://docs.python.org/3/library/pickle.html