qlinks.backends package#
Submodules#
qlinks.backends.sparse module#
- class qlinks.backends.sparse.SparseBackend(*args, **kwargs)[source]#
Bases:
ProtocolMinimal backend protocol for sparse Hamiltonian construction.
- __init__(*args, **kwargs)#
- class qlinks.backends.sparse.ScipySparseBackend(name='scipy')[source]#
Bases:
objectSciPy sparse backend used by default Hamiltonian builders.
The backend normalizes sparse-matrix construction behind a small protocol so model/build code can also target CuPy when available.
- __init__(name='scipy')#
- class qlinks.backends.sparse.CupySparseBackend(name='cupy')[source]#
Bases:
objectCuPy/CuPyX sparse backend.
Imported lazily so qlinks does not require CuPy unless backend=”cupy” is used.
Note
cupyx.scipy.sparse currently follows the scipy sparse matrix-style API more closely than scipy’s newer sparse array API. Therefore this backend creates cupyx.scipy.sparse.coo_matrix/csr_matrix, not csr_array.
- property cp#
- property cupyx_sparse#
- __init__(name='cupy')#
Module contents#
- class qlinks.backends.CupySparseBackend(name='cupy')[source]#
Bases:
objectCuPy/CuPyX sparse backend.
Imported lazily so qlinks does not require CuPy unless backend=”cupy” is used.
Note
cupyx.scipy.sparse currently follows the scipy sparse matrix-style API more closely than scipy’s newer sparse array API. Therefore this backend creates cupyx.scipy.sparse.coo_matrix/csr_matrix, not csr_array.
- property cp#
- property cupyx_sparse#
- __init__(name='cupy')#
- class qlinks.backends.ScipySparseBackend(name='scipy')[source]#
Bases:
objectSciPy sparse backend used by default Hamiltonian builders.
The backend normalizes sparse-matrix construction behind a small protocol so model/build code can also target CuPy when available.
- __init__(name='scipy')#