Variable¶
- class Variable(quadratic_program, name, lowerbound=0, upperbound=1e+20, vartype=VarType.CONTINUOUS)[fuente]¶
Bases:
QuadraticProgramElement
Representation of a variable.
Creates a new Variable.
The variables is exposed by the top-level QuadraticProgram class in QuadraticProgram.variables. This constructor is not meant to be used externally.
- Parámetros:
- Muestra:
QiskitOptimizationError – if lowerbound is greater than upperbound.
Attributes
Returns the lowerbound of the variable.
Returns the name of the variable.
Returns the parent QuadraticProgram.
Returns the upperbound of the variable.
Returns the type of the variable.
Methods
as_tuple
()Returns a tuple corresponding to this variable.