Uh oh!
There was an error while loading. Please reload this page.
Implement Pauli sorting - #708
Conversation
TysonRayJones
commented
Feb 18, 2026
|
vaferreiQMT
commented
Feb 19, 2026
Howdy! For 1. the magnitude sorting comes from Tranter et al., which suggested it as a cheap method for improving the accuracy of Trotter methods for chemical systems. From my testing it does seem to be surprisingly effective for chemical systems, though it won't be a silver bullet for all Hamiltonians. Nevertheless, I thought it was cheap and useful enough for chemicals systems and for analysing generic Hamiltonians, that it could be relevant. For 2. I will leave it up to you and Oliver to decide what you think is best, but I'll be happy to update the PR after. For 3. I agree with your thoughts. I was bouncing between including or not including the temporary memory validation before submitting the PR, so happy to add that back. Cheers! |
otbrown
commented
Feb 20, 2026
Hi both, First, apologies for the delayed response, it's been one of those RE Tyson's 2nd point: |
TysonRayJones
commented
Feb 26, 2026
|
TysonRayJones
commented
Feb 28, 2026
Queue rapid edits: |
since not traditional setters
since imperative "invert" might incorrectly imply the passed list is modified.
TysonRayJones
commented
Feb 28, 2026
Merging - I'll deal with any remaining test issues in subsequent PR |
Uh oh!
There was an error while loading. Please reload this page.
TysonRayJones
commented
Feb 28, 2026
@vaferreiQMT@otbrown#713 highlights an unrealised side-effecting of adding |
Howdy! This is the first of two PRs on transformations of
PauliStrSumsmainly focusing on improving the accuracy of Trotter methods. This PR specifically introduces methods to sort the terms within aPauliStrSum.Main changes:
PauliStrSum.Setterssection for Pauli docs, for the sorting methods and future methods that transform Pauli strings.Key details:
std::sortrather than some custom implementation.PauliStrSumgenerally only scales polynomially, this shouldn't be an issue (e.g. even for extremely large chemical systems this additional memory would be negligible)I think that about covers it. As always happy to tweak, move or update stuff if anything jumps out at you.
Cheers!