-
Notifications
You must be signed in to change notification settings - Fork 50
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
Reduces JET errors #359
Reduces JET errors #359
Conversation
The PR is ready for review, Thank you. |
src/sumtypes.jl
Outdated
variant_args = [] | ||
for t in _types(type) | ||
push!(variant_args, :(::$t)) | ||
end | ||
Expr(:call, _symbol(type), variant_args...) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This does not seem to affect the number of JET warnings in my tests. Why is it needed?
src/dense_cliffords.jl
Outdated
end | ||
end | ||
return join([digits_subchars[d+1] for d in reverse(dlist)]) | ||
end |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this does not seem to affect the number of jet warnings for me
src/QuantumClifford.jl
Outdated
@inline comm!(v, l::PauliOperator, r::Tableau, i::Int) = comm!(v, l, r, i) | ||
@inline comm!(v, l::Tableau, r::PauliOperator, i::Int) = comm!(v, l, r, i) | ||
@inline comm!(v, s::Tableau, l::Int, r::Int) = comm!(v, s, l, r) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These cause stack overflow errors as they are referring to themselves:
julia> comm!([1,2,3], T"X", P"X", 1)
ERROR: StackOverflowError:
Stacktrace:
[1] comm!(v::Vector{…}, l::QuantumClifford.Tableau{…}, r::PauliOperator{…}, i::Int64) (repeats 79984 times)
@ QuantumClifford ~/Documents/ScratchSpace/quantumjulia/QuantumClifford.jl/src/QuantumClifford.jl:767
Some type information was truncated. Use `show(err)` to see complete types.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
they would need tests
Thanks for the JET simplification. Let's reduce it a bit further to 15 :)
The
fast_row
andquantum_mallows
were not visible locally, so that's why locally it showed17
butnightly
showed it19
.