bloqade.analog.emulate.sparse_operator.SparseMatrixCSR
← Module overview
class
method
sourcemethod
sourcemethod
sourceproperty
method
source
classSparseMatrixCSR¶source
bloqade.analog.emulate.sparse_operator.SparseMatrixCSR
Signature
class SparseMatrixCSR(data: NDArray, indices: NDArray, indptr: NDArray, shape: tuple[int, int])Parameters
| Name | Type | Description |
|---|---|---|
data | NDArray | |
indices | NDArray | |
indptr | NDArray | |
shape | tuple[int, int] |
Attributes
| Name | Type | Description |
|---|---|---|
data | NDArray | |
indices | NDArray | |
indptr | NDArray | |
shape | tuple[int, int] |
methodcreate¶source
bloqade.analog.emulate.sparse_operator.SparseMatrixCSR.create
def create(arg1, shape=None, dtype=None, copy=False) -> SparseMatrixCSRParameters
| Name | Type | Default | Description |
|---|---|---|---|
arg1 | — | required | |
shape | — | None | |
dtype | — | None | |
copy | — | False |
Returns
SparseMatrixCSR
methodtocsr¶source
bloqade.analog.emulate.sparse_operator.SparseMatrixCSR.tocsr
def tocsr()methodtoarray¶source
bloqade.analog.emulate.sparse_operator.SparseMatrixCSR.toarray
def toarray()propertyT¶source
bloqade.analog.emulate.sparse_operator.SparseMatrixCSR.T
methodmatvec¶source
bloqade.analog.emulate.sparse_operator.SparseMatrixCSR.matvec
def matvec(other, out=None, scale=1)Parameters
| Name | Type | Default | Description |
|---|---|---|---|
other | — | required | |
out | — | None | |
scale | — | 1 |