Skip to content

Commit 11525d5

Browse files
committed
add CUDA steadystate_fourier test
1 parent e2bb0be commit 11525d5

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

test/ext-test/gpu/cuda_ext.jl

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,25 @@ end
154154
@test ρ_ss_cpu.data Array(ρ_ss_gpu_csr.data) atol = 1e-8 * length(ρ_ss_cpu)
155155
end
156156

157+
158+
@testset "CUDA steadystate_fourier" begin
159+
N = 2
160+
ωd = 1.0
161+
n_max = 2
162+
H0 = cu(sigmaz())
163+
Hp = cu(sigmax())
164+
Hm = cu(sigmax())
165+
c_ops = [cu(sqrt(0.1) * sigmam())]
166+
ρ_list1 = steadystate_fourier(H0, Hp, Hm, ωd, c_ops;
167+
solver = SteadyStateLinearSolver(),
168+
n_max = n_max)
169+
ρ0 = steadystate_fourier(H0, Hp, Hm, ωd, c_ops;
170+
solver = SSFloquetEffectiveLiouvillian(SteadyStateDirectSolver()),
171+
n_max = n_max)
172+
@test isapprox(ρ0, ρ_list1[1]; atol = 1e-6)
173+
end
174+
175+
157176
@testset "CUDA ptrace" begin
158177
g = fock(2, 1)
159178
e = fock(2, 0)

0 commit comments

Comments
 (0)