Working to fix the error calculations#74
Merged
Merged
Conversation
Parameters needed for Phase 1 operator conversion. Note: 13 tests fail after this commit (missing new required parameters).
Implements Phase 1 Step 1.2: Convert H_exact → U_exact and U_s,approx → U_approx before computing matrix/state errors. Note: 13 tests still fail (not yet updated for new API).
Implements Phase 1 Step 1.3: Matrix norm errors now compare time-evolution operators instead of mixing Hamiltonians and unitaries. Note: 13 tests still fail (not yet updated for new API).
Implements Phase 1 Step 1.4: State errors now use converted time-evolution operators for both exact and approximate. Note: 13 tests still fail (not yet updated for new API).
Documents Phase 1 completion: operator conversion bug fix is complete. Expected error improvements: Frobenius ~24.77 → ~0.01-0.1, State ~147% → ~0.1-1%. Note: 13 tests still fail (test fixes in separate commit).
Updated all matrix/state error tests to properly work with Phase 1's operator conversion logic (H_exact → U_exact, U_s,approx → U_approx). Changes: - Added scipy.linalg import for matrix exponentiation - Added helper functions to create test Hamiltonians and convert to unitaries - Fixed 13 tests that were failing due to missing timestep/energy_shift parameters - Updated tests to pass H_exact (Hamiltonian) and U_approx (time-evolution operator) - Matrix-free operator tests now expect NotImplementedError (Phase 1 limitation) All 464 tests now pass (274 analysis + 190 common).
BrendanKKrueger
force-pushed
the
bkk_error_fix
branch
from
July 21, 2026 15:05
b7977c8 to
ed7c1d7
Compare
BrendanKKrueger
marked this pull request as ready for review
July 21, 2026 16:04
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Heavily relies on Claude code, so needs verification.