Skip to content

Working to fix the error calculations#74

Merged
BrendanKKrueger merged 7 commits into
mainfrom
bkk_error_fix
Jul 21, 2026
Merged

Working to fix the error calculations#74
BrendanKKrueger merged 7 commits into
mainfrom
bkk_error_fix

Conversation

@BrendanKKrueger

Copy link
Copy Markdown
Collaborator

Heavily relies on Claude code, so needs verification.

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
BrendanKKrueger marked this pull request as ready for review July 21, 2026 16:04
@BrendanKKrueger
BrendanKKrueger merged commit 6688355 into main Jul 21, 2026
14 checks passed
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.

2 participants