Skip to content

Commit 26f050f

Browse files
committed
Small updates
1 parent acd0860 commit 26f050f

File tree

2 files changed

+11
-8
lines changed

2 files changed

+11
-8
lines changed

Project.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,3 +77,6 @@ cuTENSOR = "011b41b2-24ef-40a8-b3eb-fa098493e9e1"
7777

7878
[targets]
7979
test = ["ArgParse", "Adapt", "Aqua", "Combinatorics", "CUDA", "cuTENSOR", "GPUArrays", "LinearAlgebra", "SafeTestsets", "TensorOperations", "Test", "TestExtras", "ChainRulesCore", "ChainRulesTestUtils", "FiniteDifferences", "Zygote"]
80+
81+
[sources]
82+
MatrixAlgebraKit = {url="https://github.com/QuantumKitHub/MatrixAlgebraKit.jl", rev="main"}

test/cuda/tensors.jl

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -475,20 +475,20 @@ for V in spacelist
475475
end
476476
end
477477
if BraidingStyle(I) isa Bosonic && hasfusiontensor(I)
478-
#=@timedtestset "Tensor functions" begin
478+
@timedtestset "Tensor functions" begin
479479
W = V1 V2
480480
for T in (Float64, ComplexF64)
481-
t = CUDA.randn(T, W, W)
481+
t = project_hermitian!(CUDA.randn(T, W, W))
482482
s = dim(W)
483-
@test_broken (@constinferred sqrt(t))^2 ≈ t
484-
@test_broken TensorKit.to_cpu(sqrt(t)) ≈ sqrt(TensorKit.to_cpu(t))
483+
#@test (@constinferred sqrt(t))^2 ≈ t
484+
#@test TensorKit.to_cpu(sqrt(t)) ≈ sqrt(TensorKit.to_cpu(t))
485485

486486
expt = @constinferred exp(t)
487-
@test_broken TensorKit.to_cpu(expt) ≈ exp(TensorKit.to_cpu(t))
487+
@test TensorKit.to_cpu(expt) exp(TensorKit.to_cpu(t))
488488

489489
# log doesn't work on CUDA yet (scalar indexing)
490-
#@test exp(@constinferred log(expt)) ≈ expt
491-
#@test TensorKit.to_cpu(log(expt)) ≈ log(TensorKit.to_cpu(expt))
490+
#@test exp(@constinferred log(project_hermitian!(expt))) ≈ expt
491+
#@test TensorKit.to_cpu(log(project_hermitian!(expt))) ≈ log(TensorKit.to_cpu(expt))
492492

493493
#=@test (@constinferred cos(t))^2 + (@constinferred sin(t))^2 ≈
494494
id(storagetype(t), W)
@@ -517,7 +517,7 @@ for V in spacelist
517517
@test coth(@constinferred acoth(t8)) ≈ t8=#
518518
# TODO in CUDA
519519
end
520-
end=#
520+
end
521521
end
522522
# Sylvester not defined for CUDA
523523
# @timedtestset "Sylvester equation" begin

0 commit comments

Comments
 (0)