iMPSOps

Fortran module iMPSOps:Containing the methods for iMPS simulations.

Authors

    1. Jaschke

      1. Wall

Details

The following subroutines / functions are defined for the convergence parameters.

iMPSOps_f90.TransferMatrixWrapper_mps()[source]

fortran-subroutine - ?? () Diagonalize the transfer matrix defined by the unit cell \psi using the Arnoldi method.

Arguments

psiTYPE(mps), inout

?

eigvalsREAL(*), inout

?

VLRTYPE(matrixc), inout

?

dirCHARACTER, in

‘l’, ‘r’: it indicates the direction

flagLOGICAL, out

indicate possible symmetry breaking

errcodeINTEGER, inout

info-flag from DNAUPD, DNEUPD

Source Code

show / hide f90 code
iMPSOps_f90.TransferMatrixWrapper_mpsc()[source]

fortran-subroutine - ?? () Diagonalize the transfer matrix defined by the unit cell \psi using the Arnoldi method.

Arguments

psiTYPE(MPSc), inout

?

eigvalsREAL(*), inout

?

VLRTYPE(matrixc), inout

?

dirCHARACTER, in

‘l’, ‘r’: it indicates the direction

flagLOGICAL, out

indicate possible symmetry breaking

errcodeINTEGER, inout

info-flag from DNAUPD, DNEUPD

Details

According to M.L. Wall’s thesis and I.P. McCullochs paper Infinite size density matrix renormalization group, revisited (arXiv:0804.2509), the matrix transfer matrix to be diagonalized in this subroutine is always hermitian and non-negative (later) or “hermitian and positive definite when the largest eigenvalue is non-degenerate” (Wall).

Source Code

show / hide f90 code
iMPSOps_f90.stabilize_tensorc()[source]

fortran-subroutine - ?? () Orthonormalize the eigenmatrices Xs and make them Hermitian.

Arguments

XsTYPE(matrixc)(*), inout

??

Details

This subroutine only exists for complex matrices and has no real counterpart.

Source Code

show / hide f90 code
iMPSOps_f90.LeftTransferMatrixMultiply_mps()[source]

fortran-subroutine - Perform T_{L}(E).

Arguments

outvecREAL_OR_COMPLEX(*), out

?

psiTYPE(mps), inout

?

invecREAL_OR_COMPLEX(*), in

?

Source Code

show / hide f90 code
iMPSOps_f90.LeftTransferMatrixMultiply_mpsc()[source]

fortran-subroutine - Perform T_{L}(E).

Arguments

outvecREAL_OR_COMPLEX(*), out

?

psiTYPE(mpsc), inout

?

invecREAL_OR_COMPLEX(*), in

?

Source Code

show / hide f90 code
iMPSOps_f90.GetLambdaR_tensor()[source]

fortran-subroutine - ?? () Given the tensor A of the unit cell in o.c. form, extract \Lambda_R.

Arguments

ATYPE(tensor), inout

the tensor for the orthogonality center

LambdaRTYPE(tensor), out

A dense matrix \Lambda \cdot V were \Lambda is matrix containing the singular values and V the right unitary matrix from the SVD of A_{i1, i2; i3} (i1, i2 build the rows of matrix)

Source Code

show / hide f90 code
iMPSOps_f90.GetLambdaR_tensorc()[source]

fortran-subroutine - ?? () Given the tensor A of the unit cell in o.c. form, extract \Lambda_R.

Arguments

ATYPE(tensorc), inout

the tensor for the orthogonality center

LambdaRTYPE(tensorc), out

A dense matrix \Lambda \cdot V were \Lambda is matrix containing the singular values and V the right unitary matrix from the SVD of A_{i1, i2; i3} (i1, i2 build the rows of matrix)

Source Code

show / hide f90 code
iMPSOps_f90.GetLongLambdaR_mps()[source]

fortran-subroutine - ?? () Extract \Lambda_R, defined as the right boundary term on a completely (!) gauged MPS, so orthogonality center at L+1.

Arguments

psiTYPE(mps), in

Get some singular values of this MPS

LambdaRTYPE(tensor), out

dense matrix of singular values times a unitary matrix as left over from installing a unitary matrix on the last site.

Source Code

show / hide f90 code
iMPSOps_f90.GetLongLambdaR_mpsc()[source]

