pygsti.tools.matrixtools.column_basis_vector

pygsti.tools.matrixtools.column_basis_vector#

column_basis_vector(i, dim)#

Returns the ith standard basis vector in dimension dim.

Parameters:
  • i (int) – Basis vector index.

  • dim (int) – Vector dimension.

Returns:

An array of shape (dim, 1) that is all zeros except for its i-th element, which equals 1.

Return type:

numpy.ndarray