qTensors¶
Fortran module qTensors: June 2017 (dj)
Containing basic operations for symmetric tensors as allocation, reading writing.
Authors
Jaschke
Wall
Details
The following subroutines / functions are defined for the symmetric tensors.
procedure |
include.f90 |
mpi.f90 |
omp.f90 |
---|---|---|---|
addproject |
X |
||
block |
X |
||
block_subhash |
X |
||
block2tensor_left |
X |
||
block2tensor_right |
X |
||
block2tensor_center |
X |
||
block2tensor_both |
X |
||
conj |
X |
||
copy |
X |
||
create |
X |
||
dagger |
X |
||
destroy |
X |
||
dot |
X |
||
extend |
X |
||
gaxpy |
X |
||
get_3rddim |
TBA |
||
get_contr_idx |
X |
||
get_hash |
X |
||
get_hash_ii |
X |
||
get_sum_idx |
??? |
||
increase_capacity |
X |
||
is_set |
X |
||
kron |
X |
||
maxlineardim |
X |
||
maxvalue |
X |
||
norm |
X |
||
permute_qnumbers |
X |
||
perturb |
X |
||
omp_addproject |
TBA |
||
omp_conj |
X |
||
omp_dagger |
TBA |
||
omp_dot |
X |
||
omp_gaxpy |
TBA |
||
omp_norm |
X |
||
omp_project |
TBA |
||
omp_randomize |
??? |
||
omp_scale |
X |
||
omp_transposed |
TBA |
||
par_recv |
X |
||
par_send |
X |
||
X |
|||
project |
X |
||
randomize |
X |
||
rank |
X |
||
read |
X |
||
scale |
X |
||
set_hash |
X |
||
size |
X |
||
skim |
X |
||
sort |
X |
||
trace |
X |
||
transposed |
X |
||
write |
X |
- qTensors_f90.sumq()[source]¶
fortran-function - April 2016 (updated dj) Group element addition for the corresponding symmetry. Return type is INTEGER(*) = q1 + q2
Arguments
- q1INTEGER(*), in
charge number on links
- q2INTEGER(*), in
charge number on links
- nqsINTEGER(2), in
Number of U(1) and Z2 symmetries.
Details
For U(1) symmetry, the group element is ordinary addition applied to the first nqns quantum numbers. For the quantum numbers (nqns+1) to (nqns+npns) the group element addition is addition modulo 2 (Z2-symmetry). (Template defined in qTensors_template.f90)
Source Code
show / hide f90 code
- qTensors_f90.prime_hash()[source]¶
fortran-function - ?? () Hash function for multiple quantum numbers using the square root of primes hashing function. The return value is a real/double precision.
Arguments
- qINTEGER(*), in
Array of size nqs * dim, where nqs is the number of conserved quantum numbers and dim is the number of dimension of the underlying tensor.
- indicesINTEGER(*), in
Selecting the indices of the tensor to be hashed. From each index all quantum numbers are considered. Example: hash(A%data(i)%q,(/1/)) hashes the tensor A_{lpha eta}^{i}} according to its first dimension.
- nqsINTEGER(2), in
Saves number of U(1) and Z(2) symmetries.
Details
(Template defined in qTensors_template.f90)
Source Code
show / hide f90 code
- qTensors_f90.SetupPrimeRoots()[source]¶
fortran-subroutine - ?? (mlw) Compute the square roots of the first N primes and store in global vector primes. This initializes the square root of primes hash function. The routine uses a simple sieve to check the current prime against all others previously computed.
Arguments
- nnINTEGER, in
Find first nn prime numbers and setup their roots.
Details
(Template defined in qTensors_template.f90)
Source Code
show / hide f90 code
- qTensors_f90.cleanup_qtensors()[source]¶
fortran-subroutine - March 2016 (dj) Deallocate the vector with prime numbers.
Details
(Template defined in qTensors_template.f90)
Source Code
show / hide f90 code
- qTensors_f90.AddProject_qtensor()[source]¶
fortran-subroutine - March 2016 (updated dj) Apply the projector P to A and add to B, where P is defined as .
Arguments
- BbTYPE(qtensor), inout
Add projection of A to this tensor.
- AaTYPE(qtensor), in
Get projection of this tensor and add to Bb
- PsiProjsTYPE(qtensor)(*), inout
Array of tensors defining the projector.
Details
Used in orthogonalizing an MPS against another set of MPSs. (template defined in qTensors_include.f90)
Source Code
show / hide f90 code
- qTensors_f90.AddProject_qtensorc()[source]¶
fortran-subroutine - March 2016 (updated dj) Apply the projector P to A and add to B, where P is defined as .
Arguments
- BbTYPE(qtensorc), inout
Add projection of A to this tensor.
- AaTYPE(qtensorc), in
Get projection of this tensor and add to Bb
- PsiProjsTYPE(qtensorc)(*), inout
Array of tensors defining the projector.
Details
Used in orthogonalizing an MPS against another set of MPSs. (template defined in qTensors_include.f90)
Source Code
show / hide f90 code
- qTensors_f90.add_dummylink_qtensor()[source]¶
fortran-subroutine - October 2017 (dj) Add a dummy link to a tensor. By default quantum numbers 0.
Arguments
- QtTYPE(qtensor), inout
Add a dummy link of dimenions one to the tensor.
- idxINTEGER, in
Position of the dummy link in the modified tensor.
Source Code
show / hide f90 code
- qTensors_f90.add_dummylink_qtensorc()[source]¶
fortran-subroutine - October 2017 (dj) Add a dummy link to a tensor. By default quantum numbers 0.
Arguments
- QtTYPE(qtensorc), inout
Add a dummy link of dimenions one to the tensor.
- idxINTEGER, in
Position of the dummy link in the modified tensor.
Source Code
show / hide f90 code
- qTensors_f90.block_qtensor()[source]¶
fortran-subroutine - April 2017 (dj, based on mlw) Build the blocks for a bipartition of links prior to a decomposition.
Arguments
- Tenstype(qtensor), inout
This tensor should be decomposed. Might be changed on exit, e.g. due to permutations.
- idxlINTEGER(*), in
Contains the indices of the links going to the rows.
- idxrINTEGER(*), in
Contains the indices of the links going to the columns.
- MatsTYPE(tensorlist), inout
Contains the matrices to be decomposed back into tensors. Deallocated on exit.
- nuniqueINTEGER, out
On exit the number of unique blocks corresponding to the number of matrices in Mats.
- LmapTYPE(VECTOR_INT)(*), inout
Map for finding a representative of each irrep for the rows to retrieve the quantum numbers. Allocated during this suboutine.
- RmapTYPE(VECTOR_INT)(*), inout
Map for finding a representative of each irrep for the columns to retrieve the quantum numbers. Allocated during this subroutine.
- RowcutTYPE(VECTOR_INT)(*), inout
Contains the first and last index of rows for each irreps. Allocated during this subroutine.
- ColcutTYPE(VECTOR_INT)(*), inout
Contains the first and last index of columns for each irreps. Allocated during this subroutine.
- nts_rowINTEGER(*), inout
Contains the number of irreps in each block for the rows. Allocated during this subroutine.
- nts_colINTEGER(*), inout
Contains the number of irreps in each block for the columns. Allocated during this subroutine.
- idxhashINTEGER(*), in
Sorting the hashes for the splitting. Allocated during this subroutine.
- hamLOGICAL, in
If present (independent of value), the hash is build based on all links on the left and respectively right side. This allows us to split 2-site Hamiltonians.
Source Code
show / hide f90 code
- qTensors_f90.block_qtensorc()[source]¶
fortran-subroutine - April 2017 (dj, based on mlw) Build the blocks for a bipartition of links prior to a decomposition.
Arguments
- Tenstype(qtensorc), inout
This tensor should be decomposed. Might be changed on exit, e.g. due to permutations.
- idxlINTEGER(*), in
Contains the indices of the links going to the rows.
- idxrINTEGER(*), in
Contains the indices of the links going to the columns.
- MatsTYPE(tensorlistc), inout
Contains the matrices to be decomposed back into tensors. Deallocated on exit.
- nuniqueINTEGER, out
On exit the number of unique blocks corresponding to the number of matrices in Mats.
- LmapTYPE(VECTOR_INT)(*), inout
Map for finding a representative of each irrep for the rows to retrieve the quantum numbers. Allocated during this suboutine.
- RmapTYPE(VECTOR_INT)(*), inout
Map for finding a representative of each irrep for the columns to retrieve the quantum numbers. Allocated during this subroutine.
- RowcutTYPE(VECTOR_INT)(*), inout
Contains the first and last index of rows for each irreps. Allocated during this subroutine.
- ColcutTYPE(VECTOR_INT)(*), inout
Contains the first and last index of columns for each irreps. Allocated during this subroutine.
- nts_rowINTEGER(*), inout
Contains the number of irreps in each block for the rows. Allocated during this subroutine.
- nts_colINTEGER(*), inout
Contains the number of irreps in each block for the columns. Allocated during this subroutine.
- idxhashINTEGER(*), in
Sorting the hashes for the splitting. Allocated during this subroutine.
- hamLOGICAL, in
If present (independent of value), the hash is build based on all links on the left and respectively right side. This allows us to split 2-site Hamiltonians.
Source Code
show / hide f90 code
- qTensors_f90.block_subhash_qtensor()[source]¶
fortran-subroutine - April 2017 (dj) Build the subhash of all tensors with the same quantum number on the link of the splitting.
Arguments
- TensTYPE(qtensor), in
This tensor should be decomposed.
- strideINTEGER, in
Used to identify the offset after sorting the complete hash.
- ntINTEGER, in
Number of tensors in this subblock to be sorted.
- idxINTEGER(*), in
Contains the link(s) to be hashed for the subblock.
- nlINTEGER, in
Number of indices building the left bipartitions for splitting the tensor.
- idxhashINTEGER(*), in
Sorting the hashes for the splitting. Allocated during this subroutine.
- nuniqueiiINTEGER, out
Number of unique hashes in the subblock.
- dimINTEGER, out
The dimension of a subblock is the number of rows (left bipartition) or number of columns (right bipartition).
- cutiiINTEGER(*), inout
Contains the first and last entry of each irrep, where the ii-th irrep is in cutii(ii) + 1:cutii(ii + 1). Allocated during this subroutine.
- mapINTEGER(*), inout
Contains one representative (example) of each irrep to retrieve the quantum numbers at the end. Allocated during this subroutine.
- bmapINTEGER(*), inout
Returns the block when inputting the index. Allocated during this subroutine.
Source Code
show / hide f90 code
- qTensors_f90.block_subhash_qtensorc()[source]¶
fortran-subroutine - April 2017 (dj) Build the subhash of all tensors with the same quantum number on the link of the splitting.
Arguments
- TensTYPE(qtensorc), in
This tensor should be decomposed.
- strideINTEGER, in
Used to identify the offset after sorting the complete hash.
- ntINTEGER, in
Number of tensors in this subblock to be sorted.
- idxINTEGER(*), in
Contains the link(s) to be hashed for the subblock.
- nlINTEGER, in
Number of indices building the left bipartitions for splitting the tensor.
- idxhashINTEGER(*), in
Sorting the hashes for the splitting. Allocated during this subroutine.
- nuniqueiiINTEGER, out
Number of unique hashes in the subblock.
- dimINTEGER, out
The dimension of a subblock is the number of rows (left bipartition) or number of columns (right bipartition).
- cutiiINTEGER(*), inout
Contains the first and last entry of each irrep, where the ii-th irrep is in cutii(ii) + 1:cutii(ii + 1). Allocated during this subroutine.
- mapINTEGER(*), inout
Contains one representative (example) of each irrep to retrieve the quantum numbers at the end. Allocated during this subroutine.
- bmapINTEGER(*), inout
Returns the block when inputting the index. Allocated during this subroutine.
Source Code
show / hide f90 code
- qTensors_f90.block2tensor_left_qtensor()[source]¶
fortran-subroutine - April 2017 (dj, based on mlw) Rewrite the matrices of a decomposition again as tensor.
Arguments
- LtensTYPE(qtensor), inout
The decomposed tensor is stored here.
- TensTYPE(qtensor), in
The original tensor which was decomposed. It is required to track the quantum numbers.
- MatsTYPE(tensorlist), inout
Contains the matrices to be decomposed back into tensors. Deallocated on exit.
- nlINTEGER, in
Number of indices encoded in the rows.
- nuniqueINTEGER, in
Number of unique blocks corresponding to the number of matrices in Mats.
- chiINTEGER, in
Total bond dimension for last index.
- LmapTYPE(VECTOR_INT)(*), inout
Map for finding a representative of each irrep to retrieve the quantum numbers. Deallocate on exit.
- RowcutTYPE(VECTOR_INT)(*), inout
Contains the first and last index of rows for each irreps. Deallocated on exit.
- nts_rowINTEGER(*), inout
Contains the number of irreps in each block. Deallocated on exit.
- idxhashINTEGER(*), in
Sorting the hashes for the splitting.
- lamblkINTEGER(*), OPTIONAL, in
Contains the block for the singular value at the i-th position.
- lamindINTEGER(*), OPTIONAL, in
Contains the indices to sort the array of singular values.
- callerCHARACTER, OPTIONAL, in
‘S’ for singular value decomposition and ‘E’ for eigenvalue decomposition. The first has descending values, the latter ascending information. So when truncation is used, this flag determines which eigenvectors belong to the truncated values.
Details
(template defined in qTensors_include.f90)
Source Code
show / hide f90 code
- qTensors_f90.block2tensor_left_qtensorc()[source]¶
fortran-subroutine - April 2017 (dj, based on mlw) Rewrite the matrices of a decomposition again as tensor.
Arguments
- LtensTYPE(qtensorc), inout
The decomposed tensor is stored here.
- TensTYPE(qtensorc), in
The original tensor which was decomposed. It is required to track the quantum numbers.
- MatsTYPE(tensorlistc), inout
Contains the matrices to be decomposed back into tensors. Deallocated on exit.
- nlINTEGER, in
Number of indices encoded in the rows.
- nuniqueINTEGER, in
Number of unique blocks corresponding to the number of matrices in Mats.
- chiINTEGER, in
Total bond dimension for last index.
- LmapTYPE(VECTOR_INT)(*), inout
Map for finding a representative of each irrep to retrieve the quantum numbers. Deallocate on exit.
- RowcutTYPE(VECTOR_INT)(*), inout
Contains the first and last index of rows for each irreps. Deallocated on exit.
- nts_rowINTEGER(*), inout
Contains the number of irreps in each block. Deallocated on exit.
- idxhashINTEGER(*), in
Sorting the hashes for the splitting.
- lamblkINTEGER(*), OPTIONAL, in
Contains the block for the singular value at the i-th position.
- lamindINTEGER(*), OPTIONAL, in
Contains the indices to sort the array of singular values.
- callerCHARACTER, OPTIONAL, in
‘S’ for singular value decomposition and ‘E’ for eigenvalue decomposition. The first has descending values, the latter ascending information. So when truncation is used, this flag determines which eigenvectors belong to the truncated values.
Details
(template defined in qTensors_include.f90)
Source Code
show / hide f90 code
- qTensors_f90.block2tensor_right_qtensor()[source]¶
fortran-subroutine - April 2017 (dj, based on mlw) Rewrite the matrices of a decomposition again as tensor.
Arguments
- RtensTYPE(qtensor), inout
The decomposed tensor is stored here.
- TensTYPE(qtensor), in
The original tensor which was decomposed. It is required to track the quantum numbers.
- MatsTYPE(tensorlist), inout
Contains the matrices to be decomposed back into tensors. Deallocated on exit.
- nlINTEGER, in
Number of indices encoded in the rows.
- nrINTEGER, in
Number of indices encoded in the columns.
- nuniqueINTEGER, in
Number of unique blocks corresponding to the number of matrices in Mats.
- chiINTEGER, in
Total bond dimension for last index.
- RmapTYPE(VECTOR_INT)(*), inout
Map for finding a representative of each irrep to retrieve the quantum numbers. Deallocate on exit.
- ColcutTYPE(VECTOR_INT)(*), inout
Contains the first and last index of columns for each irreps. Deallocated on exit.
- nts_colINTEGER(*), inout
Contains the number of irreps in each block. Deallocated on exit.
- idxhashINTEGER(*), in
Sorting the hashes for the splitting.
- lamblkINTEGER(*), OPTIONAL, in
Contains the block for the singular value at the i-th position.
- lamindINTEGER(*), OPTIONAL, in
Contains the indices to sort the array of singular values.
- callerCHARACTER, OPTIONAL, in
‘S’ for singular value decomposition and ‘E’ for eigenvalue decomposition. The first has descending values, the latter ascending information. So when truncation is used, this flag determines which eigenvectors belong to the truncated values.
Details
(template defined in qTensors_include.f90)
Source Code
show / hide f90 code
- qTensors_f90.block2tensor_right_qtensorc()[source]¶
fortran-subroutine - April 2017 (dj, based on mlw) Rewrite the matrices of a decomposition again as tensor.
Arguments
- RtensTYPE(qtensorc), inout
The decomposed tensor is stored here.
- TensTYPE(qtensorc), in
The original tensor which was decomposed. It is required to track the quantum numbers.
- MatsTYPE(tensorlistc), inout
Contains the matrices to be decomposed back into tensors. Deallocated on exit.
- nlINTEGER, in
Number of indices encoded in the rows.
- nrINTEGER, in
Number of indices encoded in the columns.
- nuniqueINTEGER, in
Number of unique blocks corresponding to the number of matrices in Mats.
- chiINTEGER, in
Total bond dimension for last index.
- RmapTYPE(VECTOR_INT)(*), inout
Map for finding a representative of each irrep to retrieve the quantum numbers. Deallocate on exit.
- ColcutTYPE(VECTOR_INT)(*), inout
Contains the first and last index of columns for each irreps. Deallocated on exit.
- nts_colINTEGER(*), inout
Contains the number of irreps in each block. Deallocated on exit.
- idxhashINTEGER(*), in
Sorting the hashes for the splitting.
- lamblkINTEGER(*), OPTIONAL, in
Contains the block for the singular value at the i-th position.
- lamindINTEGER(*), OPTIONAL, in
Contains the indices to sort the array of singular values.
- callerCHARACTER, OPTIONAL, in
‘S’ for singular value decomposition and ‘E’ for eigenvalue decomposition. The first has descending values, the latter ascending information. So when truncation is used, this flag determines which eigenvectors belong to the truncated values.
Details
(template defined in qTensors_include.f90)
Source Code
show / hide f90 code
- qTensors_f90.block2tensor_center_qtensor()[source]¶
fortran-subroutine - April 2017 (dj) Rewrite the matrices of the singular values again as a tensor.
Arguments
- LambdaTYPE(qtensor), inout
The singular values between the decomposed tensors (or other possible weights).
- TensTYPE(qtensor), in
The original tensor which was decomposed. It is required to track the quantum numbers.
- LamTYPE(tensorlist), inout
Contains the vectors for singular values to be stored with their quantum numbers.
- nlINTEGER, in
Number of indices encoded in the rows.
- nuniqueINTEGER, in
Number of unique blocks corresponding to the number of matrices in Mats.
- chiINTEGER, in
Total bond dimension for last index.
- RmapTYPE(VECTOR_INT)(*), inout
Map for finding a representative of each irrep to retrieve the quantum numbers.
- nts_colINTEGER(*), inout
Contains the number of irreps in each block.
- idxhashINTEGER(*), in
Sorting the hashes for the splitting.
- lamblkINTEGER(*), in
Contains the block for the singular value at the i-th position.
- lamindINTEGER(*), in
Contains the indices to sort the array of singular values.
- callerCHARACTER, in
For values from eigenvalue decomposition, use ‘E’. The square root is taken. Values are ascending. In contrast, for the singular value decomposition, use ‘S’. The values are copied and are sorting in ascending order.
Source Code
show / hide f90 code
- qTensors_f90.block2tensor_center_qtensorc()[source]¶
fortran-subroutine - April 2017 (dj) Rewrite the matrices of the singular values again as a tensor.
Arguments
- LambdaTYPE(qtensor), inout
The singular values between the decomposed tensors (or other possible weights).
- TensTYPE(qtensorc), in
The original tensor which was decomposed. It is required to track the quantum numbers.
- LamTYPE(tensorlist), inout
Contains the vectors for singular values to be stored with their quantum numbers.
- nlINTEGER, in
Number of indices encoded in the rows.
- nuniqueINTEGER, in
Number of unique blocks corresponding to the number of matrices in Mats.
- chiINTEGER, in
Total bond dimension for last index.
- RmapTYPE(VECTOR_INT)(*), inout
Map for finding a representative of each irrep to retrieve the quantum numbers.
- nts_colINTEGER(*), inout
Contains the number of irreps in each block.
- idxhashINTEGER(*), in
Sorting the hashes for the splitting.
- lamblkINTEGER(*), in
Contains the block for the singular value at the i-th position.
- lamindINTEGER(*), in
Contains the indices to sort the array of singular values.
- callerCHARACTER, in
For values from eigenvalue decomposition, use ‘E’. The square root is taken. Values are ascending. In contrast, for the singular value decomposition, use ‘S’. The values are copied and are sorting in ascending order.
Source Code
show / hide f90 code
- qTensors_f90.block2tensor_both_qtensor()[source]¶
fortran-subroutine - April 2017 (dj) Rewrite the matrices of a decomposition again into the original tensor. This subroutine is useful for evaluating matrix functions.
Arguments
- TensTYPE(qtensor), inout
The original tensor which was decomposed. It will be overwritten.
- MatsTYPE(tensorlist), inout
Contains the matrices to be decomposed back into tensors. Deallocated on exit.
- MatsTYPE(tensorlist), inout
Contains the matrices to be decomposed back into tensors. Deallocated on exit.
- LmapTYPE(VECTOR_INT)(*), inout
Map for finding a representative of each irrep to retrieve the quantum numbers of a row. Deallocate on exit.
- RmapTYPE(VECTOR_INT)(*), inout
Map for finding a representative of each irrep to retrieve the quantum numbers of a column. Deallocate on exit.
- RowcutTYPE(VECTOR_INT)(*), inout
Contains the first and last index of rows for each irreps. Deallocated on exit.
- ColcutTYPE(VECTOR_INT)(*), inout
Contains the first and last index of columns for each irreps. Deallocated on exit.
- nts_rowINTEGER(*), inout
Contains the number of irreps in each block for the rows. Deallocated on exit.
- nts_colINTEGER(*), inout
Contains the number of irreps in each block for the columns. Deallocated on exit.
- idxhashINTEGER(*), in
Sorting the hashes for the splitting.
- nuniqueINTEGER, in
Number of unique blocks corresponding to the number of matrices in Mats.
- nlINTEGER, in
Number of links in the left block.
Source Code
show / hide f90 code
- qTensors_f90.block2tensor_both_qtensorc()[source]¶
fortran-subroutine - April 2017 (dj) Rewrite the matrices of a decomposition again into the original tensor. This subroutine is useful for evaluating matrix functions.
Arguments
- TensTYPE(qtensorc), inout
The original tensor which was decomposed. It will be overwritten.
- MatsTYPE(tensorlistc), inout
Contains the matrices to be decomposed back into tensors. Deallocated on exit.
- MatsTYPE(tensorlistc), inout
Contains the matrices to be decomposed back into tensors. Deallocated on exit.
- LmapTYPE(VECTOR_INT)(*), inout
Map for finding a representative of each irrep to retrieve the quantum numbers of a row. Deallocate on exit.
- RmapTYPE(VECTOR_INT)(*), inout
Map for finding a representative of each irrep to retrieve the quantum numbers of a column. Deallocate on exit.
- RowcutTYPE(VECTOR_INT)(*), inout
Contains the first and last index of rows for each irreps. Deallocated on exit.
- ColcutTYPE(VECTOR_INT)(*), inout
Contains the first and last index of columns for each irreps. Deallocated on exit.
- nts_rowINTEGER(*), inout
Contains the number of irreps in each block for the rows. Deallocated on exit.
- nts_colINTEGER(*), inout
Contains the number of irreps in each block for the columns. Deallocated on exit.
- idxhashINTEGER(*), in
Sorting the hashes for the splitting.
- nuniqueINTEGER, in
Number of unique blocks corresponding to the number of matrices in Mats.
- nlINTEGER, in
Number of links in the left block.
Source Code
show / hide f90 code
- qTensors_f90.check_qnum_tensdim_qtensor()[source]¶
fortran-subroutine - August 2018 (dj) Check for entries with same quantum number, but different tensor dimension.
Arguments
- TensTYPE(qtensor), in
Tensor to be checked.
Source Code
show / hide f90 code
- qTensors_f90.check_qnum_tensdim_qtensorc()[source]¶
fortran-subroutine - August 2018 (dj) Check for entries with same quantum number, but different tensor dimension.
Arguments
- TensTYPE(qtensorc), in
Tensor to be checked.
Source Code
show / hide f90 code
- qTensors_f90.conj_qtensor()[source]¶
fortran-subroutine - October 2016 (dj) Complex-conjugated elements in the tensor.
Arguments
- TensTYPE(qtensor), inout
Take the complex conjugate of each element
Source Code
show / hide f90 code
- qTensors_f90.conj_qtensorc()[source]¶
fortran-subroutine - October 2016 (dj) Complex-conjugated elements in the tensor.
Arguments
- TensTYPE(qtensorc), inout
Take the complex conjugate of each element
Source Code
show / hide f90 code
- qTensors_f90.copy_qtensor_qtensor()[source]¶
fortran-subroutine - January 2016 (update dj) Copy a qtensor. details (template defined in qTensors_include.f90)
Arguments
- ObjoutTYPE(VECTOR_TYPE), out
Store copy of Objin in this vector.
- ObjinTYPE(VECTOR_TYPE), in
Copy this vector to a new vector Objout.
- scalarreal, OPTIONAL, in
Multiply input tensor with scalar during copying replacing a copy + scale action.
- transCHARACTER, OPTIONAL, in
The following transformation can be applied: complex conjugate (‘C’), transposition (‘T’, simple transposition, no permutation), conjugate transposed (‘H’, simple transposition). No transformation is ‘N’. Default to ‘N’.
Source Code
show / hide f90 code
- qTensors_f90.copy_qtensorc_qtensor()[source]¶
fortran-subroutine - January 2016 (update dj) Copy a qtensor. details (template defined in qTensors_include.f90)
Arguments
- ObjoutTYPE(VECTOR_TYPE), out
Store copy of Objin in this vector.
- ObjinTYPE(VECTOR_TYPE), in
Copy this vector to a new vector Objout.
- scalarcomplex, OPTIONAL, in
Multiply input tensor with scalar during copying replacing a copy + scale action.
- transCHARACTER, OPTIONAL, in
The following transformation can be applied: complex conjugate (‘C’), transposition (‘T’, simple transposition, no permutation), conjugate transposed (‘H’, simple transposition). No transformation is ‘N’. Default to ‘N’.
Source Code
show / hide f90 code
- qTensors_f90.copy_qtensorc_qtensorc()[source]¶
fortran-subroutine - January 2016 (update dj) Copy a qtensorc. details (template defined in qTensors_include.f90)
Arguments
- ObjoutTYPE(VECTOR_TYPE), out
Store copy of Objin in this vector.
- ObjinTYPE(VECTOR_TYPE), in
Copy this vector to a new vector Objout.
- scalarcomplex, OPTIONAL, in
Multiply input tensor with scalar during copying replacing a copy + scale action.
- transCHARACTER, OPTIONAL, in
The following transformation can be applied: complex conjugate (‘C’), transposition (‘T’, simple transposition, no permutation), conjugate transposed (‘H’, simple transposition). No transformation is ‘N’. Default to ‘N’.
Source Code
show / hide f90 code
- qTensors_f90.copy_qtensorlist()[source]¶
fortran-subroutine - ?? () Copy a qtensor list.
Arguments
- ObjoutTYPE(qtensorlist), out
Copy the entries of Objin here.
- ObjinTYPE(qtensorlist), in
source for copy into Dest.
Source Code
show / hide f90 code
- qTensors_f90.copy_qtensorclist()[source]¶
fortran-subroutine - ?? () Copy a qtensorc list.
Arguments
- ObjoutTYPE(qtensorclist), out
Copy the entries of Objin here.
- ObjinTYPE(qtensorclist), in
source for copy into Dest.
Source Code
show / hide f90 code
- qTensors_f90.copy_qtensorlistarray()[source]¶
fortran-subroutine - ?? () Copy an array of qtensor lists.
Arguments
- ObjoutTYPE(qtensorlist)(*), out
Copy the entries of Objin here.
- ObjinTYPE(qtensorlist)(*), in
source for copy into Objout
Source Code
show / hide f90 code
- qTensors_f90.copy_qtensorclistarray()[source]¶
fortran-subroutine - ?? () Copy an array of qtensorc lists.
Arguments
- ObjoutTYPE(qtensorclist)(*), out
Copy the entries of Objin here.
- ObjinTYPE(qtensorclist)(*), in
source for copy into Objout
Source Code
show / hide f90 code
- qTensors_f90.create_qtensor()[source]¶
fortran-subroutine - ?? (mlw) Create an empty qtensor with capacity “capacity”. details (template defined in qTensors_include.f90)
Arguments
- QtTYPE(qtensor), out
Allocate the array to store the tensors for each set of quantum numbers.
- nqsINTEGER(2), in
NUmber of conserved quantum numbers on each link.
- capacityINTEGER, OPTIONAL, in
Estimation of the maximal number of sets of quantum numbers. Will be extended when needed.
Source Code
show / hide f90 code
- qTensors_f90.create_qtensorc()[source]¶
fortran-subroutine - ?? (mlw) Create an empty qtensorc with capacity “capacity”. details (template defined in qTensors_include.f90)
Arguments
- QtTYPE(qtensorc), out
Allocate the array to store the tensors for each set of quantum numbers.
- nqsINTEGER(2), in
NUmber of conserved quantum numbers on each link.
- capacityINTEGER, OPTIONAL, in
Estimation of the maximal number of sets of quantum numbers. Will be extended when needed.
Source Code
show / hide f90 code
- qTensors_f90.create_qtensorlist()[source]¶
fortran-subroutine - January 2016 (update dj) Create a qtensor list of length d1.
Arguments
- MatsTYPE(qtensorlist), inout
Allocate an array of size d1.
- d1INTEGER, in
Length of the matrix list to be allocated.
Source Code
show / hide f90 code
- qTensors_f90.create_qtensorclist()[source]¶
fortran-subroutine - January 2016 (update dj) Create a qtensorc list of length d1.
Arguments
- MatsTYPE(qtensorclist), inout
Allocate an array of size d1.
- d1INTEGER, in
Length of the matrix list to be allocated.
Source Code
show / hide f90 code
- qTensors_f90.create_id_qtensor()[source]¶
fortran-subroutine - March 2016 (updated dj) Create an identity matrix (or delta function). details (template defined in qTensors_include_matrix.f90)
Arguments
- QmTYPE(qtensor), out
Create and identity matrix of dimension dim x dim.
- QtTYPE(qtensor), inout
Needed to extract dimension for identity matrix.
- sideINTEGER, in
Either 1 or 3 depending if identity matrix should be created as LeftDelta (1, first index) or RightDelta (3, last/third index).
Source Code
show / hide f90 code
- qTensors_f90.create_id_qtensorc()[source]¶
fortran-subroutine - March 2016 (updated dj) Create an identity matrix (or delta function). details (template defined in qTensors_include_matrix.f90)
Arguments
- QmTYPE(qtensorc), out
Create and identity matrix of dimension dim x dim.
- QtTYPE(qtensorc), inout
Needed to extract dimension for identity matrix.
- sideINTEGER, in
Either 1 or 3 depending if identity matrix should be created as LeftDelta (1, first index) or RightDelta (3, last/third index).
Source Code
show / hide f90 code
- qTensors_f90.dagger_qtensor()[source]¶
fortran-subroutine - October 2016 (dj) Taking complex conjugate followed by transposition of indices or permutation.
Arguments
- TensQTYPE(TENSOR_TYPE), inout
Save a transposition/permutation on the indices of this tensor. Complex conjugated values are taken during this subroutine.
- permINTEGER(*), OPTIONAL, in
permutation array has length equal to the rank of the tensor with unique entries 1 to rank. Default to rank, rank - 1, …, 2, 1 (transpose)
Details
For details of permutation look into Tensors.f90:transpose_qtensor (template defined in Tensors_include.f90)
Source Code
show / hide f90 code
- qTensors_f90.dagger_qtensorc()[source]¶
fortran-subroutine - October 2016 (dj) Taking complex conjugate followed by transposition of indices or permutation.
Arguments
- TensQTYPE(TENSOR_TYPE), inout
Save a transposition/permutation on the indices of this tensor. Complex conjugated values are taken during this subroutine.
- permINTEGER(*), OPTIONAL, in
permutation array has length equal to the rank of the tensor with unique entries 1 to rank. Default to rank, rank - 1, …, 2, 1 (transpose)
Details
For details of permutation look into Tensors.f90:transpose_qtensorc (template defined in Tensors_include.f90)
Source Code
show / hide f90 code
- qTensors_f90.destroy_qtensor()[source]¶
fortran-subroutine - January 2016 (update dj) Destroy the contents of the vector and then the vector itself using the
destroy(.)
method of the data itself. details (template defined in qTensors_include.f90)Arguments
- QtTYPE(qtensor) , inout
Deallocate all blocks and the arrays of the qtensor.
Source Code
show / hide f90 code
- qTensors_f90.destroy_qtensorc()[source]¶
fortran-subroutine - January 2016 (update dj) Destroy the contents of the vector and then the vector itself using the
destroy(.)
method of the data itself. details (template defined in qTensors_include.f90)Arguments
- QtTYPE(qtensorc) , inout
Deallocate all blocks and the arrays of the qtensorc.
Source Code
show / hide f90 code
- qTensors_f90.destroy_qtensorlist()[source]¶
fortran-subroutine - January 2016 (update dj) Destroy a list of qtensor.
Arguments
- MatsTYPE(qtensorlist) , inout
Deallocate the array of matrixs (including each matrix).
Source Code
show / hide f90 code
- qTensors_f90.destroy_qtensorclist()[source]¶
fortran-subroutine - January 2016 (update dj) Destroy a list of qtensorc.
Arguments
- MatsTYPE(qtensorclist) , inout
Deallocate the array of matrixs (including each matrix).
Source Code
show / hide f90 code
- qTensors_f90.dot_qtensor()[source]¶
fortran-function - March 2016 (update dj) Compute dot product <A, B> for qtensor. details (template defined in qTensors_include.f90)
Arguments
- QtaTYPE(qtensor), inout
First vector in the dot product (taken with complex conjugated values for complex arrays).
- QtbTYPE(qtensor), inout
Second vector in the dot product. Has to be the same size as first vector.
Source Code
show / hide f90 code
- qTensors_f90.dot_qtensorc()[source]¶
fortran-function - March 2016 (update dj) Compute dot product <A, B> for qtensorc. details (template defined in qTensors_include.f90)
Arguments
- QtaTYPE(qtensorc), inout
First vector in the dot product (taken with complex conjugated values for complex arrays).
- QtbTYPE(qtensorc), inout
Second vector in the dot product. Has to be the same size as first vector.
Source Code
show / hide f90 code
- qTensors_f90.expm_qtensor_real_qtensor()[source]¶
fortran-subroutine - ?? (dj) Take the exponential of a tensor assuming an underlying matrix.
Arguments
- TexpTYPE(qtensor), out
This is on exit the exponetial. Has rank and dimensions of the input tensor.
- screal, in
Additional scalar inside exp-function.
- TensTYPE(qtensor), inout
Take the exponential of this tensor.
- last_row_idxINTEGER, in
The dimension for the rows are calculated as product(Tens%dl(:last_row_idx)). The remaining indices build the column.
Details
All diagonal blocks of the identity must be set, either with values or as dummy zero block. Blocks of zeros will be an identity after epx, but blocks not present will be still zero.
Source Code
show / hide f90 code
- qTensors_f90.expm_qtensorc_real_qtensor()[source]¶
fortran-subroutine - ?? (dj) Take the exponential of a tensor assuming an underlying matrix.
Arguments
- TexpTYPE(qtensorc), out
This is on exit the exponetial. Has rank and dimensions of the input tensor.
- screal, in
Additional scalar inside exp-function.
- TensTYPE(qtensor), inout
Take the exponential of this tensor.
- last_row_idxINTEGER, in
The dimension for the rows are calculated as product(Tens%dl(:last_row_idx)). The remaining indices build the column.
Details
All diagonal blocks of the identity must be set, either with values or as dummy zero block. Blocks of zeros will be an identity after epx, but blocks not present will be still zero.
Source Code
show / hide f90 code
- qTensors_f90.expm_qtensorc_complex_qtensor()[source]¶
fortran-subroutine - ?? (dj) Take the exponential of a tensor assuming an underlying matrix.
Arguments
- TexpTYPE(qtensorc), out
This is on exit the exponetial. Has rank and dimensions of the input tensor.
- sccomplex, in
Additional scalar inside exp-function.
- TensTYPE(qtensor), inout
Take the exponential of this tensor.
- last_row_idxINTEGER, in
The dimension for the rows are calculated as product(Tens%dl(:last_row_idx)). The remaining indices build the column.
Details
All diagonal blocks of the identity must be set, either with values or as dummy zero block. Blocks of zeros will be an identity after epx, but blocks not present will be still zero.
Source Code
show / hide f90 code
- qTensors_f90.expm_qtensorc_real_qtensorc()[source]¶
fortran-subroutine - ?? (dj) Take the exponential of a tensor assuming an underlying matrix.
Arguments
- TexpTYPE(qtensorc), out
This is on exit the exponetial. Has rank and dimensions of the input tensor.
- screal, in
Additional scalar inside exp-function.
- TensTYPE(qtensorc), inout
Take the exponential of this tensor.
- last_row_idxINTEGER, in
The dimension for the rows are calculated as product(Tens%dl(:last_row_idx)). The remaining indices build the column.
Details
All diagonal blocks of the identity must be set, either with values or as dummy zero block. Blocks of zeros will be an identity after epx, but blocks not present will be still zero.
Source Code
show / hide f90 code
- qTensors_f90.expm_qtensorc_complex_qtensorc()[source]¶
fortran-subroutine - ?? (dj) Take the exponential of a tensor assuming an underlying matrix.
Arguments
- TexpTYPE(qtensorc), out
This is on exit the exponetial. Has rank and dimensions of the input tensor.
- sccomplex, in
Additional scalar inside exp-function.
- TensTYPE(qtensorc), inout
Take the exponential of this tensor.
- last_row_idxINTEGER, in
The dimension for the rows are calculated as product(Tens%dl(:last_row_idx)). The remaining indices build the column.
Details
All diagonal blocks of the identity must be set, either with values or as dummy zero block. Blocks of zeros will be an identity after epx, but blocks not present will be still zero.
Source Code
show / hide f90 code
- qTensors_f90.expmh_real_qtensor()[source]¶
fortran-subroutine - ?? (dj) Take the exponential of a tensor assuming an underlying hermitian matrix.
Arguments
- TexpTYPE(qtensor), out
This is on exit the exponetial. Has rank and dimensions of the input tensor.
- screal, in
Additional scalar inside exp-function.
- TensTYPE(qtensor), inout
Take the exponential of this tensor.
- last_row_idxINTEGER, in
The dimension for the rows are calculated as product(Tens%dl(:last_row_idx)). The remaining indices build the column.
Details
Subroutines does not check if matrix is actually hermitian. All diagonal blocks of the identity must be set, either with values or as dummy zero block. Blocks of zeros will be an identity after epxh, but blocks not present will be still zero.
Source Code
show / hide f90 code
- qTensors_f90.expmh_complex_qtensor()[source]¶
fortran-subroutine - ?? (dj) Take the exponential of a tensor assuming an underlying hermitian matrix.
Arguments
- TexpTYPE(qtensorc), out
This is on exit the exponetial. Has rank and dimensions of the input tensor.
- sccomplex, in
Additional scalar inside exp-function.
- TensTYPE(qtensor), inout
Take the exponential of this tensor.
- last_row_idxINTEGER, in
The dimension for the rows are calculated as product(Tens%dl(:last_row_idx)). The remaining indices build the column.
Details
Subroutines does not check if matrix is actually hermitian. All diagonal blocks of the identity must be set, either with values or as dummy zero block. Blocks of zeros will be an identity after epxh, but blocks not present will be still zero.
Source Code
show / hide f90 code
- qTensors_f90.expmh_real_qtensorc()[source]¶
fortran-subroutine - ?? (dj) Take the exponential of a tensor assuming an underlying hermitian matrix.
Arguments
- TexpTYPE(qtensorc), out
This is on exit the exponetial. Has rank and dimensions of the input tensor.
- screal, in
Additional scalar inside exp-function.
- TensTYPE(qtensorc), inout
Take the exponential of this tensor.
- last_row_idxINTEGER, in
The dimension for the rows are calculated as product(Tens%dl(:last_row_idx)). The remaining indices build the column.
Details
Subroutines does not check if matrix is actually hermitian. All diagonal blocks of the identity must be set, either with values or as dummy zero block. Blocks of zeros will be an identity after epxh, but blocks not present will be still zero.
Source Code
show / hide f90 code
- qTensors_f90.expmh_complex_qtensorc()[source]¶
fortran-subroutine - ?? (dj) Take the exponential of a tensor assuming an underlying hermitian matrix.
Arguments
- TexpTYPE(qtensorc), out
This is on exit the exponetial. Has rank and dimensions of the input tensor.
- sccomplex, in
Additional scalar inside exp-function.
- TensTYPE(qtensorc), inout
Take the exponential of this tensor.
- last_row_idxINTEGER, in
The dimension for the rows are calculated as product(Tens%dl(:last_row_idx)). The remaining indices build the column.
Details
Subroutines does not check if matrix is actually hermitian. All diagonal blocks of the identity must be set, either with values or as dummy zero block. Blocks of zeros will be an identity after epxh, but blocks not present will be still zero.
Source Code
show / hide f90 code
- qTensors_f90.extend_qtensor()[source]¶
fortran-subroutine - October 2016 (dj) Extend space for n new elements. If the required space is less than capacity, nothing happens. Otherwise, increase the capacity. details (template defined in qTensors_include.f90)
Arguments
- QtTYPE(qtensor), inout
qTensor which should be checked for its capacity.
- nnINTEGER, in
Number of new elements to be stored in the qTensor.
Source Code
show / hide f90 code
- qTensors_f90.extend_qtensorc()[source]¶
fortran-subroutine - October 2016 (dj) Extend space for n new elements. If the required space is less than capacity, nothing happens. Otherwise, increase the capacity. details (template defined in qTensors_include.f90)
Arguments
- QtTYPE(qtensorc), inout
qTensor which should be checked for its capacity.
- nnINTEGER, in
Number of new elements to be stored in the qTensor.
Source Code
show / hide f90 code
- qTensors_f90.fuse_all_qtensor()[source]¶
fortran-subroutine - October 2017 (dj) Fuse equally sized subsets of links containing in total all links in the tensor.
Arguments
- QtTYPE(qtensor), inout
Fuse links in this tensor.
- idxINTEGER(*, *), in
Each column is merged together. ii-th column is ii-th new index.
- methodCHARACTER, in
‘U’ : update nqs flag (do on last fuse) ‘N’ : leave nqs flag as is ‘A’ : just add quantum numbers (not reversible, nqs left unchanged)
Source Code
show / hide f90 code
- qTensors_f90.fuse_all_qtensorc()[source]¶
fortran-subroutine - October 2017 (dj) Fuse equally sized subsets of links containing in total all links in the tensor.
Arguments
- QtTYPE(qtensorc), inout
Fuse links in this tensor.
- idxINTEGER(*, *), in
Each column is merged together. ii-th column is ii-th new index.
- methodCHARACTER, in
‘U’ : update nqs flag (do on last fuse) ‘N’ : leave nqs flag as is ‘A’ : just add quantum numbers (not reversible, nqs left unchanged)
Source Code
show / hide f90 code
- qTensors_f90.gaxpy_qtensor_real_qtensor()[source]¶
fortran-subroutine - ?? (mlw) Y = Y + a * X for REAL_OR_COMPLEX a details (template defined in qTensors_include.f90)
Arguments
- YyTYPE(qtensor), inout
On entry, qtensor. On exit, other qtensor times scalar added to this qtensor. (No duplicates allowed for hashing quantum numbers.)
- scREAL_OR_COMPLEX, in
Scalar multiplied with X.
- XxTYPE(TENSOR_TYPE), inout
qtensor added to tensor Y. Is scaled with constant sc. (No duplicates allowed for hashing quantum numbers.)
Source Code
show / hide f90 code
- qTensors_f90.gaxpy_qtensorc_complex_qtensorc()[source]¶
fortran-subroutine - ?? (mlw) Y = Y + a * X for REAL_OR_COMPLEX a details (template defined in qTensors_include.f90)
Arguments
- YyTYPE(qtensorc), inout
On entry, qtensorc. On exit, other qtensorc times scalar added to this qtensorc. (No duplicates allowed for hashing quantum numbers.)
- scREAL_OR_COMPLEX, in
Scalar multiplied with X.
- XxTYPE(TENSOR_TYPE), inout
qtensorc added to tensor Y. Is scaled with constant sc. (No duplicates allowed for hashing quantum numbers.)
Source Code
show / hide f90 code
- qTensors_f90.gaxpy_qtensorc_real_qtensor()[source]¶
fortran-subroutine - ?? (mlw) Y = Y + a * X for REAL_OR_COMPLEX a details (template defined in qTensors_include.f90)
Arguments
- YyTYPE(qtensor), inout
On entry, qtensor. On exit, other qtensor times scalar added to this qtensor. (No duplicates allowed for hashing quantum numbers.)
- scREAL_OR_COMPLEX, in
Scalar multiplied with X.
- XxTYPE(TENSOR_TYPE), inout
qtensor added to tensor Y. Is scaled with constant sc. (No duplicates allowed for hashing quantum numbers.)
Source Code
show / hide f90 code
- qTensors_f90.gaxpy_qtensorc_complex_qtensor()[source]¶
fortran-subroutine - ?? (mlw) Y = Y + a * X for REAL_OR_COMPLEX a details (template defined in qTensors_include.f90)
Arguments
- YyTYPE(qtensor), inout
On entry, qtensor. On exit, other qtensor times scalar added to this qtensor. (No duplicates allowed for hashing quantum numbers.)
- scREAL_OR_COMPLEX, in
Scalar multiplied with X.
- XxTYPE(TENSOR_TYPE), inout
qtensor added to tensor Y. Is scaled with constant sc. (No duplicates allowed for hashing quantum numbers.)
Source Code
show / hide f90 code
- qTensors_f90.gaxpy_qtensorc_real_qtensorc()[source]¶
fortran-subroutine - ?? (mlw) Y = Y + a * X for REAL_OR_COMPLEX a details (template defined in qTensors_include.f90)
Arguments
- YyTYPE(qtensorc), inout
On entry, qtensorc. On exit, other qtensorc times scalar added to this qtensorc. (No duplicates allowed for hashing quantum numbers.)
- scREAL_OR_COMPLEX, in
Scalar multiplied with X.
- XxTYPE(TENSOR_TYPE), inout
qtensorc added to tensor Y. Is scaled with constant sc. (No duplicates allowed for hashing quantum numbers.)
Source Code
show / hide f90 code
- qTensors_f90.get_3rddim_qtensor()[source]¶
fortran-function - September 2014 (dj) Get the maximal bond dimension (integer) of a q-tensor. details (template defined in qTensors_include.f90)
Arguments
- QtensTYPE(qtensor), in
Get the maximal dimension of the 3rd leg. Explanation how to do this with q-tensor should go here ….
Source Code
show / hide f90 code
- qTensors_f90.get_3rddim_qtensorc()[source]¶
fortran-function - September 2014 (dj) Get the maximal bond dimension (integer) of a q-tensor. details (template defined in qTensors_include.f90)
Arguments
- QtensTYPE(qtensorc), in
Get the maximal dimension of the 3rd leg. Explanation how to do this with q-tensor should go here ….
Source Code
show / hide f90 code
- qTensors_f90.get_contr_idx_qtensor_qtensor()[source]¶
fortran-subroutine - October 2016 (dj) Find the indices of the tensors in the array to be contracted with each other.
Arguments
- QtaTYPE(qtensor), in
First tensor for contraction.
- idxaINTEGER(*), in
The following legs in Qta should be contracted over.
- QtbTYPE(qtensor), in
Second tensor for contraction.
- idxbINTEGER(*), in
The following legs in Qtb should be contracted over.
- degLOGICAL(2), in
If deg(1) = .true., hashes in Qta may be degenerate and a degenerate sorting is applied. If deg(1) .false., hashes in Qta must be unique in regard to the contraction inidces idxa. Analog definition for deg(2) and Qtb.
- cidxINTEGER(2, *), out
Storing the index of the tensors in the array of tensors to be contracted together. Second dimension should be at least the minumum of Qta%nb and Qtb%nb.
- niuniqueINTEGER, out
Number of unique matches found. To execute contraction, loop to cidx(:, degout(niunique + 1)).
- degoutINTEGER(*), out
Allocated on exit and filled with the degenerate subsets for the contractions. degout(ii) + 1 : degout(ii + 1) have the same final quantum number.
- qqqINTEGER(*, *), OPTIONAL, inout
If present, it is allocated on exit and filled with the quantum numbers remaining after the contraction. do_degout must be true if qqq are calculated. By default, the quantum numbers are not stored.
- do_degoutLOGICAL, in
If .true., the hashes of the new tensor are sorted. If false, the quantum numbers and hashes are not calculated for the output tensor. Default to .true.
Details
Disregarding the degeneracies, it is the best approach to sort the smaller array and then look for corresponding hashes of the bigger array in the smaller array. With the size of the smaller array and the size of the bigger array, it scales as . Sorting both arrays and then looking for matches scales approximately with . For degeneracies, it might depend on the number of unique hashes, which is not predictable beforehand.
Source Code
show / hide f90 code
- qTensors_f90.get_contr_idx_qtensorc_qtensorc()[source]¶
fortran-subroutine - October 2016 (dj) Find the indices of the tensors in the array to be contracted with each other.
Arguments
- QtaTYPE(qtensorc), in
First tensor for contraction.
- idxaINTEGER(*), in
The following legs in Qta should be contracted over.
- QtbTYPE(qtensorc), in
Second tensor for contraction.
- idxbINTEGER(*), in
The following legs in Qtb should be contracted over.
- degLOGICAL(2), in
If deg(1) = .true., hashes in Qta may be degenerate and a degenerate sorting is applied. If deg(1) .false., hashes in Qta must be unique in regard to the contraction inidces idxa. Analog definition for deg(2) and Qtb.
- cidxINTEGER(2, *), out
Storing the index of the tensors in the array of tensors to be contracted together. Second dimension should be at least the minumum of Qta%nb and Qtb%nb.
- niuniqueINTEGER, out
Number of unique matches found. To execute contraction, loop to cidx(:, degout(niunique + 1)).
- degoutINTEGER(*), out
Allocated on exit and filled with the degenerate subsets for the contractions. degout(ii) + 1 : degout(ii + 1) have the same final quantum number.
- qqqINTEGER(*, *), OPTIONAL, inout
If present, it is allocated on exit and filled with the quantum numbers remaining after the contraction. do_degout must be true if qqq are calculated. By default, the quantum numbers are not stored.
- do_degoutLOGICAL, in
If .true., the hashes of the new tensor are sorted. If false, the quantum numbers and hashes are not calculated for the output tensor. Default to .true.
Details
Disregarding the degeneracies, it is the best approach to sort the smaller array and then look for corresponding hashes of the bigger array in the smaller array. With the size of the smaller array and the size of the bigger array, it scales as . Sorting both arrays and then looking for matches scales approximately with . For degeneracies, it might depend on the number of unique hashes, which is not predictable beforehand.
Source Code
show / hide f90 code
- qTensors_f90.get_contr_idx_qtensorc_qtensor()[source]¶
fortran-subroutine - October 2016 (dj) Find the indices of the tensors in the array to be contracted with each other.
Arguments
- QtaTYPE(qtensorc), in
First tensor for contraction.
- idxaINTEGER(*), in
The following legs in Qta should be contracted over.
- QtbTYPE(qtensor), in
Second tensor for contraction.
- idxbINTEGER(*), in
The following legs in Qtb should be contracted over.
- degLOGICAL(2), in
If deg(1) = .true., hashes in Qta may be degenerate and a degenerate sorting is applied. If deg(1) .false., hashes in Qta must be unique in regard to the contraction inidces idxa. Analog definition for deg(2) and Qtb.
- cidxINTEGER(2, *), out
Storing the index of the tensors in the array of tensors to be contracted together. Second dimension should be at least the minumum of Qta%nb and Qtb%nb.
- niuniqueINTEGER, out
Number of unique matches found. To execute contraction, loop to cidx(:, degout(niunique + 1)).
- degoutINTEGER(*), out
Allocated on exit and filled with the degenerate subsets for the contractions. degout(ii) + 1 : degout(ii + 1) have the same final quantum number.
- qqqINTEGER(*, *), OPTIONAL, inout
If present, it is allocated on exit and filled with the quantum numbers remaining after the contraction. do_degout must be true if qqq are calculated. By default, the quantum numbers are not stored.
- do_degoutLOGICAL, in
If .true., the hashes of the new tensor are sorted. If false, the quantum numbers and hashes are not calculated for the output tensor. Default to .true.
Details
Disregarding the degeneracies, it is the best approach to sort the smaller array and then look for corresponding hashes of the bigger array in the smaller array. With the size of the smaller array and the size of the bigger array, it scales as . Sorting both arrays and then looking for matches scales approximately with . For degeneracies, it might depend on the number of unique hashes, which is not predictable beforehand.
Source Code
show / hide f90 code
- qTensors_f90.get_contr_idx_qtensor_qtensorc()[source]¶
fortran-subroutine - October 2016 (dj) Find the indices of the tensors in the array to be contracted with each other.
Arguments
- QtaTYPE(qtensor), in
First tensor for contraction.
- idxaINTEGER(*), in
The following legs in Qta should be contracted over.
- QtbTYPE(qtensorc), in
Second tensor for contraction.
- idxbINTEGER(*), in
The following legs in Qtb should be contracted over.
- degLOGICAL(2), in
If deg(1) = .true., hashes in Qta may be degenerate and a degenerate sorting is applied. If deg(1) .false., hashes in Qta must be unique in regard to the contraction inidces idxa. Analog definition for deg(2) and Qtb.
- cidxINTEGER(2, *), out
Storing the index of the tensors in the array of tensors to be contracted together. Second dimension should be at least the minumum of Qta%nb and Qtb%nb.
- niuniqueINTEGER, out
Number of unique matches found. To execute contraction, loop to cidx(:, degout(niunique + 1)).
- degoutINTEGER(*), out
Allocated on exit and filled with the degenerate subsets for the contractions. degout(ii) + 1 : degout(ii + 1) have the same final quantum number.
- qqqINTEGER(*, *), OPTIONAL, inout
If present, it is allocated on exit and filled with the quantum numbers remaining after the contraction. do_degout must be true if qqq are calculated. By default, the quantum numbers are not stored.
- do_degoutLOGICAL, in
If .true., the hashes of the new tensor are sorted. If false, the quantum numbers and hashes are not calculated for the output tensor. Default to .true.
Details
Disregarding the degeneracies, it is the best approach to sort the smaller array and then look for corresponding hashes of the bigger array in the smaller array. With the size of the smaller array and the size of the bigger array, it scales as . Sorting both arrays and then looking for matches scales approximately with . For degeneracies, it might depend on the number of unique hashes, which is not predictable beforehand.
Source Code
show / hide f90 code
- qTensors_f90.get_hash_qtensor()[source]¶
fortran-function - October 2016 (dj) Get the hashes of specified indices of a qtensor.
Arguments
- QtensTYPE(qtensor), inout
The values of the hashes are set according to the new indices.
- idxsINTEGER(*), in
Specify indices to be hashed in regard to the legs of the tensor.
- iiINTEGER, OPTIONAL, in
Specify index in terms of array of tensors for generating new hash. If not present, all tensors are set again.
Source Code
show / hide f90 code
- qTensors_f90.get_hash_qtensorc()[source]¶
fortran-function - October 2016 (dj) Get the hashes of specified indices of a qtensorc.
Arguments
- QtensTYPE(qtensorc), inout
The values of the hashes are set according to the new indices.
- idxsINTEGER(*), in
Specify indices to be hashed in regard to the legs of the tensor.
- iiINTEGER, OPTIONAL, in
Specify index in terms of array of tensors for generating new hash. If not present, all tensors are set again.
Source Code
show / hide f90 code
- qTensors_f90.get_hash_ii_qtensor()[source]¶
fortran-function - October 2016 (dj) Get the hash of specified indices of a qtensor.
Arguments
- QtensTYPE(qtensor), inout
The values of the hashes are set according to the new indices.
- idxsINTEGER(*), in
Specify indices to be hashed in regard to the legs of the tensor.
- iiINTEGER, in
Specify index in terms of array of tensors for generating new hash.
Source Code
show / hide f90 code
- qTensors_f90.get_hash_ii_qtensorc()[source]¶
fortran-function - October 2016 (dj) Get the hash of specified indices of a qtensorc.
Arguments
- QtensTYPE(qtensorc), inout
The values of the hashes are set according to the new indices.
- idxsINTEGER(*), in
Specify indices to be hashed in regard to the legs of the tensor.
- iiINTEGER, in
Specify index in terms of array of tensors for generating new hash.
Source Code
show / hide f90 code
- qTensors_f90.get_scalar_qtensor()[source]¶
fortran-function - July 2017 (dj) Get the scalar if the tensor represents a rank-0 tensor.
Arguments
- QtensTYPE(qtensor), in
Return the scalar entry of a rank-0 tensor.
Source Code
show / hide f90 code
- qTensors_f90.get_scalar_qtensorc()[source]¶
fortran-function - July 2017 (dj) Get the scalar if the tensor represents a rank-0 tensor.
Arguments
- QtensTYPE(qtensorc), in
Return the scalar entry of a rank-0 tensor.
Source Code
show / hide f90 code
- qTensors_f90.get_sum_idx_qtensor()[source]¶
fortran-subroutine - Calculate which tensors have the same hash for selected indices.
Arguments
Source Code
show / hide f90 code
- qTensors_f90.get_sum_idx_qtensorc()[source]¶
fortran-subroutine - Arguments Calculate which tensors have the same hash for selected indices.
Source Code
show / hide f90 code
- qTensors_f90.has_nan_qtensor()[source]¶
fortran-function - October 2017 (dj)
Arguments Check if the tensor has NAN in the actual arrays.
- TensTYPE(TENSOR_TYPE), in
Check NAN on the entries of its subtensors. Check does not apply to rank, dimensions, quantum numbers, etc.
Source Code
show / hide f90 code
- qTensors_f90.has_nan_qtensorc()[source]¶
fortran-function - October 2017 (dj) Check if the tensor has NAN in the actual arrays.
Arguments
- TensTYPE(TENSOR_TYPE), in
Check NAN on the entries of its subtensors. Check does not apply to rank, dimensions, quantum numbers, etc.
Source Code
show / hide f90 code
- qTensors_f90.Increase_Capacity_qtensor()[source]¶
fortran-subroutine - ?? () Increase the capacity of the vector, if required. Uses an exponential growth rate for amortized constant time expansion. details (template defined in qTensors_include.f90)
Arguments
- QtTYPE(qtensor), inout
Increase the number of possible blocks stored in this tensor V.
- capacityINTEGER, in
Maximum of capacity and growth rate times the old capacity is taken as new capacity.
Source Code
show / hide f90 code
- qTensors_f90.Increase_Capacity_qtensorc()[source]¶
fortran-subroutine - ?? () Increase the capacity of the vector, if required. Uses an exponential growth rate for amortized constant time expansion. details (template defined in qTensors_include.f90)
Arguments
- QtTYPE(qtensorc), inout
Increase the number of possible blocks stored in this tensor V.
- capacityINTEGER, in
Maximum of capacity and growth rate times the old capacity is taken as new capacity.
Source Code
show / hide f90 code
- qTensors_f90.is_eye_qtensor()[source]¶
fortran-function - August 2017 (dj) Check if the tensor is an identity.
Arguments
- TensTYPE(TENSOR_TYPE), in
This tensor is checked if it is an identity.
Details
We define the identity for any rank as a tensor where the quantum numbers are equal on each link. For each subtensor, the subtensor has ones for i_1 = i_2 = … = i_n, and otherwise zeros.
Source Code
show / hide f90 code
- qTensors_f90.is_eye_qtensorc()[source]¶
fortran-function - August 2017 (dj) Check if the tensor is an identity.
Arguments
- TensTYPE(TENSOR_TYPE), in
This tensor is checked if it is an identity.
Details
We define the identity for any rank as a tensor where the quantum numbers are equal on each link. For each subtensor, the subtensor has ones for i_1 = i_2 = … = i_n, and otherwise zeros.
Source Code
show / hide f90 code
- qTensors_f90.is_set_qtensor()[source]¶
fortran-function - August 2017 (dj) Check if a qtensor is in use.
Arguments
- QtTYPE(qtensor), in
Check if the qtensor was used, i.e. a call to create. A qtensor with zero blocks is used and will return true.
Source Code
show / hide f90 code
- qTensors_f90.is_set_qtensorc()[source]¶
fortran-function - August 2017 (dj) Check if a qtensor is in use.
Arguments
- QtTYPE(qtensorc), in
Check if the qtensor was used, i.e. a call to create. A qtensor with zero blocks is used and will return true.
Source Code
show / hide f90 code
- qTensors_f90.kron_qtensor_qtensor()[source]¶
fortran-subroutine -
Details
For qtensor, the restriction is to rank-2 tensors and no transformations.
Source Code
show / hide f90 code
- qTensors_f90.kron_qtensorc_qtensorc()[source]¶
fortran-subroutine -
Details
For qtensorc, the restriction is to rank-2 tensors and no transformations.
Source Code
show / hide f90 code
- qTensors_f90.kron_qtensorc_qtensor()[source]¶
fortran-subroutine -
Details
For qtensor, the restriction is to rank-2 tensors and no transformations.
Source Code
show / hide f90 code
- qTensors_f90.maxlineardim_qtensor()[source]¶
fortran-function - June 2017 (updated dj)
Arguments
- TensTYPE(qtensor), in
Get the maximal dimension of this tensor.
- idxINTEGER(*), in
Search only over these indices of the rank-n tensor.
Details
Return the maximal dimension of all n indices in the rank-n tensor, or selected indices.
Source Code
show / hide f90 code
- qTensors_f90.maxlineardim_qtensorc()[source]¶
fortran-function - June 2017 (updated dj) Return the maximal dimension of all n indices in the rank-n tensor, or selected indices.
Arguments
- TensTYPE(qtensorc), in
Get the maximal dimension of this tensor.
- idxINTEGER(*), in
Search only over these indices of the rank-n tensor.
Source Code
show / hide f90 code
- qTensors_f90.maxvalue_qtensor()[source]¶
fortran-function - June 2017 (dj) Find the maximal entry in the tensor.
Arguments
- TensTYPE(qtensor), in
Find maximal entry in this tensor across all subtensors. For complex tensors, the absolute value is considered.
Source Code
show / hide f90 code
- qTensors_f90.maxvalue_qtensorc()[source]¶
fortran-function - June 2017 (dj) Find the maximal entry in the tensor.
Arguments
- TensTYPE(qtensorc), in
Find maximal entry in this tensor across all subtensors. For complex tensors, the absolute value is considered.
Source Code
show / hide f90 code
- qTensors_f90.norm_qtensor()[source]¶
fortran-function - ?? (mlw) Calculate the norm of the qtensor as <A,A>. details (template defined in qTensors_include.f90)
Arguments
- QtTYPE(qtensor), in
Get norm of the qtensor.
Source Code
show / hide f90 code
- qTensors_f90.norm_qtensorc()[source]¶
fortran-function - ?? (mlw) Calculate the norm of the qtensorc as <A,A>. details (template defined in qTensors_include.f90)
Arguments
- QtTYPE(qtensorc), in
Get norm of the qtensorc.
Source Code
show / hide f90 code
- qTensors_f90.permute_qnumbers_qtensor()[source]¶
fortran-subroutine - November 2016 (dj) Permute the quantum numbers; necessary when permuting the legs of the tensors.
Arguments
- TensTYPE(qtensor), inout
Save a transposition/permutation on the indices of this tensor.
- permINTEGER(*), OPTIONAL, in
permutation array has length equal to the rank of the tensor with unique entries 1 to rank. Default to rank, rank - 1, …, 2, 1 (transpose)
Source Code
show / hide f90 code
- qTensors_f90.permute_qnumbers_qtensorc()[source]¶
fortran-subroutine - November 2016 (dj) Permute the quantum numbers; necessary when permuting the legs of the tensors.
Arguments
- TensTYPE(qtensorc), inout
Save a transposition/permutation on the indices of this tensor.
- permINTEGER(*), OPTIONAL, in
permutation array has length equal to the rank of the tensor with unique entries 1 to rank. Default to rank, rank - 1, …, 2, 1 (transpose)
Source Code
show / hide f90 code
- qTensors_f90.perturb_qtensor()[source]¶
fortran-subroutine - December 2018 (dj) Perturb a tensor by a some small epsilon, entry-by-entry.
Arguments
- TensTYPE(qtensor), inout
Tensor to be perturbed..
- epsilonreal, OPTIONAL, in
Scale a randomized tensor by epsilon and add to original tensor. Default to 1e-8
Source Code
show / hide f90 code
- qTensors_f90.perturb_qtensorc()[source]¶
fortran-subroutine - December 2018 (dj) Perturb a tensor by a some small epsilon, entry-by-entry.
Arguments
- TensTYPE(qtensorc), inout
Tensor to be perturbed..
- epsilonreal, OPTIONAL, in
Scale a randomized tensor by epsilon and add to original tensor. Default to 1e-8
Source Code
show / hide f90 code
- qTensors_f90.pointto_qtensor()[source]¶
fortran-subroutine - March 2018 (dj) Copy Objb to Obja by setting the pointers and nullify Objb.
Arguments
- ObjaTYPE(qtensor), inout
On exit, it contains the same information as Objb
- ObjbTYPE(qtensor), inout
Empty on exit.
Source Code
show / hide f90 code
- qTensors_f90.pointto_qtensorc()[source]¶
fortran-subroutine - March 2018 (dj) Copy Objb to Obja by setting the pointers and nullify Objb.
Arguments
- ObjaTYPE(qtensorc), inout
On exit, it contains the same information as Objb
- ObjbTYPE(qtensorc), inout
Empty on exit.
Source Code
show / hide f90 code
- qTensors_f90.pointto_qtensorc_qtensor()[source]¶
fortran-subroutine - March 2018 (dj) Copy Objb to Obja by setting the pointers and nullify Objb. Uses copy to convert from real to complex.
Arguments
- ObjaTYPE(qtensorc), inout
On exit, it contains the same information as Objb
- ObjbTYPE(qtensor), inout
Empty on exit.
Source Code
show / hide f90 code
- qTensors_f90.print_qtensor()[source]¶
fortran-subroutine - ?? () Write dimension and non-zero entries to standard out (6) via write_qtensor. (deprecated, use directly write_qtensor) details (template defined in qTensors_include.f90)
Arguments
- QtQTYPE(TENSOR_TYPE), in
Write this q-tensor to standard out (dimensions, non-zero entries)
Source Code
show / hide f90 code
- qTensors_f90.print_qtensorc()[source]¶
fortran-subroutine - ?? () Write dimension and non-zero entries to standard out (6) via write_qtensorc. (deprecated, use directly write_qtensorc) details (template defined in qTensors_include.f90)
Arguments
- QtQTYPE(TENSOR_TYPE), in
Write this q-tensor to standard out (dimensions, non-zero entries)
Source Code
show / hide f90 code
- qTensors_f90.project_qtensor()[source]¶
fortran-subroutine - March 2016 (updated dj) Apply the projector P to Aa and store in Bb, where P is defined as
Arguments
- QtbTYPE(qtensor), out
Store projection of A in this tensor.
- QtaTYPE(qtensor), inout
Get projection of this tensor.
- PsiProjsTYPE(qtensor)(*), inout
Array of tensors defining the projector.
Details
Used in orthogonalizing an MPS against another set of MPSs. (template defined in qTensors_include.f90)
Source Code
show / hide f90 code
- qTensors_f90.project_qtensorc()[source]¶
fortran-subroutine - March 2016 (updated dj) Apply the projector P to Aa and store in Bb, where P is defined as
Arguments
- QtbTYPE(qtensorc), out
Store projection of A in this tensor.
- QtaTYPE(qtensorc), inout
Get projection of this tensor.
- PsiProjsTYPE(qtensorc)(*), inout
Array of tensors defining the projector.
Details
Used in orthogonalizing an MPS against another set of MPSs. (template defined in qTensors_include.f90)
Source Code
show / hide f90 code
- qTensors_f90.qmattomat_qtensor()[source]¶
fortran-subroutine - November 2017 (dj, update) Transform a qtensor to a tensor assuming that all links are a local Hilbert space.
Arguments
- ToutTYPE(tensor), inout
Tensor without symmetry-adapted space.
- TinTYPE(qtensor), in
Tensor in symmetry-adapted space to be written a normal tensor.
- ImapperTYPE(imap), in
Contains the information about where each quantum number is mapped to.
Details
This version works for arbitrary number of links under the condition they are all defined in the same local Hilbert space.
Source Code
show / hide f90 code
- qTensors_f90.qmattomat_qtensorc()[source]¶
fortran-subroutine - November 2017 (dj, update) Transform a qtensorc to a tensorc assuming that all links are a local Hilbert space.
Arguments
- ToutTYPE(tensorc), inout
Tensor without symmetry-adapted space.
- TinTYPE(qtensorc), in
Tensor in symmetry-adapted space to be written a normal tensor.
- ImapperTYPE(imap), in
Contains the information about where each quantum number is mapped to.
Details
This version works for arbitrary number of links under the condition they are all defined in the same local Hilbert space.
Source Code
show / hide f90 code
- qTensors_f90.randomize_qtensor()[source]¶
fortran-subroutine - Randomize the nonempty data elements (not the qs!) of Qt. details (template defined in qTensors_include.f90) March 2016 (updated dj)
Arguments
- QtTYPE(qtensor), inout
Randomize entries between [-1, 1] (real array) or [-1-i, 1+i] (complex arrays). This is done for each data element allocated beforehand.
Source Code
show / hide f90 code
- qTensors_f90.randomize_qtensorc()[source]¶
fortran-subroutine - Randomize the nonempty data elements (not the qs!) of Qt. details (template defined in qTensors_include.f90) March 2016 (updated dj)
Arguments
- QtTYPE(qtensorc), inout
Randomize entries between [-1, 1] (real array) or [-1-i, 1+i] (complex arrays). This is done for each data element allocated beforehand.
Source Code
show / hide f90 code
- qTensors_f90.rank_qtensor()[source]¶
fortran-function - June 2017 (dj) Return the rank of a tensor.
Arguments
- TensTYPE(TENSOR_TYPE), in
Return the rank of the tensor. If the tensor has no blocks rank -1 is returned. (Rank 0 would correspond to a scalar.)
Source Code
show / hide f90 code
- qTensors_f90.rank_qtensorc()[source]¶
fortran-function - June 2017 (dj) Return the rank of a tensor.
Arguments
- TensTYPE(TENSOR_TYPE), in
Return the rank of the tensor. If the tensor has no blocks rank -1 is returned. (Rank 0 would correspond to a scalar.)
Source Code
show / hide f90 code
- qTensors_f90.read_qtensor()[source]¶
fortran-subroutine - August 2015 (dj) Read a q-tensor from a given unit.
Arguments
- QtensTYPE(qtensor), out
will be read from given destination.
- unitINTEGER, in
read from this unit
- formCHARACTER, in
‘H’ (human readable), ‘B’ (binary).
Details
For details of the expected input read write_qtensor for the corresponding form. (template defined in qTensors_include.f90)
Source Code
show / hide f90 code
- qTensors_f90.read_qtensorc()[source]¶
fortran-subroutine - August 2015 (dj) Read a q-tensor from a given unit.
Arguments
- QtensTYPE(qtensorc), out
will be read from given destination.
- unitINTEGER, in
read from this unit
- formCHARACTER, in
‘H’ (human readable), ‘B’ (binary).
Details
For details of the expected input read write_qtensorc for the corresponding form. (template defined in qTensors_include.f90)
Source Code
show / hide f90 code
- qTensors_f90.scale_qtensor_real()[source]¶
fortran-subroutine - ?? (mlw) Scale qtensor by real details (template defined in qTensors_include.f90)
Arguments
- screal, in
Scalar to be multiplied with vector.
- QtTYPE(qtensor), inout
To be scaled with scalar.
Source Code
show / hide f90 code
- qTensors_f90.scale_qtensorc_complex()[source]¶
fortran-subroutine - ?? (mlw) Scale qtensorc by complex details (template defined in qTensors_include.f90)
Arguments
- sccomplex, in
Scalar to be multiplied with vector.
- QtTYPE(qtensorc), inout
To be scaled with scalar.
Source Code
show / hide f90 code
- qTensors_f90.scale_qtensorc_real()[source]¶
fortran-subroutine - ?? (mlw) Scale qtensorc by real details (template defined in qTensors_include.f90)
Arguments
- screal, in
Scalar to be multiplied with vector.
- QtTYPE(qtensorc), inout
To be scaled with scalar.
Source Code
show / hide f90 code
- qTensors_f90.set_hash_qtensor()[source]¶
fortran-subroutine - October 2016 (dj) Set the hashes of specified indices of the qtensor in its internal structure.
Arguments
- QtensTYPE(qtensor), inout
The values of the hashes are set according to the new indices.
- idxsINTEGER(*), in
Specify indices to be hashed in regard to the legs of the tensor.
- iiINTEGER, OPTIONAL, in
Specify index in terms of array of tensors for generating new hash. If not present, all tensors are set again.
Source Code
show / hide f90 code
- qTensors_f90.set_hash_qtensorc()[source]¶
fortran-subroutine - October 2016 (dj) Set the hashes of specified indices of the qtensorc in its internal structure.
Arguments
- QtensTYPE(qtensorc), inout
The values of the hashes are set according to the new indices.
- idxsINTEGER(*), in
Specify indices to be hashed in regard to the legs of the tensor.
- iiINTEGER, OPTIONAL, in
Specify index in terms of array of tensors for generating new hash. If not present, all tensors are set again.
Source Code
show / hide f90 code
- qTensors_f90.size_qtensor()[source]¶
fortran-function - ?? () Overload the SIZE() function to return the number of used values rather than the capacity. details (template defined in qTensors_include.f90)
Arguments
- QtQTYPE(TENSOR_TYPE), in
Get number of used blocks in the qtensor.
Source Code
show / hide f90 code
- qTensors_f90.size_qtensorc()[source]¶
fortran-function - ?? () Overload the SIZE() function to return the number of used values rather than the capacity. details (template defined in qTensors_include.f90)
Arguments
- QtQTYPE(TENSOR_TYPE), in
Get number of used blocks in the qtensorc.
Source Code
show / hide f90 code
- qTensors_f90.Skim_qtensor()[source]¶
fortran-subroutine - ?? (mlw) Remove all irreps which contribute less than err of the relative norm. details (template defined in qTensors_include.f90)
Arguments
- QtTYPE(qtensor), inout
Eliminate all blocks which do not contribute more than a fraction err to the norm.
- errREAL, in
Criteria for each block; contribution to complete norm must be greater than the fraction err.
Source Code
show / hide f90 code
- qTensors_f90.Skim_qtensorc()[source]¶
fortran-subroutine - ?? (mlw) Remove all irreps which contribute less than err of the relative norm. details (template defined in qTensors_include.f90)
Arguments
- QtTYPE(qtensorc), inout
Eliminate all blocks which do not contribute more than a fraction err to the norm.
- errREAL, in
Criteria for each block; contribution to complete norm must be greater than the fraction err.
Source Code
show / hide f90 code
- qTensors_f90.skim_idx_qtensor()[source]¶
fortran-subroutine - January 2017 (dj) Remove all irreps which are not marked by the user. details (template defined in qTensors_include.f90)
Arguments
- QtTYPE(qtensor), inout
Eliminate all blocks which are not marked by the user.
- nkeepINTEGER, in
Number of irreps kept.
- idxkeepINTEGER(*), in
The indices of the irreps to be kept.
Source Code
show / hide f90 code
- qTensors_f90.skim_idx_qtensorc()[source]¶
fortran-subroutine - January 2017 (dj) Remove all irreps which are not marked by the user. details (template defined in qTensors_include.f90)
Arguments
- QtTYPE(qtensorc), inout
Eliminate all blocks which are not marked by the user.
- nkeepINTEGER, in
Number of irreps kept.
- idxkeepINTEGER(*), in
The indices of the irreps to be kept.
Source Code
show / hide f90 code
- qTensors_f90.sort_qtensor()[source]¶
fortran-subroutine - ?? (mlw) Sort a qtensor in ascending order of its current hashes. details (template defined in qTensors_include.f90)
Arguments
- QtTYPE(qtensor), inout
The order of blocks will be changed according to the present hashes.
Source Code
show / hide f90 code
- qTensors_f90.sort_qtensorc()[source]¶
fortran-subroutine - ?? (mlw) Sort a qtensor in ascending order of its current hashes. details (template defined in qTensors_include.f90)
Arguments
- QtTYPE(qtensorc), inout
The order of blocks will be changed according to the present hashes.
Source Code
show / hide f90 code
- qTensors_f90.split_qtensor()[source]¶
fortran-subroutine - October 2017 (dj) Split a single link of the tensor into a set of links. Symmetries are split and filled with zeros.
Arguments
- QtTYPE(qtensor), inout
Split one link in this tensor.
- idxINTEGER, in
Index of the link to be splitted.
- SlTYPE(splitlink), in
Contains the information how to split the links into new dimensions.
Details
This case is kind of artificial. If we split a single link tensor with two abelian and two discrete quantum numbers [1, 2, 3, 4] into two links, the new links should have the quantum numbers [1, 0, 3, 0] and [2, 0, 4, 0]. That allows the contraction of the two links with other links splitted the same way. (One possible work around is to allow different quantum numbers for each link, so they need an array for each link.)
Source Code
show / hide f90 code
- qTensors_f90.split_qtensorc()[source]¶
fortran-subroutine - October 2017 (dj) Split a single link of the tensor into a set of links. Symmetries are split and filled with zeros.
Arguments
- QtTYPE(qtensorc), inout
Split one link in this tensor.
- idxINTEGER, in
Index of the link to be splitted.
- SlTYPE(splitlink), in
Contains the information how to split the links into new dimensions.
Details
This case is kind of artificial. If we split a single link tensor with two abelian and two discrete quantum numbers [1, 2, 3, 4] into two links, the new links should have the quantum numbers [1, 0, 3, 0] and [2, 0, 4, 0]. That allows the contraction of the two links with other links splitted the same way. (One possible work around is to allow different quantum numbers for each link, so they need an array for each link.)
Source Code
show / hide f90 code
- qTensors_f90.split_all_qtensor()[source]¶
fortran-subroutine - October 2017 (dj) Splitting all links of the tensor into subsets. This steps allows us to reduce the number of conserved quantities as well.
Arguments
- QtTYPE(qtensor), inout
Split all links of this tensor.
- SlsTYPE(splitlink)(*), in
Information how to split each link in the current tensor.
Source Code
show / hide f90 code
- qTensors_f90.split_all_qtensorc()[source]¶
fortran-subroutine - October 2017 (dj) Splitting all links of the tensor into subsets. This steps allows us to reduce the number of conserved quantities as well.
Arguments
- QtTYPE(qtensorc), inout
Split all links of this tensor.
- SlsTYPE(splitlink)(*), in
Information how to split each link in the current tensor.
Source Code
show / hide f90 code
- qTensors_f90.trace_qtensor()[source]¶
fortran-function - June 2017 (dj) Returns the trace for rank-2 tensors.
Arguments
- TensTYPE(qtensor), in
Calculate the trace assuming it is a rank-2 tensor.
Source Code
show / hide f90 code
- qTensors_f90.trace_qtensorc()[source]¶
fortran-function - June 2017 (dj) Returns the trace for rank-2 tensors.
Arguments
- TensTYPE(qtensorc), in
Calculate the trace assuming it is a rank-2 tensor.
Source Code
show / hide f90 code
- qTensors_f90.transposed_qtensor()[source]¶
fortran-subroutine - July 2016 (dj) Transposition of indices or permutation.
Arguments
- TensTYPE(qtensor), inout
Save a transposition/permutation on the indices of this tensor.
- permINTEGER(*), OPTIONAL, in
permutation array has length equal to the rank of the tensor with unique entries 1 to rank. Default to rank, rank - 1, …, 2, 1 (transpose)
- dopermLOGICAL, in
Dummy variable for interface. Always permuted due to quantum numbers.
Details
The permutation is only stored in the indices and no actions on the actual memory are carried out. The permutation array [3, 1, 2] is to be read as “The new index 1 comes from old index 3” etc. (template defined in Tensors_include.f90)
Source Code
show / hide f90 code
- qTensors_f90.transposed_qtensorc()[source]¶
fortran-subroutine - July 2016 (dj) Transposition of indices or permutation.
Arguments
- TensTYPE(qtensorc), inout
Save a transposition/permutation on the indices of this tensor.
- permINTEGER(*), OPTIONAL, in
permutation array has length equal to the rank of the tensor with unique entries 1 to rank. Default to rank, rank - 1, …, 2, 1 (transpose)
- dopermLOGICAL, in
Dummy variable for interface. Always permuted due to quantum numbers.
Details
The permutation is only stored in the indices and no actions on the actual memory are carried out. The permutation array [3, 1, 2] is to be read as “The new index 1 comes from old index 3” etc. (template defined in Tensors_include.f90)
Source Code
show / hide f90 code
- qTensors_f90.write_qtensor()[source]¶
fortran-subroutine - August 2015 (dj) Write the information about a qTensor to file or standard out. details (template defined in qTensors_include.f90)
Arguments
- QtensTYPE(qtensor), in
will be written to given destination.
- unitINTEGER, in
write on this unit
- formCHARACTER, in
‘H’ (human readable), ‘B’ (binary) or ‘6’ (non-zero values intended for standard-output).
Details
The information when writing a Qtensor is given in the following form (for H and B): 1) integer, number of blocks Looping over all blocks we write 2) real, integer with the hash and the size of the quantum number array 3) integer(:), array with the quantum numbers 4) Calling the corresponding subroutine for writing the rank-3 tensor. See write_tensor or write_tensorc.
Source Code
show / hide f90 code
- qTensors_f90.write_qtensorc()[source]¶
fortran-subroutine - August 2015 (dj) Write the information about a qTensor to file or standard out. details (template defined in qTensors_include.f90)
Arguments
- QtensTYPE(qtensorc), in
will be written to given destination.
- unitINTEGER, in
write on this unit
- formCHARACTER, in
‘H’ (human readable), ‘B’ (binary) or ‘6’ (non-zero values intended for standard-output).
Details
The information when writing a Qtensor is given in the following form (for H and B): 1) integer, number of blocks Looping over all blocks we write 2) real, integer with the hash and the size of the quantum number array 3) integer(:), array with the quantum numbers 4) Calling the corresponding subroutine for writing the rank-3 tensor. See write_tensor or write_tensorc.
Source Code
show / hide f90 code
- qTensors_f90.create_splitlink_qtensor()[source]¶
fortran-subroutine - October 2017 (dj) Create a splitlink object from the identity matrix.
Arguments
- SlTYPE(splitlink), inout
Fill this splitlink object with the splitting for an identity matrix.
- IdopTYPE(TENSOR_TYPE), in
The dimension is taken from the identity to create the splitlink object.
Source Code
show / hide f90 code
- qTensors_f90.create_splitlink_qtensorc()[source]¶
fortran-subroutine - October 2017 (dj) Create a splitlink object from the identity matrix.
Arguments
- SlTYPE(splitlink), inout
Fill this splitlink object with the splitting for an identity matrix.
- IdopTYPE(TENSOR_TYPE), in
The dimension is taken from the identity to create the splitlink object.
Source Code
show / hide f90 code
- qTensors_f90.init_splitlink_qtensor()[source]¶
fortran-subroutine - October 2017 (dj) Store dimension for splitting a link. The quantum numbers on that link must stay the same.
Arguments
- SlTYPE(splitlink), inout
Object storing the dimensions for each hash.
- TensTYPE(qtensor), in
Tensor to be fused in the following.
- idxINTEGER(*), in
Indices to be fused in the tensor Tens.
Source Code
show / hide f90 code
- qTensors_f90.init_splitlink_qtensorc()[source]¶
fortran-subroutine - October 2017 (dj) Store dimension for splitting a link. The quantum numbers on that link must stay the same.
Arguments
- SlTYPE(splitlink), inout
Object storing the dimensions for each hash.
- TensTYPE(qtensorc), in
Tensor to be fused in the following.
- idxINTEGER(*), in
Indices to be fused in the tensor Tens.
Source Code
show / hide f90 code
- qTensors_f90.finalize_splitlink_qtensor()[source]¶
fortran-subroutine - October 2017 (dj) This is the second step when creating a splitlink object. It creates the hashes of the fused symmetry numbers.
Arguments
- SlTYPE(splitlink), inout
On exit, complete splitlink object. On entry, the hashes are filled with the indices of the corresponding block.
- TensTYPE(TENSOR_TYPE), in
The tensor which was fused.
- idxINTEGER, in
Index of the new link, which has been fused.
Source Code
show / hide f90 code
- qTensors_f90.finalize_splitlink_qtensorc()[source]¶
fortran-subroutine - October 2017 (dj) This is the second step when creating a splitlink object. It creates the hashes of the fused symmetry numbers.
Arguments
- SlTYPE(splitlink), inout
On exit, complete splitlink object. On entry, the hashes are filled with the indices of the corresponding block.
- TensTYPE(TENSOR_TYPE), in
The tensor which was fused.
- idxINTEGER, in
Index of the new link, which has been fused.
Source Code
show / hide f90 code