Spin-valued version of the binary quadratic model.

If the binary quadratic model is spin-valued, this references itself, otherwise it references a view.

Examples

This example exploits the simplicity of the Ising representation of a Boolean NOT gate, $$s_1s_2$$, relative to its QUBO counterpart, $$2x_1x_2−x_1−x_2+1$$, to change a QUBO representation of an AND gate, derived in the Ocean documentation’s AND example, to represent a NAND gate.

>>> Q = [[0, 1, -2], [0, 0, -2], [0, 0, 3]]
>>> x = dimod.BinaryArray(["in1", "in2", "out_and"])
>>> bqm = x.dot(Q).dot(x)               # bqm represents an AND gate