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

Performance of GramMatrix -> AlgebraElement #358

Open
blegat opened this issue Jun 8, 2024 · 0 comments
Open

Performance of GramMatrix -> AlgebraElement #358

blegat opened this issue Jun 8, 2024 · 0 comments

Comments

@blegat
Copy link
Member

blegat commented Jun 8, 2024

If we use SA.AlgebraElement with sparse coefficients, it's not going to exploit the mutability of the underlying MOI expression so it will be inefficient.
The advantage of #355 where we first determine a the basis with _NonZero as coefficient (in which case sparse coefficients is very appropriate) is that we now have a basis where we actually want a dense vector of coefficients.
When the basis is fixed like the sampling basis, it's the same.
So in the Variable.KernelBridge, we should use a dense vector of coefficients and make sure operate!! is called with add_mul on them.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant