Spanish
Idiomas
English
Bengali
Japanese
Spanish



QuadraticProgram.binary_var

QuadraticProgram.binary_var(name=None)[fuente]

Adds a binary variable to the quadratic program.

Parámetros:

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