2
$\begingroup$

In Qiskit, how do I construct a circuit corresponding to the Trotter expansion of a Pauli sum $A+B+C+\ldots$ given as a WightedPauliSum object?

$$ \operatorname{e}^{A + B + C + \ldots } \overset{?}{\mapsto} \left\{\begin{alignedat}{9} U &= \operatorname{e}^{A}\operatorname{e}^{B}\operatorname{e}^{C}\ldots \ &&, \quad &&\text{(first order)}\\ U &= \operatorname{e}^{A/2}\operatorname{e}^{B/2}\operatorname{e}^{C/2}\ldots\operatorname{e}^{C/2}\operatorname{e}^{B/2}\operatorname{e}^{A/2} \ &&, \quad &&\text{(second order)}\\ & \ldots \end{alignedat}\right. $$ I guess, PauliTrotterEvolution should do the job, but I have not found a tutorial.

$\endgroup$
1
$\begingroup$

Looks like this works:

qc_trotter = paulistring.evolve( evo_time = 1, 
                                 expansion_order = 2)

where qc_trotter is an object of type WeightedPauliOperator, see here.

Be mindful though that using circuits generated in this way may sometimes result in errors, as reported here.

$\endgroup$
1
  • $\begingroup$ Please add some details, for example link to used function documentation etc. $\endgroup$ Jun 11 '20 at 9:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.