qdk_chemistry.algorithms.hamiltonian_unitary_builder.time_evolution.zassenhaus_error module

Zassenhaus error bound estimation for accuracy-aware parameterization.

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

qdk_chemistry.algorithms.hamiltonian_unitary_builder.time_evolution.zassenhaus_error.zassenhaus_coefficient_sum(*, order, num_terms, commutator_exponents=None)[source]

Return the absolute coefficient sum for the first omitted exponent.

An order-p Zassenhaus approximation keeps correction exponents through C_p. The leading omitted local remainder is therefore C_{p+1}. For the naive bound we combine like symbolic commutators and use sum(abs(c_w)) over the terms in C_{p+1}.

Return type:

float

Parameters:
  • order (int)

  • num_terms (int)

  • commutator_exponents (Mapping[int, PlanExpr] | None)

qdk_chemistry.algorithms.hamiltonian_unitary_builder.time_evolution.zassenhaus_error.zassenhaus_omitted_commutator_norm(hamiltonian, *, order, weight_threshold)[source]

Return a Pauli 1-norm bound for the first omitted Zassenhaus exponent.

The returned value bounds ||C_{order + 1}(-i H_1, ..., -i H_m)||. Multiplication by powers of -i does not change the norm, so the Hamiltonian commutator DAG can be evaluated directly and scaled by the symbolic Zassenhaus coefficients.

Return type:

float

Parameters:
qdk_chemistry.algorithms.hamiltonian_unitary_builder.time_evolution.zassenhaus_error.zassenhaus_steps_commutator(hamiltonian, time, target_accuracy, *, order=1, weight_threshold=1e-12)[source]

Compute Zassenhaus steps using a commutator-aware bound.

An order-p Zassenhaus formula keeps exponents through C_p. The leading local remainder is the omitted exponent C_{p+1}. This bound evaluates that omitted exponent as an actual nested-commutator expression over the Hamiltonian’s Pauli terms, rather than replacing every commutator by a worst-case triangle-inequality estimate. If beta = ||C_{p+1}(-iH_1, ..., -iH_m)|| is bounded by the Pauli coefficient 1-norm, then N time slices give

\[\epsilon \le \frac{\beta |t|^{p+1}}{N^p}.\]
Parameters:
  • hamiltonian (QubitOperator) – 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 Zassenhaus formula.

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

Returns:

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

Raises:

ValueError – If target_accuracy is not positive or order is not positive.

Return type:

int

qdk_chemistry.algorithms.hamiltonian_unitary_builder.time_evolution.zassenhaus_error.zassenhaus_steps_naive(hamiltonian, time, target_accuracy, *, order=1, weight_threshold=1e-12, commutator_exponents=None)[source]

Compute the number of Zassenhaus steps using a naive bound.

This triangle-inequality estimate uses the Hamiltonian coefficient 1-norm and treats an order-p Zassenhaus formula as having local remainder scaling like O(t ** (p + 1)). The leading local remainder is the first omitted Zassenhaus exponent C_{p+1}, whose combined symbolic commutator coefficients are bounded by \(\kappa_{p+1} = \sum_w |c_w|\). Applying \(\|[A, B]\| \le 2 \|A\| \|B\|\) repeatedly gives:

\[\epsilon \le \frac{\kappa_{p+1} 2^p \|H\|_1^{p+1} |t|^{p+1}}{N^p}.\]

After splitting the total simulation time into N steps, the minimum naive step count is:

\[N = \left\lceil \frac{(\kappa_{p+1} 2^p \|H\|_1^{p+1})^{1/p} |t|^{1+1/p}}{\epsilon^{1/p}} \right\rceil .\]
Parameters:
  • hamiltonian (QubitOperator) – 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 Zassenhaus formula.

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

  • commutator_exponents (Mapping[int, dict[Hashable | CommutatorNode, Fraction]] | None) – Precomputed mapping from zassenhaus_commutator_plan; must include order + 1.

Returns:

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

Raises:

ValueError – If target_accuracy is not positive or order is not positive.

Return type:

int