-
Notifications
You must be signed in to change notification settings - Fork 6
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
embed
does not preserve the basis when a CompositeBasis with just a single site is used
#27
Comments
embed
does not preserve the basis when a CompositeBasis with just a single site is used
@Krastanov for visibility |
I think this should be considered a bug: A few ways we could go about this:
PS: There's a related issue where it's possible to construct |
I'm thinking adding a |
@akirakyle , pinging you here as this might also inform tangentially some of the design you are doing for #26 |
Suppose
op
is a LazyTensor whose basis is a CompositeBasis with just one site. Then the basis ofdense(op)
is not the same as the basis ofop
. Specifically the basis ofdense(op)
is a single-site non composite basis (e.g.,NLevel(N=10)
instead of[NLevel(N=10)]
). This then causes an "incompatible basis" error in a more complex implementation ofdense
where it sums over many "densified" operators.It looks like this is ultimately due to the implementation of the
embed
method here https://github.com/qojulia/QuantumInterface.jl/blob/main/src/embed_permute.jl#L55 and how the functiontensor
works for a single-site operator https://github.com/qojulia/QuantumInterface.jl/blob/main/src/tensor.jl#L7C1-L7C7.Would it be possible to fix these methods so that the basis is preserved under operations like
embed
anddense
?The text was updated successfully, but these errors were encountered: