2
$\begingroup$

Since qiskit.opflow has been deprecated, the way I used to generate a UCC ansatz was to use (Parameter('t') * Pauli('some Pauli')).exp_i(). Now this is not possible, and I am unsure how to exponential my SparsePauliOp. If I have a parameterized SparsePauliOp such as SparsePauliOp(['XZ', 'YZ'], coeffs=[ParameterExpression(1.0*a), ParameterExpression(1.0*b)]) for some a, b = Parameter('a'), Parameter('b'), how do I exponentiate this to get exp(-i(XZ*a + YZ * b)) which I could then Trotterize to decompose into gates?

$\endgroup$

1 Answer 1

0
$\begingroup$

Take a look at PauliEvolutionGate. The UCC from Qiskit Nature in based on Qiskit's EvolvedOperatorAnsatz which in turn is built using PauliEvolutionGate.

There is also a migration guide done as opflow was deprecated, which has a section on evolution.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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