QuadraticProgram.integer_var

QuadraticProgram.integer_var(lowerbound=0, upperbound=1e+20, name=None)[fuente]

Adds an integer variable to the quadratic program.

Parámetros:
  • lowerbound (float | int) – The lowerbound of the variable.

  • upperbound (float | int) – The upperbound of the variable.

  • name (str | None) – The name of the variable. If it’s None or empty "", the default name, e.g., x0, is used.

Devuelve:

The added variable.

Muestra:

QiskitOptimizationError – if the variable name is already occupied.

Tipo del valor devuelto:

Variable