Skip to content

Conversation

@vaferreiQMT
Copy link

Implements

  • random permutations of Pauli strings in a PauliStrSum
  • option to use random permutations during Trotterisation

See also #596

@vaferreiQMT vaferreiQMT changed the title Trotter random Random permutation of strings in Trotterisation Nov 12, 2025
@otbrown
Copy link
Contributor

otbrown commented Nov 13, 2025

Hi Vasco,

Thanks for this -- just wanted to confirm that I've seen it and will try to review once I'm back from SC (which is next week!).

Cheers,
Oliver

@otbrown otbrown self-assigned this Nov 13, 2025
@TysonRayJones
Copy link
Member

Hi Vasco and Oliver,

Here are some thoughts before merging:

  • Making a new randomiseString parameter constitutes an API break - but I personally think that's fine and doesn't warrant a new major version.
  • The new randomiseString parameter needs to be added to the docstrings.
  • Is randomiseString the most illustrative name? I worry the String suffix doesn't clarify much - the code is shuffling the order of the prescribed Pauli rotations within each Trotter repetition - so I would personally advocate for simplifying it to randomise.
  • The current implementation mutates the passed PauliStrSum, so a user printing their PauliStrSum will see it changed pre- and post-call of any of the Trotter functions. If that's a desired/acceptable postcondition, we need to doc that. If that's undesirable, it'd be straightforward to additionally maintain a list of the original indices with respect to the current mutation and restore the original order before function return. That requires O(#terms) temporary memory which may be justifiable (e.g. the Lindblad functions use greater temp mem).

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.

3 participants