> ## Documentation Index
> Fetch the complete documentation index at: https://prod-mint.classiq.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Suzuki Trotter

<Card title="View on GitHub" icon="github" href="https://github.com/Classiq/classiq-library/blob/main/functions/qmod_library_reference/qmod_core_library/hamiltonian_evolution/suzuki_trotter/suzuki_trotter.ipynb">
  Open this notebook in GitHub to run it yourself
</Card>

The `suzuki_trotter` function produces the Suzuki-Trotter product for a given order and repetitions.

Given a Hamiltonian as a sum of Pauli strings

$$
H = \sum^L_{k=1} \alpha_k H_k,
$$

the Suzuki-Trotter formula of order $o$ and repetitions $r$ approximates the Hamiltonian simulation $U = e^{-iHt}$ according to the following:

* Each order $ST^{(o)}(H,t)$ is defined recursively:

* The first order is : $ST^{(1)}(H,t) = \Pi^L_{k=1} e^{-iH_k t}$

* The second order is : $ST^{(2)}(H,t)  = \Pi^L_{k=1} e^{-iH_k t/2} \Pi^1_{k=L} e^{-iH_k t/2}$

* Recursion formula for order $2m$ with $m>1$ is given in Eq. (5) of Ref. \[[2](#childs)]

* For a given order, repetitions refers to

$$
ST^{(o,r)}(H,t) = [ST^{(o)}(H,t/r)]^r.

$$

Function: `suzuki_trotter`

Arguments:

* `pauli_operator`: `CArray[PauliTerm]`
* `evolution_coefficient`: `CReal`
* `order`: `CInt`,
* `repetitions`: `CInt`,
* `qbv`: `QArray[QBit]`

## Example

```python theme={null}
from classiq import *


@qfunc
def main(x: CReal, qba: Output[QArray[QBit]]):
    allocate(3, qba)
    suzuki_trotter(
        [
            PauliTerm(pauli=[Pauli.X, Pauli.X, Pauli.Z], coefficient=1.5),
            PauliTerm(pauli=[Pauli.Y, Pauli.X, Pauli.Z], coefficient=0.5),
        ],
        evolution_coefficient=x,
        order=1,
        repetitions=1,
        qbv=qba,
    )


qmod = create_model(main)
qprog = synthesize(qmod)
```

## References

<a name="Trotter-Suzuki">\[1]</a> N. Hatano and M. Suzuki, Finding Exponential Product Formulas of Higher Orders, (2005). [https://arxiv.org/abs/math-ph/0506007](https://arxiv.org/abs/math-ph/0506007)

<a name="Childs">\[2]</a> Childs, et al., Toward the first quantum simulation with quantum speedup, (2018). [https://arxiv.org/abs/1711.10980](https://arxiv.org/abs/1711.10980)
