qdk_chemistry.algorithms.hamiltonian_unitary_builder.base module

QDK/Chemistry Hamiltonian unitary builder abstractions.

class qdk_chemistry.algorithms.hamiltonian_unitary_builder.base.HamiltonianUnitaryBuilder[source]

Bases: Algorithm

Base class for Hamiltonian unitary builders in QDK/Chemistry algorithms.

__init__()[source]

Initialize the HamiltonianUnitaryBuilder.

run(*args, **kwargs)

Run the algorithm with the provided arguments.

This method wraps the internal _run_impl method to provide a consistent interface for executing the algorithm.

Parameters:
  • args – The arguments required to run the algorithm.

  • kwargs – The keyword arguments required to run the algorithm.

Returns:

The results of the algorithm

Return type:

Any

class qdk_chemistry.algorithms.hamiltonian_unitary_builder.base.HamiltonianUnitaryBuilderFactory[source]

Bases: AlgorithmFactory

Factory class for creating HamiltonianUnitaryBuilder instances.

algorithm_type_name()[source]

Return hamiltonian_unitary_builder as the algorithm type name.

Return type:

str

default_algorithm_name()[source]

Return Trotter as the default algorithm name.

Return type:

str

class qdk_chemistry.algorithms.hamiltonian_unitary_builder.base.HamiltonianUnitaryBuilderSettings[source]

Bases: Settings

Base settings for Hamiltonian unitary builders.

__init__()[source]

Initialize HamiltonianUnitaryBuilderSettings with default values.

power

The exponent to which the unitary is raised.

class qdk_chemistry.algorithms.hamiltonian_unitary_builder.base.TimeEvolutionBuilder[source]

Bases: HamiltonianUnitaryBuilder

Base class for time evolution Builders in QDK/Chemistry algorithms.

__init__()[source]

Initialize the TimeEvolutionBuilder.

run(*args, **kwargs)

Run the algorithm with the provided arguments.

This method wraps the internal _run_impl method to provide a consistent interface for executing the algorithm.

Parameters:
  • args – The arguments required to run the algorithm.

  • kwargs – The keyword arguments required to run the algorithm.

Returns:

The results of the algorithm

Return type:

Any

class qdk_chemistry.algorithms.hamiltonian_unitary_builder.base.TimeEvolutionSettings[source]

Bases: HamiltonianUnitaryBuilderSettings

Base settings for time evolution builders.

__init__()[source]

Initialize TimeEvolutionSettings with default values.

time

The evolution time.

power_strategy

The strategy to construct \(U^{\\text{power}}\):

  • "rescale": produce a single step with effective time \(t \\cdot \\text{power}\).

  • "repeat": repeat the base \(U(t)\) power times.