diff --git a/test/testfidelity.jl b/test/testfidelity.jl index ab1f09e..cbf645b 100644 --- a/test/testfidelity.jl +++ b/test/testfidelity.jl @@ -3,7 +3,7 @@ visualize=true ## @testset begin "test single spin shuttling fidelity" - T=400; L=10; σ = sqrt(2) / 20; M = 2000; N=601; κₜ=1/20;κₓ=1/0.1; + T=400; L=10; σ = sqrt(2) / 20; M = 5000; N=601; κₜ=1/20;κₓ=1/0.1; B=OrnsteinUhlenbeckField(0,[κₜ,κₓ],σ) model=OneSpinModel(T,L,N,B) @@ -13,8 +13,8 @@ visualize=true f1=averagefidelity(model) f2, f2_err=sampling(model, fidelity, M) f3=1/2*(1+W(T,L,B)) - @test isapprox(f1, f3,rtol=1e-2) - @test isapprox(f2, f3, rtol=1e-2) + @test isapprox(f1, f3,rtol=3e-2) + @test isapprox(f2, f3, rtol=3e-2) println("NI:", f1) println("MC:", f2) println("TH:", f3) @@ -22,7 +22,7 @@ end # @testset begin "test single spin forth-back shuttling fidelity" - T=200; L=10; σ = sqrt(2) / 20; M = 2000; N=501; κₜ=1/20;κₓ=10; + T=200; L=10; σ = sqrt(2) / 20; M = 5000; N=501; κₜ=1/20;κₓ=10; # exponential should be smaller than 100 B=OrnsteinUhlenbeckField(0,[κₜ,κₓ],σ) @@ -47,8 +47,8 @@ end f1=averagefidelity(model) f2, f2_err=sampling(model, fidelity, M) f3=1/2*(1+W(T, L, B, path=:forthback)) - @test isapprox(f1, f3,rtol=1e-2) - @test isapprox(f2, f3, rtol=1e-2) + @test isapprox(f1, f3,rtol=3e-2) + @test isapprox(f2, f3, rtol=3e-2) println("NI:", f1) println("MC:", f2) println("TH:", f3) @@ -56,7 +56,7 @@ end ## @testset begin "test two spin sequenced shuttling fidelity" - L=10; σ =sqrt(2)/20; M=2000; N=501; T1=200; T0=25*0.05; κₜ=1/20; κₓ=1/0.1; + L=10; σ =sqrt(2)/20; M=5000; N=501; T1=200; T0=25*0.05; κₜ=1/20; κₓ=1/0.1; B=OrnsteinUhlenbeckField(0,[κₜ,κₓ],σ) model=TwoSpinModel(T0, T1, L, N, B) if visualize @@ -65,8 +65,8 @@ end f1=averagefidelity(model) f2, f2_err=sampling(model, fidelity, M) f3=1/2*(1+W(T0, T1, L,B)) - @test isapprox(f1, f3,rtol=1e-2) - @test isapprox(f2, f3, rtol=1e-2) + @test isapprox(f1, f3,rtol=3e-2) + @test isapprox(f2, f3, rtol=3e-2) println("NI:", f1) println("MC:", f2) println("TH:", f3) @@ -74,7 +74,7 @@ end # @testset "1/f noise chacacteristics" begin - σ = sqrt(2)/20; M = 400; N=501; L=10; γ=(1e-2,1e2); # MHz + σ = sqrt(2)/20; M = 5000; N=501; L=10; γ=(1e-2,1e2); # MHz # 0.01 ~ 100 μs # v = 0.1 ~ 1000 m/s v=1; T=L/v; κₓ=10; @@ -86,8 +86,8 @@ end f1=averagefidelity(model) f2, f2_err=sampling(model, fidelity, M) f3=1/2*(1+W(T,L,B)) - @test isapprox(f1, f3,rtol=1e-2) - @test isapprox(f2, f3, rtol=1e-2) + @test isapprox(f1, f3,rtol=3e-2) + @test isapprox(f2, f3, rtol=3e-2) println("NI:", f1) println("MC:", f2) println("TH:", f3)