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] Optimise calculation of eigenvalues/vectors in finite shot sampling #25

Open
atiyo opened this issue Jul 29, 2024 · 0 comments

Comments

@atiyo
Copy link
Collaborator

atiyo commented Jul 29, 2024

Instead of calculating eigenvalues and eigenvectors of Hamiltonians acting on the entire state vector, we can instead calculate them on the matrix representation of the observable on a limited support and then kron to get the correct representation.


This issue it to investigate the performance implementations of this and implement the optimised version if necessary. It's plausible that the performance benefit might be small since XLA compiler might cache the result of the eigh call.

...isn't it just the eigenvector matrix of the small hamiltonian kronned with the identity matrix or something? At least it seems to me like you can get a valid eigendecomposition that way:

$$ H_\text{big} = H_\text{small} \otimes I = \left(\sum_\lambda \lambda|\lambda\rangle\langle\lambda|\right)\otimes I $$

where each eigenvalue of $H_\text{small}$ will show up repeated by the size of the identity. Check Theorem 13.12 here.

Originally posted by @jpmoutinho in #23 (comment)

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

No branches or pull requests

1 participant