mirror of
https://igit.ific.uv.es/alramos/latticegpu.jl.git
synced 2025-05-15 03:33:42 +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
40
tests/testU1.jl
Normal file
40
tests/testU1.jl
Normal file
|
@ -0,0 +1,40 @@
|
|||
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(U1{T})
|
||||
println(b)
|
||||
|
||||
ba = rand(U1alg{T})
|
||||
println("Ba: ", ba)
|
||||
b = exp(ba)
|
||||
println("B: ", b)
|
||||
c = exp(ba, convert(T,-1))
|
||||
println(typeof(norm2(ba)))
|
||||
d = b*c
|
||||
println("Test: ", d)
|
||||
|
||||
c = inverse(b)
|
||||
println("Inverse B: ", c)
|
||||
|
||||
d = b*c
|
||||
println("Test: ", d)
|
||||
|
||||
println("B: ", b)
|
||||
println("Ba: ", ba)
|
||||
b = expm(b, ba, convert(T,-1))
|
||||
println("Test: ", b)
|
||||
|
||||
|
||||
Ma = Array{U1{T}}(undef, 2)
|
||||
rand!(Ma)
|
||||
println(Ma)
|
||||
|
||||
fill!(Ma, one(eltype(Ma)))
|
||||
println(Ma)
|
Loading…
Add table
Add a link
Reference in a new issue