Skip to content

Conversation

TysonRayJones
Copy link
Member

Added support unitary, imaginary and Lindbladian and evolution where the latter uses PauliStrSum jump operators. In the future, we will extend this to jump operators specified as dense matrices, diagonal matrices and projectors (including off-diagonal).

Also moved Trotterised gadgets to their own API module.

which has the below benefits:
- the remaining functions in operations.cpp are precise and do not need to be user-configured for accuracy (i.e. no Trotter hyperparameters)
- the remaining functions in operations.cpp merely call the backend and do not include any bespoke logic (i.e. Trotter circuit scheduling)
- incoming new Trotter functions for dynamical simulation will be more clearly delineated from the "standard" (and relatively boring) operations
- the Trotter logic is isolated in preparation for it becoming more substantial with the introduction of randomisation, commuting groups, and that necessary for Linblad master equation solving
merely aliasing the existing gadget Trotterisation
though it is unsure this should be the final interface; we can also accept jump operators given as projectors and diagonal matrices without much greater complexity, and SHOULD also deal with exponentiating general dense matrices.

This commit also includes a Trotter patch we'll commit separately to dev for publicity
in lieu of direct gadgets, for clarity
since it really only counts as imaginary-time evolution if the Hamiltonian is Hermitian - otherwise it's just sparkling non-unitary propagator Trotterisation
Trotterisation of a PauliStrSum gadget sees a density matrix operated upon by a sequence of PauliStr gadgets, each like
rho -> exp(i angle coeff term) rho exp(i angle coeff term)^dagger
where angle is a user-parameter, term is a PauliStr, and coeff is its coefficient in the PauliStrSum. In the linearised setting, this becomes:
||rho> -> conj[exp(i angle coeff term)] (x) exp(i angle coeff term) ||rho>

When the gadget is unitary (i.e. the PauliStrSum is Hermitian and the angle parameter is real), the dagger of the LHS operator above simplifies to
exp(+- i angle coeff term)
where the +- sign is admitted by conj(term), depending on the parity of the Y operators therein.

This simplification was erroneously used in the general case, when the PauliStrSum is not necessarily Hermitian and angle can be complex. In that general case, we have instead that the LHS operator's conjugation simplifies to:
exp(+- i conj(angle*coeff) term)

This patch corrects the argument of the prescribed gadget.
by replacing it with a function which directly answers the caller's question; what sign when multiplied upon the PauliStr produces its conjugate?
since the same facilities are anyway needed (with much better motivation) by Lindblad evolution
allowing the (potentially sub-optimal) expression of arbitrary operators like projectors, etc
@TysonRayJones TysonRayJones merged commit 6eec1cf into devel Aug 19, 2025
130 checks passed
@TysonRayJones TysonRayJones deleted the linblad-evolution branch August 19, 2025 15:57
@TysonRayJones TysonRayJones mentioned this pull request Oct 13, 2025
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