BaseTransformer#

class BaseTransformer[source]#

Bases: ABC

The interface for implementing methods which map from one BaseProblem to another. These methods may affect the size of the Hilbert space.

Methods

abstract transform(problem)[source]#

Transforms one BaseProblem into another. This may affect the size of the Hilbert space.

Parameters:

problem (BaseProblem) – the problem to be transformed.

Raises:

NotImplementedError – when an unsupported problem type is provided.

Returns:

A new BaseProblem instance.

Return type:

BaseProblem

abstract transform_hamiltonian(hamiltonian)[source]#

Transforms one Hamiltonian into another. This may affect the size of the Hilbert space.

Parameters:

hamiltonian (Hamiltonian) – the hamiltonian to be transformed.

Raises:

NotImplementedError – when an unsupported hamiltonian type is provided.

Returns:

A new Hamiltonian instance.

Return type:

Hamiltonian