tnpy.finite_dmrg.ShiftInvertDMRG
2.2. tnpy.finite_dmrg.ShiftInvertDMRG#
- class tnpy.finite_dmrg.ShiftInvertDMRG(mpo, bond_dim, offset=0, block_size=1, mps=None, exact_solver_dim=200)[source]#
Bases:
tnpy.finite_dmrg.FiniteDMRG
The DMRG algorithm for optimizing the shift-invert spectrum of a finite size system.
\[(H - \epsilon) \phi_n = \frac{1}{E_n - \epsilon}(H - \epsilon)^2 \phi_n\]the original eigenvectors then can be restored through
\[\psi_n = (H - \epsilon) \phi_n\]- Parameters
mpo (tnpy.operators.MatrixProductOperator) – The matrix product operator for \(H - \epsilon\).
bond_dim (int) –
offset (float) –
block_size (int) –
exact_solver_dim (int) –
- __init__(mpo, bond_dim, offset=0, block_size=1, mps=None, exact_solver_dim=200)[source]#
The DMRG algorithm for optimizing the shift-invert spectrum of a finite size system.
\[(H - \epsilon) \phi_n = \frac{1}{E_n - \epsilon}(H - \epsilon)^2 \phi_n\]the original eigenvectors then can be restored through
\[\psi_n = (H - \epsilon) \phi_n\]- Parameters
mpo (tnpy.operators.MatrixProductOperator) – The matrix product operator for \(H - \epsilon\).
bond_dim (int) –
offset (float) –
block_size (int) –
mps (Optional[tnpy.matrix_product_state.MatrixProductState]) –
exact_solver_dim (int) –
Methods
__init__
(mpo, bond_dim[, offset, ...])The DMRG algorithm for optimizing the shift-invert spectrum of a finite size system.
one_site_solver
(site[, tol])- param site
perturb_wave_function
(site[, alpha])Perturb the local tensor of wave function by an amount of
alpha
.run
([tol, max_sweep, metric])By calling this method,
FiniteDMRG
will start the sweeping procedure until the given tolerance is reached or touching the maximally allowed number of sweeps.sweep
([direction, tol])Perform a single sweep on the given
direction
.two_site_solver
(site[, tol])variance
()Attributes
bond_dim
mps
n_sites
phys_dim
- __init__(mpo, bond_dim, offset=0, block_size=1, mps=None, exact_solver_dim=200)[source]#
The DMRG algorithm for optimizing the shift-invert spectrum of a finite size system.
\[(H - \epsilon) \phi_n = \frac{1}{E_n - \epsilon}(H - \epsilon)^2 \phi_n\]the original eigenvectors then can be restored through
\[\psi_n = (H - \epsilon) \phi_n\]- Parameters
mpo (tnpy.operators.MatrixProductOperator) – The matrix product operator for \(H - \epsilon\).
bond_dim (int) –
offset (float) –
block_size (int) –
mps (Optional[tnpy.matrix_product_state.MatrixProductState]) –
exact_solver_dim (int) –
- property restored_mps: tnpy.matrix_product_state.MatrixProductState | None#
- one_site_solver(site, tol=1e-08, **kwargs)[source]#
- Parameters
site (int) –
tol (float) – Tolerance to the eigensolver.
**kwargs – Keyword arguments to primme eigensolver.
- Return type
Tuple[float, numpy.ndarray]
Returns:
- sweep(direction=Direction.RIGHTWARD, tol=1e-08, **kwargs)[source]#
Perform a single sweep on the given
direction
.- Parameters
direction (tnpy.matrix_product_state.Direction) – The left or right direction on which the sweep to perform.
tol (float) – Tolerance to the eigensolver.
**kwargs – Keyword arguments to primme eigensolver.
- Returns
Variationally optimized energy after this sweep.
- Return type
float | None
- run(tol=1e-07, max_sweep=100, metric=Metric.ENERGY, **kwargs)[source]#
By calling this method,
FiniteDMRG
will start the sweeping procedure until the given tolerance is reached or touching the maximally allowed number of sweeps.- Parameters
tol (float) – Required precision to the variationally optimized energy.
max_sweep (int) – Maximum number of sweeps.
metric (tnpy.finite_dmrg.Metric) – By which value to examine the convergence.
**kwargs – Keyword arguments to primme eigensolver.
- Returns
A record of energies computed on each sweep.
- Return type
List[float]
- property measurements: tnpy.matrix_product_state.MatrixProductStateMeasurements#