amplify.convert_to_matrix

convert_to_matrix(poly, size=None)

Converts Poly class to Matrix class.

Parameters:
  • poly – Poly class.

  • size (int, optional) – matrix size.

Returns:

matrix class

Note

The correspondence between Poly class and Matrix class is described as follows.

poly

matrix

BinaryPoly

BinaryMatrix

BinaryIntPoly

BinaryIntMatrix

IsingPoly

IsingMatrix

IsingIntPoly

IsingIntMatrix