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

CompatHelper: bump compat for Nemo to 0.40, (keep existing compat) #228

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
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
6 changes: 3 additions & 3 deletions Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,12 @@ QuantumOpticsBase = "4f57444f-1401-5e15-980d-4471b28d5678"

[extensions]
QuantumCliffordGPUExt = "CUDA"
QuantumCliffordLDPCDecodersExt = "LDPCDecoders"
QuantumCliffordMakieExt = "Makie"
QuantumCliffordPlotsExt = "Plots"
QuantumCliffordPyQDecodersExt = "PyQDecoders"
QuantumCliffordQOpticsExt = "QuantumOpticsBase"
QuantumCliffordQuantikzExt = "Quantikz"
QuantumCliffordLDPCDecodersExt = "LDPCDecoders"
QuantumCliffordPyQDecodersExt = "PyQDecoders"

[compat]
CUDA = "4.4.0"
Expand All @@ -53,7 +53,7 @@ LDPCDecoders = "0.1.1"
LinearAlgebra = "1.9"
MacroTools = "0.5.9"
Makie = "0.20"
Nemo = "0.38"
Nemo = "0.38, 0.39, 0.40"
Plots = "1.38.0"
PrecompileTools = "1.2"
PyQDecoders = "0.1.1"
Expand Down
2 changes: 1 addition & 1 deletion src/entanglement.jl
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ function entanglement_entropy(state::AbstractStabilizer, subsystem::AbstractVect
graph = Graphs.Graph(state)
adjmat = Graphs.adjacency_matrix(graph)
other_subsystem = filter(i->!(i in collect(subsystem)), 1:Graphs.nv(graph))
subadjmat = Nemo.matrix(Nemo.residue_ring(Nemo.ZZ, 2), collect(adjmat[subsystem,other_subsystem]))
subadjmat = Nemo.matrix(Nemo.GF(2), collect(adjmat[subsystem,other_subsystem]))
LinearAlgebra.rank(subadjmat)
end

Expand Down
6 changes: 2 additions & 4 deletions src/randoms.jl
Original file line number Diff line number Diff line change
Expand Up @@ -167,10 +167,8 @@ function precise_inv(a)::Matrix{UInt8}
end

function nemo_inv(a, n)::Matrix{UInt8}
binaryring = Nemo.residue_ring(Nemo.ZZ, 2) # TODO should I use GF(2) instead of ResidueRing(ZZ, 2)?
M = Nemo.matrix_space(binaryring, n, n)
inverted = inv(M(Matrix{Int}(a))) # Nemo is very picky about input data types
return (x->mod(UInt8(x.data),0x2)).(inverted)
inverted = inv(Nemo.matrix(Nemo.GF(2),a))
return collect(UInt8.(inverted.==1)) # maybe there is a better way to do the conversion
end

"""Sample (h, S) from the distribution P_n(h, S) from Bravyi and Maslov Algorithm 1."""
Expand Down
2 changes: 1 addition & 1 deletion test/test_jet.jl
Original file line number Diff line number Diff line change
Expand Up @@ -36,5 +36,5 @@ end
)
@show rep
@test_broken length(JET.get_reports(rep)) == 0
@test length(JET.get_reports(rep)) <= 20
@test length(JET.get_reports(rep)) <= 25
end
Loading