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

Batching triples.py and symplectics.py #563

Open
wants to merge 81 commits into
base: develop
Choose a base branch
from
Open

Conversation

apchytr
Copy link
Collaborator

@apchytr apchytr commented Mar 1, 2025

Context: The first step toward our general batching epic is enabling batching the methods that generate our built-in CircuitComponents i.e. triples.py and symplectics.py.

Merge Backend stack and broadcast to before this PR

TODOs:

  • gdm_state_Abc and sauron_state_Abc. Both make use of complex_gaussian_integral_2 and so are blocked until that method is updated
  • Documenting batch behaviour

Description of the Change: Introduced the triples_batched.py file. Updated symplectics.py. Misc changes.

Benefits: Arbitrary batch dim triples and symplectics

@apchytr apchytr marked this pull request as ready for review March 6, 2025 16:04
# ~~~~~~~~~


def compute_batch_size(*args) -> tuple[tuple[int, ...] | None, int]:
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Can probably replace with broadcast_arrays

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
no changelog Pull request does not require a CHANGELOG entry
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant