Skip to content

Fix normalization handling in MPS/MPO expectations#1

Open
gamatos wants to merge 3 commits into
mainfrom
normalisation_bugfix
Open

Fix normalization handling in MPS/MPO expectations#1
gamatos wants to merge 3 commits into
mainfrom
normalisation_bugfix

Conversation

@gamatos

@gamatos gamatos commented Jun 24, 2026

Copy link
Copy Markdown
Collaborator

This PR fixes normalization issues in tensor network expectation and sweep tracking paths, including avoiding double division for already-normalized MPS inputs and making sweep best-state tracking robust when state is unavailable.

  • Fixes expec_mpo so MPS expectation values remain scale-invariant.
  • Measures MPS working-data norms via tn_norm while preserving stored exponent state.
  • Guards sweep best-state snapshots against missing optimizer state.
  • Adds regression coverage for normalized expectations, raw norm measurement, and non-unitary norm-infidelity diagnostics.

@gamatos gamatos requested a review from rezaquant June 24, 2026 12:53
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

Successfully merging this pull request may close these issues.

1 participant