pygsti.baseobjs.basisconstructors.mut

Contents

pygsti.baseobjs.basisconstructors.mut#

mut(i, j, n)#

A matrix unit.

Parameters:
  • i (int) – Row of the single “1” in the matrix unit.

  • j (int) – Column of the single “1” in the matrix unit.

  • n (int) – Dimension of matrix

Returns:

A (n,n)-shaped array that is all zeros except a single “1” in the i,`j` element.

Return type:

numpy.ndarray