DecompositionOps

Fortran module DecompositionOps: May 2017 (dj)

Containing decompositions for tensors.

Authors

    1. Jaschke

      1. Wall

Details

The following subroutines / functions are defined in the module as interfaces.

Procedure

qr

rq

split

DecompositionOps_f90.eigsvd_tensor()[source]

fortran-subroutine - November 2016 (dj) Split a tensor into two tensors using a SVD.

Arguments

UtTYPE(tensor), inout

Contains on exit the left unitary tensor unless a multiplication is specified. Intent in to keep dimension etc.

LamTYPE(tensor), inout

Contains on exit the singular values. Intent in to keep dimension etc.

VtTYPE(tensor), inout

Contains on exit the right unitary tensor unless a multiplication is specified. Intent in to keep dimension etc.

TensTYPE(tensor), inout

Contains the tensor to be decomposed. Destroyed on exit.

idxlINTEGER(*), in

Indices of the legs going into the left tensor.

idxrINTEGER(*), in

Indices of the legs going into the right tensor.

multlrINTEGER, OPTIONAL, in

Multiply singular values to the left (< 0) or right (> 0). Default to no multiplication (0), but no valid option for eigsvd.

truncREAL, OPTIONAL, in

Keep infidelity below trunc (infidelity is sum of squared discarded singular values for MPS). Default does not truncate.

ncutINTEGER, OPTIONAL, in

Maximal bond dimension / number of singular values. Default is keeping all singular values.

errREAL, OPTIONAL, out

Sum over the square of the discarded singular value for MPS.

lpermoutINTEGER(*), OPTIONAL, in

Permutation of the left tensor before returning it. Default to no permutation.

rpermoutINTEGER(*), OPTIONAL, in

Permutation of the right tensor before returning it. Default to no permutation.

renormCHARACTER, OPTIONAL, in

Renormalization of the singular values. ‘N’ : do not normalize (default); ‘M’ : normalize for MPS 1 / sqrt(norm);

Source Code

show / hide f90 code
DecompositionOps_f90.eigsvd_tensorc()[source]

fortran-subroutine - November 2016 (dj) Split a tensor into two tensors using a SVD.

Arguments

UtTYPE(tensorc), inout

Contains on exit the left unitary tensor unless a multiplication is specified. Intent in to keep dimension etc.

LamTYPE(tensor), inout

Contains on exit the singular values. Intent in to keep dimension etc.

VtTYPE(tensorc), inout

Contains on exit the right unitary tensor unless a multiplication is specified. Intent in to keep dimension etc.

TensTYPE(tensorc), inout

Contains the tensor to be decomposed. Destroyed on exit.

idxlINTEGER(*), in

Indices of the legs going into the left tensor.

idxrINTEGER(*), in

Indices of the legs going into the right tensor.

multlrINTEGER, OPTIONAL, in

Multiply singular values to the left (< 0) or right (> 0). Default to no multiplication (0), but no valid option for eigsvd.

truncREAL, OPTIONAL, in

Keep infidelity below trunc (infidelity is sum of squared discarded singular values for MPS). Default does not truncate.

ncutINTEGER, OPTIONAL, in

Maximal bond dimension / number of singular values. Default is keeping all singular values.

errREAL, OPTIONAL, out

Sum over the square of the discarded singular value for MPS.

lpermoutINTEGER(*), OPTIONAL, in

Permutation of the left tensor before returning it. Default to no permutation.

rpermoutINTEGER(*), OPTIONAL, in

Permutation of the right tensor before returning it. Default to no permutation.

renormCHARACTER, OPTIONAL, in

Renormalization of the singular values. ‘N’ : do not normalize (default); ‘M’ : normalize for MPS 1 / sqrt(norm);

Source Code

show / hide f90 code
DecompositionOps_f90.get_chi_mps()[source]

fortran-subroutine - May 2017 (dj) Calculate the new bond dimension based on the truncation criteria.

Arguments

LamTYPE(tensor), in

