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

[Feature] Diagonal operations handling in HamiltonianEvolution #282

Draft
wants to merge 26 commits into
base: main
Choose a base branch
from

Conversation

chMoussa
Copy link
Collaborator

Related to issue #211. This is an experimental feature to be checked with Qadence.

For generators that contains only diagonal operations, we avoid computing the whole tensor and use only the resulting diagonal. For this we introduce the option diagonal in certain operations. If set to True, the returned tensor would be of shape (2^n, batch_dim) if the operation is really diagonal. One can convert to the diagonal form using the to_diagonal method. Then apply methods have a new attribute that use different einsum indices for such cases.

At the moment, we will only support such diagonal operations in HamiltonianEvolution, for the generator only. The returned tensors from HamiltonianEvolution would still be of shape (2^n, 2^n, batch_dim) to be compatible with Qadence.

@chMoussa chMoussa added feature New feature or request Exploratory labels Sep 20, 2024
@chMoussa chMoussa self-assigned this Sep 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Exploratory feature New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant