Suzuki Trotter
The suzuki_trotter
function produces the Suzuki-Trotter product for a given order and repetitions.
Function: suzuki_trotter
Arguments:
-
pauli_operator
:CArray[PauliTerm]
-
evolution_coefficient
:CReal
-
order
:CInt
, -
repetitions
:CInt
, -
qbv
:QArray[QBit]
Example
from classiq import (
CReal,
Output,
Pauli,
PauliTerm,
QArray,
QBit,
allocate,
create_model,
qfunc,
suzuki_trotter,
synthesize,
write_qmod,
)
@qfunc
def main(a: CReal, x: CReal, qba: Output[QArray[QBit]]):
allocate(3, qba)
suzuki_trotter(
[
PauliTerm(pauli=[Pauli.X, Pauli.X, Pauli.Z], coefficient=a),
PauliTerm(pauli=[Pauli.Y, Pauli.X, Pauli.Z], coefficient=0.5),
],
evolution_coefficient=x,
order=1,
repetitions=1,
qbv=qba,
)
qmod = create_model(main)
write_qmod(qmod, "suzuki_trotter")
qprog = synthesize(qmod)
References
[1] N. Hatano and M. Suzuki, Finding Exponential Product Formulas of Higher Orders, (2005). https://arxiv.org/abs/math-ph/0506007