Utilities
File loading
ILDG format
ILDG format is one of standard formats for LatticeQCD configurations.
We can read ILDG format like:
NX = 4
NY = 4
NZ = 4
NT = 4
Nwing = 1
Dim = 4
U = Initialize_Gaugefields(NC,Nwing,NX,NY,NZ,NT,condition = "cold")
ildg = ILDG(filename)
i = 1
L = [NX,NY,NZ,NT]
load_gaugefield!(U,i,ildg,L,NC)
Then, we can calculate the plaquette:
temp1 = similar(U[1])
temp2 = similar(U[1])
comb = 6
factor = 1/(comb*U[1].NV*U[1].NC)
@time plaq_t = calculate_Plaquette(U,temp1,temp2)*factor
println("plaq_t = $plaq_t")
poly = calculate_Polyakov_loop(U,temp1,temp2)
println("polyakov loop = $(real(poly)) $(imag(poly))")
We can write a configuration as the ILDG format like
filename = "hoge.ildg"
save_binarydata(U,filename)
Text format for Bridge++
Gaugefields.jl also supports a text format for Bridge++.
File loading
filename = "testconf.txt"
load_BridgeText!(filename,U,L,NC)
File saving
filename = "testconf.txt"
save_textdata(U,filename)
Data structure
We can access the gauge field defined on the bond between two neigbohr points. In 4D system, the gauge field is like u[ic,jc,ix,iy,iz,it]
. There are four directions in 4D system. Gaugefields.jl uses the array like:
NX = 4
NY = 4
NZ = 4
NT = 4
Nwing = 1
Dim = 4
U = Initialize_Gaugefields(NC,Nwing,NX,NY,NZ,NT,condition = "cold")
In the later exaples, we use, mu=1
and u=U[mu]
as an example.
Hermitian conjugate (Adjoint operator)
If you want to get the hermitian conjugate of the gauge fields, you can do like
u'
This is evaluated with the lazy evaluation. So there is no memory copy. This returms $U_{\mu}^{dagger}$ for all sites.
Shift operator
If you want to shift the gauge fields, you can do like
shifted_u = shift_U(u, shift)
This is also evaluated with the lazy evaluation. Here shift
is shift=(1,0,0,0)
for example.
matrix-field matrix-field product
If you want to calculate the matrix-matrix multiplicaetion on each lattice site, you can do like
As a mathematical expression, for matrix-valued fields $A(n), B(n)$, we define "matrix-field matrix-field product" as,
\[[A(n)B(n)]_{ij} = \sum_k [A(n)]_{ik} [B(n)]_{kj}\]
for all site index n.
In our package, this is expressed as,
mul!(C,A,B)
which means C = A*B
on each lattice site. Here $A, B, C$ are same type of $u$.
Trace operation
If you want to calculate the trace of the gauge field, you can do like
tr(A)
It is useful to evaluation actions. This trace operation summing up all indecis, spacetime and color.