dimod.QuadraticModel.variables#

property QuadraticModel.variables: Variables[source]#

The variables of the quadratic model.

Examples

>>> qm = dimod.QuadraticModel()
>>> qm.add_variable('INTEGER', 'i')
'i'
>>> qm.add_variable('BINARY')
1
>>> qm.add_variable('BINARY', 'y')
'y'
>>> qm.variables
Variables(['i', 1, 'y'])