|View source on GitHub|
Function to use linear programming to apply constraints.
openfermion.measurements.apply_constraints( operator, n_fermions )
|operator(FermionOperator): FermionOperator with only 1- and 2-body terms that we wish to vectorize. n_fermions(int): The number of particles in the simulation.|
|modified_operator(FermionOperator): The operator with reduced norm that has been modified with equality constraints.|