fortran-subroutine - ?? () Extract \Lambda_R, defined as the right boundary term on a completely (!) gauged MPS, so orthogonality center at L+1.

Arguments

psiTYPE(mpsc), in

Get some singular values of this MPS

LambdaRTYPE(tensorc), out

dense matrix of singular values times a unitary matrix as left over from installing a unitary matrix on the last site.

Source Code

show / hide f90 code
iMPSOps_f90.OrthogonalityFidelity_mps()[source]

fortran-subroutine - ?? () Calculate the orthogonality fidelity :math:``

Arguments

psiTYPE(mps), in

Use psi to calculate orthogonality fidelity to lastlam.

ofREAL, out

on exit the orthogonality fidelity

lastlamTYPE(tensor), in

dense matrix with singular values on the diagonal???

Source Code

show / hide f90 code
iMPSOps_f90.OrthogonalityFidelity_mpsc()[source]

fortran-subroutine - ?? () Calculate the orthogonality fidelity :math:``

Arguments

psiTYPE(mpsc), in

Use psi to calculate orthogonality fidelity to lastlam.

ofREAL, out

on exit the orthogonality fidelity

lastlamTYPE(tensorc), in

dense matrix with singular values on the diagonal???

Source Code

show / hide f90 code
iMPSOps_f90.LongPredict_mps()[source]

fortran-subroutine - ?? ()

Arguments

psiTYPE(mps), inout

??

LambdaTYPE(MATRIX_TYPE), inout

??

Lambdanm1TYPE(MATRIX_TYPE), inout

?? on exit destroyed

Details

The SVD on a diagonal matrix is a remaining part from a version where the Lambdanm1 matrix was not diagonal.

Source Code

show / hide f90 code
iMPSOps_f90.LongPredict_mpsc()[source]

fortran-subroutine - ?? ()

Arguments

psiTYPE(mpsc), inout

??

LambdaTYPE(MATRIX_TYPE), inout

??

Lambdanm1TYPE(MATRIX_TYPE), inout

?? on exit destroyed

Details

The SVD on a diagonal matrix is a remaining part from a version where the Lambdanm1 matrix was not diagonal.

Source Code

show / hide f90 code
iMPSOps_f90.prepare_mps()[source]

fortran-subroutine - ???

Arguments

nextlamTYPE(matrix), inout

filled/overwritten during subroutine. Is a dense matrix containing some Schmidt values of the MPS on the diagonal.

lastlamTYPE(matrix), inout

overwritten during subroutine. Is a dense matrix containing some Schmidt values of the MPS on the diagonal.

Source Code

show / hide f90 code
iMPSOps_f90.prepare_mpsc()[source]

fortran-subroutine - ???

Arguments

nextlamTYPE(matrix), inout

filled/overwritten during subroutine. Is a dense matrix containing some Schmidt values of the MPS on the diagonal.

lastlamTYPE(matrix), inout

overwritten during subroutine. Is a dense matrix containing some Schmidt values of the MPS on the diagonal.

Source Code

show / hide f90 code
iMPSOps_f90.leftorthogonalize_mps()[source]

fortran-subroutine - ?? () Form the left-orthogonalized unit cell

Arguments

psiTYPE(mps), in

MPS to be orthogonalized

psit : TYPE(mps)(*), out

XsTYPE(tensor)(*), in

???

YsTYPE(tensor)(*), in

???

lambdaRinvsTYPE(tensor)(*), in

???

Details

The array of left orthogonalized unit cells for each degenerate eigenvalue is built (degenerate eigenvalue of the transfer matrix). Each MPS is modified in the following way:

