Conversation
|
|
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! |
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!