scqubits.core.operators.number_sparse#

scqubits.core.operators.number_sparse(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 size

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

Return type:

csc_matrix

Returns:

sparse number operator matrix, size dimension x dimension