Contains the singular values or singular values squared.

callerCHARACTER, in

Called from eigendecomposition (‘E’). Singular values are squared. Called from singular values decomposition (‘S’).

chiINTEGER, out

On exit the new bond dimension according to the truncation criteria.

truncREAL, OPTIONAL, in

Specifies the allowed truncation in the norm as soft cut-off. Default to zero.

ncutINTEGER, OPTIONAL, in

Specifies the maximal number of singular values as hard cut off.

errREAL, OPTIONAL, out

On exit the truncation error.

renormREAL, OPTIONAL, out

On exit the dot-product of the singular values with themselves, which can be used for renormalizing them.

Source Code

show / hide f90 code
DecompositionOps_f90.permute_split_tensor()[source]

fortran-subroutine - May 2017 (dj) Perform permutation to bring indices in idxl to the left and indices in idxr to the right.

Arguments

TensTYPE(tensor), inout

Permute indices in this tensor.

idxlINTEGER(*), in

Contains indices which are permuted to the front.

idxrINTEGER(*), in

Contains indices which are permuted to the back.

Source Code

show / hide f90 code
DecompositionOps_f90.permute_split_tensorc()[source]

fortran-subroutine - May 2017 (dj) Perform permutation to bring indices in idxl to the left and indices in idxr to the right.

Arguments

TensTYPE(tensorc), inout

Permute indices in this tensor.

idxlINTEGER(*), in

Contains indices which are permuted to the front.

idxrINTEGER(*), in

Contains indices which are permuted to the back.

Source Code

show / hide f90 code
DecompositionOps_f90.qr_tensor()[source]

fortran-subroutine - November 2016 (dj) QR decomposition of a tensor.

Arguments

TensTYPE(tensor), inout

Decompose this tensor in a QR decomposition according to the indices specified. The Q matrix is stored on exit here in tensor form.

RtensTYPE(tensor), inout

R matrix of the QR decomposition in tensor form.

idxlINTEGER(*), in

Indices of the legs going into the left tensor (Q).

idxrINTEGER(*), in

Indices of the legs going into the right tensor (R).

lpermoutINTEGER(*), OPTIONAL, in

Permutation of the left tensor Q before returning it. Default to no permutation.

rpermoutINTEGER(*), OPTIONAL, in

Permutation of the right tensor R before returning it. Default to no permutation.

Source Code

show / hide f90 code
DecompositionOps_f90.qr_tensorc()[source]

fortran-subroutine - November 2016 (dj) QR decomposition of a tensor.

Arguments

TensTYPE(tensorc), inout

Decompose this tensor in a QR decomposition according to the indices specified. The Q matrix is stored on exit here in tensor form.

RtensTYPE(tensorc), inout

R matrix of the QR decomposition in tensor form.

idxlINTEGER(*), in

Indices of the legs going into the left tensor (Q).

idxrINTEGER(*), in

Indices of the legs going into the right tensor (R).

lpermoutINTEGER(*), OPTIONAL, in

Permutation of the left tensor Q before returning it. Default to no permutation.

rpermoutINTEGER(*), OPTIONAL, in

Permutation of the right tensor R before returning it. Default to no permutation.

Source Code

show / hide f90 code
DecompositionOps_f90.qr_qtensor()[source]

fortran-subroutine - May 2017 (dj) QR decomposition of a tensor with symmetries.

Arguments

TensTYPE(qtensor), inout

Decompose this tensor in a QR decomposition according to the indices specified. The Q matrix is stored on exit here in tensor form.

RtensTYPE(qtensor), inout

R matrix of the QR decomposition in tensor form.

idxlINTEGER(*), in

Indices of the legs going into the left tensor (Q).

idxrINTEGER(*), in

Indices of the legs going into the right tensor (R).

lpermoutINTEGER(*), OPTIONAL, in

Permutation of the left tensor Q before returning it. Default to no permutation.

rpermoutINTEGER(*), OPTIONAL, in