A_{\alpha', \beta}^{i_1}
= \sum_{\alpha} X_{\alpha', \alpha} A_{\alpha, \beta}^{i_1}

A_{\alpha, \beta''}^{i_L}
= \sum_{\beta} A_{\alpha, \beta}^{i_L} Y_{\beta, \beta'}
LRinv_{\beta', \beta''}

The resulting MPS is canonized via SVDs.

Source Code

show / hide f90 code
iMPSOps_f90.leftorthogonalize_mpsc()[source]

fortran-subroutine - ?? () Form the left-orthogonalized unit cell

Arguments

psiTYPE(mpsc), in

MPS to be orthogonalized

psit : TYPE(mpsc)(*), out

XsTYPE(tensorc)(*), in

???

YsTYPE(tensorc)(*), in

???

lambdaRinvsTYPE(tensorc)(*), in

???

Details

The array of left orthogonalized unit cells for each degenerate eigenvalue is built (degenerate eigenvalue of the transfer matrix). Each MPS is modified in the following way:

A_{\alpha', \beta}^{i_1}
= \sum_{\alpha} X_{\alpha', \alpha} A_{\alpha, \beta}^{i_1}

A_{\alpha, \beta''}^{i_L}
= \sum_{\beta} A_{\alpha, \beta}^{i_L} Y_{\beta, \beta'}
LRinv_{\beta', \beta''}

The resulting MPS is canonized via SVDs.

Source Code

show / hide f90 code
iMPSOps_f90.InfiniteMPS_mps()[source]

fortran-subroutine - ?? () Use the infinite size algorithm to find the fixed point in the infinite size limit.

Arguments

HTYPE(MPO), inout

containing the Hamiltonian of the system.

qINTEGER, inout

Most probably the length of the unit cell

OperatorsTYPE(matrixList), inout

List of all the operators used in the Hamiltonian and measurements

MyObsTYPE(obs_r), inout

Settings with the observables to be measured

pbcLOGICAL, in

If PBC are used in any rule set. There is a check before, but the debugging mode should ensure for now that there are no calls with such a check.

Details

The infinite MPS algorithm is described in I.P. McCulloch’s paper “Infinite size density renormalization group, revisited”, arXiv0804.2509

Source Code

show / hide f90 code
iMPSOps_f90.InfiniteMPS_mpsc()[source]

fortran-subroutine - ?? () Use the infinite size algorithm to find the fixed point in the infinite size limit.

Arguments

HTYPE(MPO), inout

containing the Hamiltonian of the system.

qINTEGER, inout

Most probably the length of the unit cell

OperatorsTYPE(matrixList), inout

List of all the operators used in the Hamiltonian and measurements

MyObsTYPE(obsc), inout

Settings with the observables to be measured

pbcLOGICAL, in

If PBC are used in any rule set. There is a check before, but the debugging mode should ensure for now that there are no calls with such a check.

Details

The infinite MPS algorithm is described in I.P. McCulloch’s paper “Infinite size density renormalization group, revisited”, arXiv0804.2509

Source Code

show / hide f90 code
iMPSOps_f90.ansatz_left_tensor()[source]

fortran-subroutine - June 2018 (dj, extracted from larger subroutine) Creating an educated guess for one of the new inner sites using McCulloch’s prediction algorithm.

Arguments

PsiTYPE(tensor), inout

On exit, the educated guess.

LamTYPE(tensor), in

Singular values.

PhiTYPE(tensor), in

Existing tensor required to construct initial guess.

Details

The initial guess construct is A-> Lambda[n-1] B[n-1].

Source Code

show / hide f90 code
iMPSOps_f90.ansatz_right_tensor()[source]

fortran-subroutine - June 2018 (dj, extracted from larger subroutine) Creating an educated guess for one of the new inner sites using McCulloch’s prediction algorithm.

Arguments

PsiTYPE(tensor), inout

On exit, the educated guess.

LamTYPE(tensor), in

Singular values.

PhiTYPE(tensor), in

Existing tensor required to construct initial guess.

Details

The initial guess construct is B-> Lambda[n-2]^{-1} A[n-1] Lambda[N-1]

Source Code

show / hide f90 code
iMPSOps_f90.ansatz_left_tensorc()[source]

fortran-subroutine - June 2018 (dj, extracted from larger subroutine) Creating an educated guess for one of the new inner sites using McCulloch’s prediction algorithm.

Arguments

PsiTYPE(tensorc), inout

On exit, the educated guess.

LamTYPE(tensor), in

Singular values.

PhiTYPE(tensorc), in

Existing tensor required to construct initial guess.

Details

The initial guess construct is A-> Lambda[n-1] B[n-1].

Source Code

show / hide f90 code
iMPSOps_f90.ansatz_right_tensorc()[source]

fortran-subroutine - June 2018 (dj, extracted from larger subroutine) Creating an educated guess for one of the new inner sites using McCulloch’s prediction algorithm.

Arguments

PsiTYPE(tensorc), inout

On exit, the educated guess.

LamTYPE(tensor), in

Singular values.

PhiTYPE(tensorc), in

Existing tensor required to construct initial guess.

Details

The initial guess construct is B-> Lambda[n-2]^{-1} A[n-1] Lambda[N-1]

Source Code

show / hide f90 code
iMPSOps_f90.IMPSWithEnvironment_mps()[source]

fortran-subroutine - ?? () Use iMPS to solve a system with a fixed enviroment.

Arguments

psiTYPE(mps), out

on exit MPS

HTYPE(mpo), inout

Hamiltonian

LINTEGER, in

Number of sites in the MPS

maxbondDINTEGER, in

maximal bond dimension for the MPS

LRTYPE(tensorlist), inout

??

Source Code

show / hide f90 code
iMPSOps_f90.IMPSWithEnvironment_mpsc()[source]

fortran-subroutine - ?? () Use iMPS to solve a system with a fixed enviroment.

Arguments

psiTYPE(mpsc), out

on exit MPS

HTYPE(mpoc), inout

Hamiltonian

LINTEGER, in

Number of sites in the MPS

maxbondDINTEGER, in

maximal bond dimension for the MPS

LRTYPE(tensorlistc), inout

??

Source Code

show / hide f90 code
iMPSOps_f90.orthogonalize_mps()[source]

fortran-subroutine - ?? () Find the set of Xs(i) and Ys(i) corresponding to the dominant left (right) eigenvectors of the left-canonical (right-canonical) unit cells.

Arguments

LambdaRsTYPE(matrix)(*), out

??? (normalized)

LambdaRinvsTYPE(matrix)(*), out

unnormalized pseudo-inverse of LambdaRs

errcodeINTEGER, out

possibly error code from ARPACK, otherwise 1000: ndegL and ndegR are not the same after 10 tries (-400): no hermitian orthnormormal set (-300): problem in conversion from complex to real

Details

The following steps are performed 1) MISSING DESCRIPTION 2) MISSING DESCRIPTION 3) Mark all hermitian matrices with VL_i = VL_i^{\dagger} as well VR_i = VR_i^{\dagger}. Assert that these matrices have a positive trace, so: \mathrm{Tr}(VL_i) < 0 \Longrightarrow VL_i = - VL_i 4) Check for all hermitian matrices in an eigenvalue decomposition that they are positive. 5) Trying to fix situation if there is no pair VL_i and VR_i with both hermitian and positive:

MISSING DESCRIPTION

6) Calculate the overlap matrix of the Frobenius norm RO_{ij} = \mathrm{Tr}(VL_i \cdot VR_j) and decompose the matrix in a SVD RO = U_{RO} \Lambda V_{RO}. TO-DO: THIS IS SYMMETRIC DUE TO TRACE, BUT NOT USED IN CODE (sum possible, better not replace SVD with eigenvalue until knowing what happens to negative eigenvalues. 7) Transform to final basis. Assuming all matrices are hermitian positive the i-th final matrix FL_i reads like FL_i = \sum_{j} U_{RO, (j,i)} VL_j and respectively FR_i = \sum_{j} V_{RO, (i,j)} VR_j. 8) Assure that all FL, FR have positive trace and assert this if necessary by multiplying with -1. 9) Convert back to original type, so real or complex. For the real case we take FL_i = REAL(FL_i) if |IM(FL_i)| < 10
\epsilon_{machine}. Analogue for FR_i.

