BaseTransformer#
- class BaseTransformer[source]#
Bases:
ABCThe interface for implementing methods which map from one
BaseProblemto another. These methods may affect the size of the Hilbert space.Methods
- abstract transform(problem)[source]#
Transforms one
BaseProbleminto 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:
- abstract transform_hamiltonian(hamiltonian)[source]#
Transforms one
Hamiltonianinto 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