Skip to content

bloqade.analog.emulate.sparse_operator.SparseMatrixCSC

← Module overview

classSparseMatrixCSCsource

bloqade.analog.emulate.sparse_operator.SparseMatrixCSC

Signature
class SparseMatrixCSC(data: NDArray, indices: NDArray, indptr: NDArray, shape: tuple[int, int])

Parameters

NameTypeDescription
dataNDArray
indicesNDArray
indptrNDArray
shapetuple[int, int]

Attributes

NameTypeDescription
dataNDArray
indicesNDArray
indptrNDArray
shapetuple[int, int]

methodcreatesource

bloqade.analog.emulate.sparse_operator.SparseMatrixCSC.create

def create(arg1, shape=None, dtype=None, copy=False) -> SparseMatrixCSC

Parameters

NameTypeDefaultDescription
arg1—required
shape—None
dtype—None
copy—False

Returns

SparseMatrixCSC

source

methodtocsrsource

bloqade.analog.emulate.sparse_operator.SparseMatrixCSC.tocsr

def tocsr()
source

methodtoarraysource

bloqade.analog.emulate.sparse_operator.SparseMatrixCSC.toarray

def toarray()
source

propertyTsource

bloqade.analog.emulate.sparse_operator.SparseMatrixCSC.T

methodmatvecsource

bloqade.analog.emulate.sparse_operator.SparseMatrixCSC.matvec

def matvec(other, out=None, scale=1)

Parameters

NameTypeDefaultDescription
other—required
out—None
scale—1
source