triqs.operators.util.extractors.op_from_block_matrix
- triqs.operators.util.extractors.op_from_block_matrix()
Dispatched C++ function(s).
[1] (bl_mat: ndarray[ndarray[float | complex, 2], 1], gf_struct: [tuple[str, int]]) -> Operator
Build a block-diagonal quadratic operator from its block-matrix representation.
Given the block matrices \(h_{\sigma ij}\) and the block structure, returns
\[\hat{h} = \sum_{\sigma ij} h_{\sigma ij} \hat{c}_{\sigma, i}^\dagger \hat{c}_{\sigma, j} \; .\]- Parameters:
- bl_matndarray[ndarray[float | complex, 2], 1]
One matrix \(h_{\sigma ij}\) per block \(\sigma\), packaged as a one-dimensional array of matrices.
- gf_struct[tuple[str, int]]
Block structure specifying the block labels and the size of each block.
- Returns:
- Operator
Many-body operator \(\hat{h}\).