dwave.optimization.model.Model.binary#

Model.binary(shape=None)#

Create a binary symbol as a decision variable.

Parameters:

shape – Shape of the binary array to create.

Returns:

A binary symbol.

Examples

This example creates a \(1 \times 20\)-sized binary symbol.

>>> from dwave.optimization.model import Model
>>> model = Model()
>>> x = model.binary((1,20))