![]() |
Function to generate matrix of constraints.
openfermion.measurements.constraint_matrix(
n_orbitals, n_fermions
)
Args | |
---|---|
n_orbitals(int): The number of orbitals in the simulation. n_fermions(int): The number of particles in the simulation. |
Returns | |
---|---|
constraint_matrix(scipy.sparse.coo_matrix): The matrix of constraints. |