MISSING DESCRIPTION FOR COMPLEX (NOT IMPLEMENTED)

10) Quasi-Cholesky decomposition. For the left side we start with the following step: the eigenvalue decomposition is calculate, such that FL_i = U \lambda U^{\dagger} = U \sqrt{\lambda} \sqrt{\lambda}
U^{\dagger} = X X^{\dagger}. In general the Cholesky deomposition would work in this step as well, but in case close to singularity the eigenvalue decomposition are more stable. The eigenvalue decomposition on FR_i leads to FR_i = Y Y^{\dagger}. Calculate \tilde{\Lambda_{n-1}} = X \Lambda_{n-1} Y. This matrix is inverted via the pseudo-inverse defined over the SVD. (A general matrix A = U \Lambda V has the pseudo-inverse A^{+} = V^{\dagger} \Lambda^{-1} U^{\dagger} where only numerical non-zero singular values are considered.) Finally a normalization is executed \tilde{\Lambda_{n-1}} =
\frac{\tilde{\Lambda_{n-1}}}{\mathrm{Tr}(\tilde{\Lambda_{n-1}}
\tilde{\Lambda_{n-1}}^{T})} WHY IS PSEUDO-INVERSE NOT NORMALIZED?

Source Code

show / hide f90 code
iMPSOps_f90.orthogonalize_mpsc()[source]

fortran-subroutine - ?? () Find the set of Xs(i) and Ys(i) corresponding to the dominant left (right) eigenvectors of the left-canonical (right-canonical) unit cells.

Arguments

LambdaRsTYPE(matrix)(*), out

??? (normalized)

LambdaRinvsTYPE(matrix)(*), out

unnormalized pseudo-inverse of LambdaRs

errcodeINTEGER, out

possibly error code from ARPACK, otherwise 1000: ndegL and ndegR are not the same after 10 tries (-400): no hermitian orthnormormal set (-300): problem in conversion from complex to real

Details

The following steps are performed 1) MISSING DESCRIPTION 2) MISSING DESCRIPTION 3) Mark all hermitian matrices with VL_i = VL_i^{\dagger} as well VR_i = VR_i^{\dagger}. Assert that these matrices have a positive trace, so: \mathrm{Tr}(VL_i) < 0 \Longrightarrow VL_i = - VL_i 4) Check for all hermitian matrices in an eigenvalue decomposition that they are positive. 5) Trying to fix situation if there is no pair VL_i and VR_i with both hermitian and positive:

MISSING DESCRIPTION

6) Calculate the overlap matrix of the Frobenius norm RO_{ij} = \mathrm{Tr}(VL_i \cdot VR_j) and decompose the matrix in a SVD RO = U_{RO} \Lambda V_{RO}. TO-DO: THIS IS SYMMETRIC DUE TO TRACE, BUT NOT USED IN CODE (sum possible, better not replace SVD with eigenvalue until knowing what happens to negative eigenvalues. 7) Transform to final basis. Assuming all matrices are hermitian positive the i-th final matrix FL_i reads like FL_i = \sum_{j} U_{RO, (j,i)} VL_j and respectively FR_i = \sum_{j} V_{RO, (i,j)} VR_j. 8) Assure that all FL, FR have positive trace and assert this if necessary by multiplying with -1. 9) Convert back to original type, so real or complex. For the real case we take FL_i = REAL(FL_i) if |IM(FL_i)| < 10
\epsilon_{machine}. Analogue for FR_i.

MISSING DESCRIPTION FOR COMPLEX (NOT IMPLEMENTED)

10) Quasi-Cholesky decomposition. For the left side we start with the following step: the eigenvalue decomposition is calculate, such that FL_i = U \lambda U^{\dagger} = U \sqrt{\lambda} \sqrt{\lambda}
U^{\dagger} = X X^{\dagger}. In general the Cholesky deomposition would work in this step as well, but in case close to singularity the eigenvalue decomposition are more stable. The eigenvalue decomposition on FR_i leads to FR_i = Y Y^{\dagger}. Calculate \tilde{\Lambda_{n-1}} = X \Lambda_{n-1} Y. This matrix is inverted via the pseudo-inverse defined over the SVD. (A general matrix A = U \Lambda V has the pseudo-inverse A^{+} = V^{\dagger} \Lambda^{-1} U^{\dagger} where only numerical non-zero singular values are considered.) Finally a normalization is executed \tilde{\Lambda_{n-1}} =
\frac{\tilde{\Lambda_{n-1}}}{\mathrm{Tr}(\tilde{\Lambda_{n-1}}
\tilde{\Lambda_{n-1}}^{T})} WHY IS PSEUDO-INVERSE NOT NORMALIZED?

Source Code

show / hide f90 code
iMPSOps_f90.observe_infinite_mps()[source]

fortran-subroutine - June 2018 (dj, updated) Measurements on an infinite MPS

Arguments

errcodeINTEGER, in

error flag from preceeding subroutines. If not equal to zero dummy results are written.

Source Code

show / hide f90 code
iMPSOps_f90.observe_infinite_mpsc()[source]

fortran-subroutine - June 2018 (dj, updated) Measurements on an infinite MPS

Arguments

errcodeINTEGER, in

error flag from preceeding subroutines. If not equal to zero dummy results are written.

Source Code

show / hide f90 code