dimod.higherorder.polynomial.BinaryPolynomial.to_spin

BinaryPolynomial.to_spin(copy=False)[source]

Return a binary polynomial over {-1, +1} variables.

Parameters:copy (optional, default=False) – If True, the returned polynomial is always a copy. Otherwise, if the polynomial is spin-valued already it returns itself.
Returns:BinaryPolynomial