qdk_chemistry.algorithms.hamiltonian_unitary_builder.time_evolution.zassenhaus module

Zassenhaus product-formula decomposition builder.

This module implements the Zassenhaus time evolution builder. The Zassenhaus formula decomposes the unitary time evolution operator exp(-i H t) into a sequence of exponentiated Pauli terms, structured with higher-order commutator corrections.

It supports: * Custom evolution order (supporting orders 2, 3, and 4). * Automatic step count computation under naive or commutator-aware bounds. * Dynamic selection of the optimal Zassenhaus order to minimize total gate count.

class qdk_chemistry.algorithms.hamiltonian_unitary_builder.time_evolution.zassenhaus.Zassenhaus(order=2, *, time=0.0, target_accuracy=0.0, num_divisions=0, error_bound='commutator', weight_threshold=1e-12, power=1, power_strategy='repeat', term_grouper=None)[source]

Bases: TimeEvolutionBuilder

Zassenhaus decomposition builder.

Parameters:
__init__(order=2, *, time=0.0, target_accuracy=0.0, num_divisions=0, error_bound='commutator', weight_threshold=1e-12, power=1, power_strategy='repeat', term_grouper=None)[source]

Initialize Zassenhaus builder with specified Zassenhaus decomposition settings.

Parameters:
  • order (int) – Zassenhaus decomposition order (1, 2, 3, 4). Defaults to 2.

  • time (float) – The evolution time. Defaults to 0.0.

  • target_accuracy (float) – Target accuracy for auto step computation. Use 0.0 (default) to disable.

  • num_divisions (int) – Repeated Zassenhaus time slices. Max of this and auto value is used. Defaults to 0.

  • error_bound (str) – Error bound strategy: "commutator" (default) or "naive".

  • weight_threshold (float) – Threshold for filtering small coefficients. Defaults to 1e-12.

  • power (int) – The power to raise the unitary to. Defaults to 1.

  • power_strategy (str) – Strategy for U^power: "rescale" or "repeat" (default).

  • term_grouper (AlgorithmRef | None) – Optional algorithm reference for the term grouper.

name()[source]

Return the name of the unitary builder.

Return type:

str

type_name()[source]

Return hamiltonian_unitary_builder as the algorithm type name.

Return type:

str

class qdk_chemistry.algorithms.hamiltonian_unitary_builder.time_evolution.zassenhaus.ZassenhausSettings[source]

Bases: TimeEvolutionSettings

Settings for the Zassenhaus decomposition builder.

__init__()[source]

Initialize ZassenhausSettings with default values.

order

The order of the Zassenhaus decomposition.

target_accuracy

Target accuracy for automatic step computation (0.0 means disabled).

num_divisions

Explicit number of repeated Zassenhaus time slices (0 means automatic).

error_bound

Strategy for computing the Zassenhaus error bound (“commutator” or “naive”).

weight_threshold

The absolute threshold for filtering small coefficients.