Permutation of the right tensor R before returning it. Default to no permutation.

Source Code

show / hide f90 code
DecompositionOps_f90.qr_qtensorc()[source]

fortran-subroutine - May 2017 (dj) QR decomposition of a tensor with symmetries.

Arguments

TensTYPE(qtensorc), inout

Decompose this tensor in a QR decomposition according to the indices specified. The Q matrix is stored on exit here in tensor form.

RtensTYPE(qtensorc), inout

R matrix of the QR decomposition in tensor form.

idxlINTEGER(*), in

Indices of the legs going into the left tensor (Q).

idxrINTEGER(*), in

Indices of the legs going into the right tensor (R).

lpermoutINTEGER(*), OPTIONAL, in

Permutation of the left tensor Q before returning it. Default to no permutation.

rpermoutINTEGER(*), OPTIONAL, in

Permutation of the right tensor R before returning it. Default to no permutation.

Source Code

show / hide f90 code
DecompositionOps_f90.rq_tensor()[source]

fortran-subroutine - November 2016 (dj) RQ decomposition of a tensor.

Arguments

TensTYPE(tensor), inout

Decompose this tensor in a RQ decomposition according to the indices specified. The Q matrix is stored on exit here in tensor form.

RtensTYPE(tensor), inout

R matrix of the RQ decomposition in tensor form.

idxlINTEGER(*), in

Indices of the legs going into the left tensor (R)

idxrINTEGER(*), in

Indices of the legs going into the right tensor (Q).

lpermoutINTEGER(*), OPTIONAL, in

Permutation of the left tensor R before returning it. Default to no permutation.

rpermoutINTEGER(*), OPTIONAL, in

Permutation of the right tensor Q before returning it. Default to no permutation.

Source Code

show / hide f90 code
DecompositionOps_f90.rq_tensorc()[source]

fortran-subroutine - November 2016 (dj) RQ decomposition of a tensor.

Arguments

TensTYPE(tensorc), inout

Decompose this tensor in a RQ decomposition according to the indices specified. The Q matrix is stored on exit here in tensor form.

RtensTYPE(tensorc), inout

R matrix of the RQ decomposition in tensor form.

idxlINTEGER(*), in

Indices of the legs going into the left tensor (R)

idxrINTEGER(*), in

Indices of the legs going into the right tensor (Q).

lpermoutINTEGER(*), OPTIONAL, in

Permutation of the left tensor R before returning it. Default to no permutation.

rpermoutINTEGER(*), OPTIONAL, in

Permutation of the right tensor Q before returning it. Default to no permutation.

Source Code

show / hide f90 code
DecompositionOps_f90.rq_qtensor()[source]

fortran-subroutine - May 2017 (dj) RQ decomposition of a tensor with symmetries.

Arguments

TensTYPE(qtensor), inout

Decompose this tensor in a RQ decomposition according to the indices specified. The Q matrix is stored on exit here in tensor form.

RtensTYPE(qtensor), inout

R matrix of the RQ decomposition in tensor form.

idxlINTEGER(*), in

Indices of the legs going into the left tensor (R)

idxrINTEGER(*), in

Indices of the legs going into the right tensor (Q).

lpermoutINTEGER(*), OPTIONAL, in

Permutation of the left tensor R before returning it. Default to no permutation.

rpermoutINTEGER(*), OPTIONAL, in

Permutation of the right tensor Q before returning it. Default to no permutation.

Source Code

show / hide f90 code
DecompositionOps_f90.rq_qtensorc()[source]

fortran-subroutine - May 2017 (dj) RQ decomposition of a tensor with symmetries.

Arguments

TensTYPE(qtensorc), inout

Decompose this tensor in a RQ decomposition according to the indices specified. The Q matrix is stored on exit here in tensor form.

RtensTYPE(qtensorc), inout

R matrix of the RQ decomposition in tensor form.

idxlINTEGER(*), in

Indices of the legs going into the left tensor (R)

