in Chemistry/src/DataModel/OrbitalIntegral/OrbitalIntegralExtensions.cs [60:82]
public static IEnumerable<(HermitianFermionTerm, double)> ToHermitianFermionTerms(
this OrbitalIntegral orbitalIntegral,
int nOrbitals,
IndexConvention indexConvention = IndexConvention.UpDown)
{
var termType = orbitalIntegral.TermType;
if (termType == TermType.OrbitalIntegral.OneBody)
{
return orbitalIntegral.ToOneBodySpinOrbitalTerms(nOrbitals, indexConvention);
}
else if (termType == TermType.OrbitalIntegral.TwoBody)
{
return orbitalIntegral.ToTwoBodySpinOrbitalTerms(nOrbitals, indexConvention);
}
else if(termType == TermType.OrbitalIntegral.Identity)
{
return new List<(HermitianFermionTerm, double)>() { (new HermitianFermionTerm() , orbitalIntegral.Coefficient) };
}
else
{
throw new System.NotImplementedException();
}
}