Skip to main contentIBM Quantum Documentation
This page is from an old version of Qiskit SDK and does not exist in the latest version. We recommend you migrate to the latest version. See the release notes for more information.

qiskit.aqua.algorithms.ClassicalCPLEX

class ClassicalCPLEX(operator, timelimit=600, thread=1, display=2)

GitHub

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 Operator
  • timelimit (int) – A time limit in seconds for the execution
  • thread (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.

__init__

__init__(operator, timelimit=600, thread=1, display=2)

Parameters

  • operator (WeightedPauliOperator) – The Ising Hamiltonian as an Operator
  • timelimit (int) – A time limit in seconds for the execution
  • thread (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.

Methods

__init__(operator[, timelimit, thread, display])type operatorWeightedPauliOperator
run()Execute the classical algorithm.

Attributes

randomReturn a numpy random.
solutionreturn solution

random

Return a numpy random.

run

run()

Execute the classical algorithm.

Returns

results of an algorithm.

Return type

dict

solution

return solution

Was this page helpful?
Report a bug or request content on GitHub.