idxrINTEGER(*), in

Indices of the legs going into the right tensor (Q).

lpermoutINTEGER(*), OPTIONAL, in

Permutation of the left tensor R before returning it. Default to no permutation.

rpermoutINTEGER(*), OPTIONAL, in

Permutation of the right tensor Q before returning it. Default to no permutation.

Source Code

show / hide f90 code
DecompositionOps_f90.split_tensor()[source]

fortran-subroutine - November 2016 (dj) Split a tensor into two tensors using a SVD or SVD via eigenvalue decomposition.

Arguments

UtTYPE(tensor), inout

Contains on exit the left unitary tensor unless a multiplication is specified. Intent in to keep dimension etc.

LamTYPE(tensor), inout

Contains on exit the singular values. Intent in to keep dimension etc.

VtTYPE(tensor), inout

Contains on exit the right unitary tensor unless a multiplication is specified. Intent in to keep dimension etc.

TensTYPE(tensor), inout

Contains the tensor to be decomposed. Destroyed on exit.

idxlINTEGER(*), in

Indices of the legs going into the left tensor.

idxrINTEGER(*), in

Indices of the legs going into the right tensor.

multlrINTEGER, OPTIONAL, in

Multiply singular values to the left (< 0) or right (> 0). Default to no multiplication (0).

truncREAL, OPTIONAL, in

Keep infidelity below trunc (infidelity is sum of squared discarded singular values for MPS). Default does not truncate.

ncutINTEGER, OPTIONAL, in

Maximal bond dimension / number of singular values. Default is keeping all singular values.

errREAL, OPTIONAL, out

Sum over the square of the discarded singular value for MPS.

lpermoutINTEGER(*), OPTIONAL, in

Permutation of the left tensor before returning it. Default to no permutation.

rpermoutINTEGER(*), OPTIONAL, in

Permutation of the right tensor before returning it. Default to no permutation.

renormCHARACTER, OPTIONAL, in

Renormalization of the singular values. ‘N’ : do not normalize (default); ‘M’ : normalize for MPS 1 / sqrt(norm);

methodCHARACTER, OPTIONAL, in

Choose method: ‘Y’ GESDD method; ‘N’ use GESVD; ‘E’ eigsvd. If not specified, …

Source Code

show / hide f90 code
DecompositionOps_f90.split_tensorc()[source]

fortran-subroutine - November 2016 (dj) Split a tensor into two tensors using a SVD or SVD via eigenvalue decomposition.

Arguments

UtTYPE(tensorc), inout

Contains on exit the left unitary tensor unless a multiplication is specified. Intent in to keep dimension etc.

LamTYPE(tensor), inout

Contains on exit the singular values. Intent in to keep dimension etc.

VtTYPE(tensorc), inout

Contains on exit the right unitary tensor unless a multiplication is specified. Intent in to keep dimension etc.

TensTYPE(tensorc), inout

Contains the tensor to be decomposed. Destroyed on exit.

idxlINTEGER(*), in

Indices of the legs going into the left tensor.

idxrINTEGER(*), in

Indices of the legs going into the right tensor.

multlrINTEGER, OPTIONAL, in

Multiply singular values to the left (< 0) or right (> 0). Default to no multiplication (0).

truncREAL, OPTIONAL, in

Keep infidelity below trunc (infidelity is sum of squared discarded singular values for MPS). Default does not truncate.

ncutINTEGER, OPTIONAL, in

Maximal bond dimension / number of singular values. Default is keeping all singular values.

errREAL, OPTIONAL, out

Sum over the square of the discarded singular value for MPS.

lpermoutINTEGER(*), OPTIONAL, in

Permutation of the left tensor before returning it. Default to no permutation.

rpermoutINTEGER(*), OPTIONAL, in

Permutation of the right tensor before returning it. Default to no permutation.

renormCHARACTER, OPTIONAL, in

Renormalization of the singular values. ‘N’ : do not normalize (default); ‘M’ : normalize for MPS 1 / sqrt(norm);

