deltakit.explorer.codes.Polynomial.from_vec#

static Polynomial.from_vec(vec: list[int], l, m) Polynomial#

Create a Polynomial from a binary vector.

Parameters:
  • vec (List[int]) – Binary vector, of the form of a List of integer entries 0 or 1. The vector is interpreted as the indices of the qubits that are represented by the Polynomial. E.g, index 0 in the vector is qubit 0, index 1 is qubit 1, and a 0 or 1 in these indices indicates whether that qubit is a part of the polynomial or not.

  • l (int) – Max dimension of x component.

  • m (int) – Max dimension of y component.

Returns:

Polynomial from the vector with monomial elements corresponding to the position of each 1 in the vector.

Return type:

Polynomial