mirror of
https://igit.ific.uv.es/alramos/latticegpu.jl.git
synced 2025-07-01 06:19:28 +02:00
Added tests and support for U(1) group
This commit is contained in:
parent
cd6c28ff5f
commit
0587e5ffea
7 changed files with 332 additions and 1 deletions
31
tests/test_SU2.jl
Normal file
31
tests/test_SU2.jl
Normal file
|
@ -0,0 +1,31 @@
|
|||
using LinearAlgebra, Random
|
||||
|
||||
import Pkg
|
||||
#Pkg.activate("/lhome/ific/a/alramos/s.images/julia/workspace/LatticeGPU")
|
||||
Pkg.activate("/home/alberto/code/julia/LatticeGPU")
|
||||
using LatticeGPU
|
||||
|
||||
|
||||
T = Float32
|
||||
|
||||
b = rand(SU2{T})
|
||||
println(b)
|
||||
|
||||
ba = rand(SU2alg{T})
|
||||
println("Ba: ", ba)
|
||||
b = exp(ba)
|
||||
println("B: ", b)
|
||||
println(typeof(norm2(ba)))
|
||||
|
||||
c = inverse(b)
|
||||
println("Inverse B: ", c)
|
||||
|
||||
d = b*c
|
||||
println("Test: ", d)
|
||||
|
||||
Ma = Array{SU2{T}}(undef, 100)
|
||||
rand!(Ma)
|
||||
println(Ma)
|
||||
|
||||
fill!(Ma, one(eltype(Ma)))
|
||||
println(Ma)
|
Loading…
Add table
Add a link
Reference in a new issue