neurop.base.BaseCompiler¶
- class neurop.base.BaseCompiler(problem: BaseProblem, modelType: type, backend: BaseBackend = None, expansion=None)¶
Bases:
object
Base-class for compilers that can convert optimization problems to models and compile models to a specific backend.
- __init__(problem: BaseProblem, modelType: type, backend: BaseBackend = None, expansion=None) None ¶
Methods
__init__
(problem, modelType[, backend, ...])compile
()Exports the problem into the given model type, respecting the backend, if given.
model_to_problem_parameters
(params)Converts the model parameters to problem parameters.
problem_to_model_parameters
(params)Converts the problem parameters to model parameters.
- compile() BaseModel ¶
Exports the problem into the given model type, respecting the backend, if given.
- model_to_problem_parameters(params)¶
Converts the model parameters to problem parameters.
- problem_to_model_parameters(params)¶
Converts the problem parameters to model parameters.