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

fix error message for wrong set in inds() #188

Merged
merged 2 commits into from
Aug 18, 2024
Merged

Conversation

starsfordummies
Copy link
Contributor

if you call inds(::Chain) with the wrong set = option, Tenet throws an obscure error - I don't know if this is due to a wrong use of MethodError, I changed it for an ArgumentError and it works. I also added some extra info, so now it throws

julia> inds(psi, set=:sergio)
ERROR: ArgumentError: unknown query: set=sergio.
        Possible options are:
        :all, :open :inner :hyper :parallelto
        For Quantum also :physical :virtual

Copy link
Member

@mofeing mofeing left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @starsfordummies! Just a small suggestion

src/TensorNetwork.jl Outdated Show resolved Hide resolved
Co-authored-by: Sergio Sánchez Ramírez <15837247+mofeing@users.noreply.github.com>
@starsfordummies starsfordummies merged commit b4dcdc4 into master Aug 18, 2024
5 of 6 checks passed
@starsfordummies starsfordummies deleted the fix_indserror branch August 18, 2024 18:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants