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

Correctly map Ansatz lanes to Tensor and bonds to Symbol indices #289

Open
mofeing opened this issue Jan 14, 2025 · 0 comments
Open

Correctly map Ansatz lanes to Tensor and bonds to Symbol indices #289

mofeing opened this issue Jan 14, 2025 · 0 comments
Assignees
Labels
enhancement New feature or request refactor Change internals
Milestone

Comments

@mofeing
Copy link
Member

mofeing commented Jan 14, 2025

Before #282, Lattice (and thus Ansatz) would use Sites to locate tensors. This is problematic when working with Operators (like MPO) or dual states (like the adjoint of a MPS) because either they don't posses those Sites or they

#282 introduces the concept of Lane, a Site without i/o information (well, it would be more correct to say that "a Site is a Lane with i/o information"), and forces Ansatz and its subtypes to use Lane to localize Tensors

Changes to AbstractQuantum

  • Stop supporting tensors(; at) at this level
    • inds(; at::Site) is still supported
    • in the rare case is needed, use tensors(; contains=inds(; at))

Changes to AbstractAnsatz

  • Add a mapping between Lane and Tensor
  • Add a mapping between Bond and Symbol of the indices
  • Check consistency between the Lattice and the TensorNetwork
    • Should run on many operations automatically
  • Add sth similar to @unsafe_region but for AbstractAnsatz
    • It should stop running the check, run it in the end of the scope and activate them again

Furthermore, it might be interesting to use some kind of reactive programming to automatically propagate changes performed to the innermost layers (i.e. TensorNetwork and Quantum for Ansatz) to the parent layers. If not, we must intercept many calls to the more generic versions.

@mofeing mofeing added enhancement New feature or request refactor Change internals labels Jan 14, 2025
@mofeing mofeing added this to the 0.8 milestone Jan 14, 2025
@mofeing mofeing self-assigned this Jan 14, 2025
@mofeing mofeing modified the milestones: 0.8, 0.8.x Jan 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request refactor Change internals
Projects
None yet
Development

No branches or pull requests

1 participant