Skip to content

Add operator forms of the Hermitian square-root factorizations#223

Merged
mtfishman merged 3 commits into
mainfrom
mf/operator-sqrth
Jul 20, 2026
Merged

Add operator forms of the Hermitian square-root factorizations#223
mtfishman merged 3 commits into
mainfrom
mf/operator-sqrth

Conversation

@mtfishman

@mtfishman mtfishman commented Jul 20, 2026

Copy link
Copy Markdown
Member

Summary

Adds operator (NamedTensorOperator) forms of project_hermitian, sqrth_safe, invsqrth_safe, and sqrth_invsqrth_safe, alongside the existing gram_eigh_full operator forms. The square roots return operators with the same codomain/domain as the input, since a root of an operator is again an operator.

Adds operator (`NamedTensorOperator`) forms of `project_hermitian`, `sqrth_safe`, `invsqrth_safe`, and `sqrth_invsqrth_safe`, completing the operator-form factorization family alongside the existing `gram_eigh_full` operator forms. Each takes its codomain/domain bipartition from the operator, so callers can compose it with `transpose` to project Hermitian in one bipartition and take the root in the transposed one. `project_hermitian` returns an operator and the roots return bare named arrays, matching the tensor-level forms.
@codecov

codecov Bot commented Jul 20, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 76.90%. Comparing base (a0e9e98) to head (8e90423).

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #223      +/-   ##
==========================================
+ Coverage   76.13%   76.90%   +0.77%     
==========================================
  Files          29       29              
  Lines        1697     1706       +9     
==========================================
+ Hits         1292     1312      +20     
+ Misses        405      394      -11     
Flag Coverage Δ
docs 26.60% <0.00%> (-0.15%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Covers project_hermitian, sqrth_safe, invsqrth_safe, and sqrth_invsqrth_safe
on NamedTensorOperator, matching the gram_eigh_full test pattern.
A square root of a bond operator is again a bond operator, so sqrth_safe,
invsqrth_safe, and sqrth_invsqrth_safe now return NamedTensorOperator with the
same codomain/domain as the input rather than bare named arrays.
@mtfishman
mtfishman enabled auto-merge (squash) July 20, 2026 16:51
@mtfishman
mtfishman merged commit e82817e into main Jul 20, 2026
18 checks passed
@mtfishman
mtfishman deleted the mf/operator-sqrth branch July 20, 2026 17:04
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