Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Decrease max nmode size in tests to 5 to further prevent numerical instabilities #26

Merged
merged 2 commits into from
Dec 30, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
decrease max nmode size in tests to 5
  • Loading branch information
apkille committed Dec 30, 2024
commit 779675749d5a5ca9e33015232d2a99077c70d658
2 changes: 1 addition & 1 deletion test/test_autodiff.jl
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

@testset "derivatives" begin

n = rand(1:20)
n = rand(1:5)
xs = rand(Float64)

function f1(x::R) where {R<:Real}
Expand Down
8 changes: 4 additions & 4 deletions test/test_randoms.jl
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
using LinearAlgebra: eigvals, adjoint

@testset "random utils" begin
nmodes = rand(1:20)
nmodes = rand(1:5)
qpairbasis = QuadPairBasis(nmodes)
qblockbasis = QuadBlockBasis(nmodes)
U_qpair = Gabs._rand_unitary(qpairbasis)
Expand Down Expand Up @@ -36,7 +36,7 @@
end

@testset "random states" begin
nmodes = rand(1:20)
nmodes = rand(1:5)
qpairbasis = QuadPairBasis(nmodes)
qblockbasis = QuadBlockBasis(nmodes)
rs_pair = randstate(qpairbasis)
Expand Down Expand Up @@ -76,7 +76,7 @@
end

@testset "random unitaries" begin
nmodes = rand(1:20)
nmodes = rand(1:5)
qpairbasis = QuadPairBasis(nmodes)
qblockbasis = QuadBlockBasis(nmodes)
ru = randunitary(qpairbasis)
Expand All @@ -102,7 +102,7 @@
end

@testset "random channels" begin
nmodes = rand(1:20)
nmodes = rand(1:5)
qpairbasis = QuadPairBasis(nmodes)
qblockbasis = QuadBlockBasis(nmodes)
rc = randchannel(qpairbasis)
Expand Down
6 changes: 3 additions & 3 deletions test/test_states.jl
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
end

@testset "thermal states" begin
n = rand(1:10)
ns = rand(1:10, nmodes)
n = rand(1:5)
ns = rand(1:5, nmodes)
state = thermalstate(qpairbasis, n)
@test state isa GaussianState
@test thermalstate(SVector{2*nmodes}, SMatrix{2*nmodes,2*nmodes}, qpairbasis, n) isa GaussianState
Expand Down Expand Up @@ -126,7 +126,7 @@
end

@testset "symplectic spectrum" begin
nmodes = rand(1:20)
nmodes = rand(1:5)
qpairbasis = QuadPairBasis(nmodes)
qblockbasis = QuadBlockBasis(nmodes)

Expand Down
Loading