ClassicalCPLEX¶
- class ClassicalCPLEX(operator, timelimit=600, thread=1, display=2)[source]¶
The Classical CPLEX algorithm (classical).
This algorithm uses the IBM ILOG CPLEX Optimization Studio along with its separately installed Python API to solve optimization problems modeled as an Ising Hamiltonian.
See these
installation instructions
if you need more information in that regard.- Parameters
operator (
WeightedPauliOperator
) – The Ising Hamiltonian as an Operatortimelimit (
int
) – A time limit in seconds for the executionthread (
int
) – The number of threads that CPLEX uses. Setting this 0 lets CPLEX decide the number of threads to allocate, but this may not be ideal for small problems for which the default of 1 is more suitable.display (
int
) – Decides what CPLEX reports to the screen and records in a log during mixed integer optimization. This value must be between 0 and 5 where the amount of information displayed increases with increasing values of this parameter.
Attributes
Return a numpy random.
return solution
Methods
Execute the classical algorithm.