View source on GitHub |
Parse the creation and annihilation operators and return a sparse matrix
fqe.hamiltonians.hamiltonian_utils.nbody_matrix(
ops: "FermionOperator",
norb: int
) -> np.ndarray
with the elements of the matrix filled with the convention
.. code-block::
i^j^k^ o p q
1 2 3 ... 1 2 3 ...
Args | |
---|---|
ops
|
Matrix in the FermionOperator format. |
norb
|
The number of orbitals in the system. |