sf.math.block_diag¶
- math.block_diag(mat2)¶
Returns a block diagonal matrix from the given matrices.
- Parameters:
mat1 (
ndarray[Tuple[int,int],Union[TypeVar(R,float16,float32,float64),TypeVar(C,complex64,complex128),TypeVar(Z,int16,int32,int64),TypeVar(N,uint16,uint32,uint64)]]) – A matrix.mat2 (
ndarray[Tuple[int,int],Union[TypeVar(R,float16,float32,float64),TypeVar(C,complex64,complex128),TypeVar(Z,int16,int32,int64),TypeVar(N,uint16,uint32,uint64)]]) – A matrix.
- Return type:
ndarray[Tuple[int,int],Union[TypeVar(R,float16,float32,float64),TypeVar(C,complex64,complex128),TypeVar(Z,int16,int32,int64),TypeVar(N,uint16,uint32,uint64)]]- Returns:
A block diagonal matrix from the given matrices.
code/api/mrmustard.math.block_diag
Download Python script
Download Notebook
View on GitHub