qdk_chemistry.algorithms.time_evolution.builder.trotter_error module

Trotter error bound estimation for accuracy-aware parameterization.

This module provides functions to compute the number of Trotter steps required to achieve a target accuracy for product-formula decompositions.

Two bounds are offered:

  • naive - uses the triangle-inequality bound \(N = \\lceil (\\sum_j |\\alpha_j|)^2 t^2 / \\epsilon \\rceil\).

  • commutator (tighter) - uses the commutator-based bound from Childs et al. (2021): \(N = \\lceil \\frac{t^2}{2\\epsilon} \\sum_{j<k} \\lVert [\\alpha_j P_j, \\alpha_k P_k] \\rVert \\rceil\).

References

Childs, A. M., et al. “Theory of Trotter Error with Commutator Scaling.” Physical Review X 11.1 (2021): 011020. https://arxiv.org/abs/1912.08854

qdk_chemistry.algorithms.time_evolution.builder.trotter_error.trotter_steps_commutator(hamiltonian, time, target_accuracy, *, order=1, weight_threshold=1e-12)[source]

Compute the number of Trotter steps using the commutator bound.

The tighter commutator-based bound from Childs et al. (2021) is

\[ \begin{align}\begin{aligned}N_1 = \left\lceil \frac{\alpha_1 t^2}{2\epsilon}\right\rceil\\\alpha_1 = \sum_{j<k} \lVert [\alpha_j P_j,\, \alpha_k P_k] \rVert\\N_2 = \left\lceil \frac{t^{3/2}\alpha_2^{1/2}}{(12\epsilon)^{1/2}} \right\rceil\\\alpha_2 = \sum_{k > j,l > j} \lVert [\alpha_l P_l,\, [\alpha_k P_k,\, \alpha_j P_j] \rVert + \frac{1}{2} \sum_{k > j} \lVert [\alpha_j P_j,\, [\alpha_j P_j,\, \alpha_k P_k] \rVert\\N_p = \left\lceil \frac{t^{1+1/p}\alpha_p^{1/p}}{\epsilon^{1/p}} \right\rceil\\\alpha_p = \sum_{j_1,\ldots,j_{p+1}} \lVert [\alpha_{j_1} P_{j_1},\, [\ldots [\alpha_{j_p} P_{j_p}, \alpha_{j_{p+1}}P_{j_{p+1}}]\ldots]\rVert\end{aligned}\end{align} \]

For Pauli strings the commutator norm is \(2|\alpha_j||\alpha_k|\) when the pair anticommutes and 0 when it commutes. This bound is never looser than the naive bound and can be substantially tighter when many terms commute.

Parameters:
  • hamiltonian (QubitHamiltonian) – The qubit Hamiltonian to simulate.

  • time (float) – The total evolution time t.

  • target_accuracy (float) – The target accuracy \(\epsilon > 0\).

  • order (int) – The order of the Trotter-Suzuki product formula.

  • weight_threshold (float) – Absolute threshold below which coefficients are discarded.

Returns:

The minimum number of Trotter steps (at least 1).

Raises:
Return type:

int

qdk_chemistry.algorithms.time_evolution.builder.trotter_error.trotter_steps_naive(hamiltonian, time, target_accuracy, *, order=1, weight_threshold=1e-12)[source]

Compute the number of Trotter steps using the naive bound.

The naive (triangle-inequality) bound is

\[N = \left\lceil \frac{2(\sum_j |\alpha_j|)^{1 + 1/p} \, t^{1+1/p}} {\epsilon^{1/p}} \right\rceil\]

where \(\sum_j |\alpha_j|\) is the 1-norm of the Hamiltonian coefficients, \(p\) is the order of the Trotter-Suzuki product formula.

Parameters:
  • hamiltonian (QubitHamiltonian) – The qubit Hamiltonian to simulate.

  • time (float) – The total evolution time t.

  • target_accuracy (float) – The target accuracy \(\epsilon > 0\).

  • order (int) – The order of the Trotter-Suzuki product formula.

  • weight_threshold (float) – Absolute threshold below which coefficients are discarded.

Returns:

The minimum number of Trotter steps (at least 1).

Raises:
Return type:

int