Variable#
- class Variable(quadratic_program, name, lowerbound=0, upperbound=1e+20, vartype=VarType.CONTINUOUS)[source]#
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.
- প্যারামিটার:
- রেইজেস:
QiskitOptimizationError -- if lowerbound is greater than upperbound.
Attributes
- lowerbound#
Returns the lowerbound of the variable.
- রিটার্নস:
The lower bound of the variable.
- name#
Returns the name of the variable.
- রিটার্নস:
The name of the variable.
- quadratic_program#
Returns the parent QuadraticProgram.
- রিটার্নস:
The parent QuadraticProgram.
- upperbound#
Returns the upperbound of the variable.
- রিটার্নস:
The upperbound of the variable.
- vartype#
Returns the type of the variable.
- রিটার্নস:
The variable type.
Methods