English
Languages
English
Bengali
Japanese
Shortcuts



QuadraticProgram.continuous_var

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

Adds a continuous variable to the quadratic program.

Parameters
  • lowerbound (Union[float, int]) – The lowerbound of the variable.

  • upperbound (Union[float, int]) – The upperbound of the variable.

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

Return type

Variable

Returns

The added variable.

Raises

QiskitOptimizationError – if the variable name is already occupied.