scqubits.core.operators.number#

scqubits.core.operators.number(dimension, prefactor=None)[source]#

Number operator matrix of size dimension x dimension in sparse matrix representation. An additional prefactor can be directly included in the generation of the matrix by supplying ‘prefactor’.

Parameters:
  • dimension (int) – matrix dimension

  • prefactor (Union[float, complex, None]) – prefactor multiplying the number operator matrix

Return type:

ndarray

Returns:

number operator matrix, size dimension x dimension