Traces

All this subroutines are design with the aim of performing “total” or “partial” traces of operators M mapping a finite dimensional bipartite Hilbert space

Htot = HA HB =  CN CK

into itself. Some distinctions are in order:
  • M can either be REAL or CPLX;
  • partial traces can either be performed with respect to the system
        “A” (that is HA) or respect to the system “B” (that is HB);
  • in the input/output of the subroutine, M can either be expressed in
        the “product basis” of CN CK, namely |m,μ〉 := |m〉A⊗ |μ〉B ,
        or in the “overall basis” of CNK, namely |i〉tot .
According to the last of the points listed above, when M is given in the overall basis, it will be considered as a 2-dimensional NK x NK matrix whose matrix elements M(i,j) are given by

M(i,j) =  tot〈i| M |j〉tot .

Conversely, when M is given in the product basis, it will be considered as a 4-dimensional N x K x N x K matrix whose matrix elements M(m,μ,n,ν) are given by

M(m,μ,n,ν) =  〈m,μ| M |n,ν〉 .

Subroutine ’s Name Precision Version Compatibility
R_TOT_TRACE.f Single 1.0.0 Fortran 90
Uses:  None
Description: 

it take as input 2 INTEGER numbers N and K and a REAL matrix M, that can either be given in the product basis of CN CK or in the overall basis of CNK, and return as output the REAL number “TRACE of M”

 
Subroutine ’s Name Precision Version Compatibility
R_NK_PT_A.f Single 1.0.0 Fortran 90
Uses:  None
Description: 

it take as input 2 INTEGER numbers N and K and a REAL matrix M, whose matrix elements must be given in the product basis of CN CK, and return as output the K x K REAL matrix “PARTIAL TRACE of M over A”

 
Subroutine ’s Name Precision Version Compatibility
R_PR_PT_A.f Single 1.0.0 Fortran 90
Uses:  None
Description: 

it take as input 2 INTEGER numbers N and K and a REAL matrix M, whose matrix elements must be given in the overall basis of CNK, and return as output the K x K REAL matrix “PARTIAL TRACE of M over A”

 
Subroutine ’s Name Precision Version Compatibility
R_NK_PT_B.f Single 1.0.0 Fortran 90
Uses:  None
Description: 

it take as input 2 INTEGER numbers N and K and a REAL matrix M, whose matrix elements must be given in the product basis of CN CK, and return as output the N x N REAL matrix “PARTIAL TRACE of M over B”

 
Subroutine ’s Name Precision Version Compatibility
R_PR_PT_B.f Single 1.0.0 Fortran 90
Uses:  None
Description: 

it take as input 2 INTEGER numbers N and K and a REAL matrix M, whose matrix elements must be given in the overall basis of CNK, and return as output the N x N REAL matrix “PARTIAL TRACE of M over B”

 
Subroutine ’s Name Precision Version Compatibility
C_TOT_TRACE.f Complex 1.0.0 Fortran 90
Uses:  None
Description: 

it take as input 2 INTEGER numbers N and K and a CPLX matrix M, that can either be given in the product basis of CN CK or in the overall basis of CNK, and return as output the CPLX number “TRACE of M”

 
Subroutine ’s Name Precision Version Compatibility
C_NK_PT_A.f Complex 1.0.0 Fortran 90
Uses:  None
Description: 

it take as input 2 INTEGER numbers N and K and a CPLX matrix M, whose matrix elements must be given in the product basis of CN CK, and return as output the K x K CPLX matrix “PARTIAL TRACE of M over A”

 
Subroutine ’s Name Precision Version Compatibility
C_PR_PT_A.f Complex 1.0.0 Fortran 90
Uses:  None
Description: 

it take as input 2 INTEGER numbers N and K and a CPLX matrix M, whose matrix elements must be given in the overall basis of CNK, and return as output the K x K CPLX matrix “PARTIAL TRACE of M over A”

 
Subroutine ’s Name Precision Version Compatibility
C_NK_PT_B.f Complex 1.0.0 Fortran 90
Uses:  None
Description: 

it take as input 2 INTEGER numbers N and K and a CPLX matrix M, whose matrix elements must be given in the product basis of CN CK, and return as output the N x N CPLX matrix “PARTIAL TRACE of M over B”

 
Subroutine ’s Name Precision Version Compatibility
C_PR_PT_B.f Complex 1.0.0 Fortran 90
Uses:  None
Description: 

it take as input 2 INTEGER numbers N and K and a CPLX matrix M, whose matrix elements must be given in the overall basis of CNK, and return as output the N x N CPLX matrix “PARTIAL TRACE of M over B”