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-
pZassenhaus approximation keeps correction exponents throughC_p. The leading omitted local remainder is thereforeC_{p+1}. For the naive bound we combine like symbolic commutators and usesum(abs(c_w))over the terms inC_{p+1}.
- 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-idoes not change the norm, so the Hamiltonian commutator DAG can be evaluated directly and scaled by the symbolic Zassenhaus coefficients.- Return type:
- Parameters:
hamiltonian (QubitOperator)
order (int)
weight_threshold (float)
- 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-
pZassenhaus formula keeps exponents throughC_p. The leading local remainder is the omitted exponentC_{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. Ifbeta = ||C_{p+1}(-iH_1, ..., -iH_m)||is bounded by the Pauli coefficient 1-norm, thenNtime 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_accuracyis not positive ororderis not positive.- Return type:
- 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-
pZassenhaus formula as having local remainder scaling likeO(t ** (p + 1)). The leading local remainder is the first omitted Zassenhaus exponentC_{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
Nsteps, 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_accuracyis not positive ororderis not positive.- Return type: