Skip to content

Commit 01c51e1

Browse files
committed
patched non-unitary Trotter on density matrix
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.
1 parent 315ea41 commit 01c51e1

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

quest/src/api/trotterisation.cpp

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ void internal_applyFirstOrderTrotterRepetition(
3737
qcomp coeff = sum.coeffs[j];
3838
PauliStr str = sum.strings[j];
3939

40-
// effect |psi> -> exp(i angle * sum)|psi>
40+
// effect |psi> -> exp(i angle * coeff * term)|psi>
4141
qcomp arg = angle * coeff;
4242
localiser_statevec_anyCtrlPauliGadget(qureg, ketCtrls, states, str, arg);
4343

@@ -49,8 +49,10 @@ void internal_applyFirstOrderTrotterRepetition(
4949
if (!postmultiply)
5050
continue;
5151

52-
// effect rho -> rho dagger(i angle * sum)
53-
arg *= paulis_hasOddNumY(str) ? 1 : -1;
52+
// effect rho -> rho exp(i angle * coeff * term)^dagger via linearised
53+
// ||rho>> -> conj(exp(i angle * coeff * term)) (x) I ||rho>>
54+
// = exp(+- i conj(angle) conj(coeff) term) (x) I ||rho>>
55+
arg = std::conj(arg) * (paulis_hasOddNumY(str) ? 1 : -1);
5456
str = paulis_getShiftedPauliStr(str, qureg.numQubits);
5557
localiser_statevec_anyCtrlPauliGadget(qureg, braCtrls, states, str, arg);
5658
}

0 commit comments

Comments
 (0)