methodCHARACTER, OPTIONAL, in

Choose method: ‘Y’ GESDD method; ‘N’ use GESVD; ‘E’ eigsvd. If not specified, …

Source Code

show / hide f90 code
DecompositionOps_f90.svd_tensor()[source]

fortran-subroutine - November 2016 (dj) Split a tensor into two tensors using a SVD.

Arguments

UtTYPE(tensor), inout

Contains on exit the left unitary tensor unless a multiplication is specified. Intent in to keep dimension etc.

LamTYPE(tensor), inout

Contains on exit the singular values. Intent in to keep dimension etc.

VtTYPE(tensor), inout

Contains on exit the right unitary tensor unless a multiplication is specified. Intent in to keep dimension etc.

TensTYPE(tensor), inout

Contains the tensor to be decomposed. Destroyed on exit.

idxlINTEGER(*), in

Indices of the legs going into the left tensor.

idxrINTEGER(*), in

Indices of the legs going into the right tensor.

multlrINTEGER, OPTIONAL, in

Multiply singular values to the left (< 0) or right (> 0). Default to no multiplication (0).

truncREAL, OPTIONAL, in

Keep infidelity below trunc (infidelity is sum of squared discarded singular values for MPS). Default does not truncate.

ncutINTEGER, OPTIONAL, in

Maximal bond dimension / number of singular values. Default is keeping all singular values.

errREAL, OPTIONAL, out

Sum over the square of the discarded singular value for MPS.

lpermoutINTEGER(*), OPTIONAL, in

Permutation of the left tensor before returning it. Default to no permutation.

rpermoutINTEGER(*), OPTIONAL, in

Permutation of the right tensor before returning it. Default to no permutation.

renormCHARACTER, OPTIONAL, in

Renormalization of the singular values. ‘N’ : do not normalize (default); ‘M’ : normalize for MPS 1 / sqrt(norm);

gesddCHARACTER, OPTIONAL, in

Choose SVD method, ‘Y’ use GESDD method (default); ‘N’ use GESVD

Source Code

show / hide f90 code
DecompositionOps_f90.svd_tensorc()[source]

fortran-subroutine - November 2016 (dj) Split a tensor into two tensors using a SVD.

Arguments

UtTYPE(tensorc), inout

Contains on exit the left unitary tensor unless a multiplication is specified. Intent in to keep dimension etc.

LamTYPE(tensor), inout

Contains on exit the singular values. Intent in to keep dimension etc.

VtTYPE(tensorc), inout

Contains on exit the right unitary tensor unless a multiplication is specified. Intent in to keep dimension etc.

TensTYPE(tensorc), inout

Contains the tensor to be decomposed. Destroyed on exit.

idxlINTEGER(*), in

Indices of the legs going into the left tensor.

idxrINTEGER(*), in

Indices of the legs going into the right tensor.

multlrINTEGER, OPTIONAL, in

Multiply singular values to the left (< 0) or right (> 0). Default to no multiplication (0).

truncREAL, OPTIONAL, in

Keep infidelity below trunc (infidelity is sum of squared discarded singular values for MPS). Default does not truncate.

ncutINTEGER, OPTIONAL, in

Maximal bond dimension / number of singular values. Default is keeping all singular values.

errREAL, OPTIONAL, out

Sum over the square of the discarded singular value for MPS.

lpermoutINTEGER(*), OPTIONAL, in

Permutation of the left tensor before returning it. Default to no permutation.

rpermoutINTEGER(*), OPTIONAL, in

Permutation of the right tensor before returning it. Default to no permutation.

renormCHARACTER, OPTIONAL, in

Renormalization of the singular values. ‘N’ : do not normalize (default); ‘M’ : normalize for MPS 1 / sqrt(norm);

gesddCHARACTER, OPTIONAL, in

Choose SVD method, ‘Y’ use GESDD method (default); ‘N’ use GESVD

Source Code

show / hide f90 code