Skip to content

bloqade.analog.emulate.sparse_operator.IndexMapping

← Module overview

classIndexMappingsource

bloqade.analog.emulate.sparse_operator.IndexMapping

Signature
class IndexMapping(n_row: int, row_indices: Union[NDArray, slice], col_indices: Union[NDArray, slice])

Parameters

NameTypeDescription
n_rowint
row_indicesUnion[NDArray, slice]
col_indicesUnion[NDArray, slice]

Attributes

NameTypeDescription
n_rowint
row_indicesUnion[NDArray, slice]
col_indicesUnion[NDArray, slice]

propertyTsource

bloqade.analog.emulate.sparse_operator.IndexMapping.T

T: IndexMapping
source

methodmatvecsource

bloqade.analog.emulate.sparse_operator.IndexMapping.matvec

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

Parameters

NameTypeDefaultDescription
other—required
out—None
scale—1
source

methodtocoosource

bloqade.analog.emulate.sparse_operator.IndexMapping.tocoo

def tocoo() -> coo_matrix

Returns

coo_matrix

source

methodtocscsource

bloqade.analog.emulate.sparse_operator.IndexMapping.tocsc

def tocsc()
source

methodtocsrsource

bloqade.analog.emulate.sparse_operator.IndexMapping.tocsr

def tocsr()
source