Open jagot opened 5 years ago
The same example above, now produces this non-sensical result:
julia> NBodyMatrixElement(a, IdentityOperator{0}(), a, overlap_matrix(a,a))
⟨𝐈₀⟩
julia> dump(NBodyMatrixElement(a, IdentityOperator{0}(), a, overlap_matrix(a,a)))
NBodyMatrixElement
terms: Array{EnergyExpressions.NBodyTerm}((1,))
1: EnergyExpressions.NBodyTerm
factors: Array{EnergyExpressions.NBodyTermFactor}((1,))
1: EnergyExpressions.OrbitalMatrixElement{0,Symbol,IdentityOperator{0},Symbol}
a: Array{Symbol}((0,))
o: IdentityOperator{0} 𝐈₀
b: Array{Symbol}((0,))
coeff: Int64 1
Trying to create an
NBodyMatrixElement
of a zero-body operator fails with the following error:This is because the type cannot be inferred for the tuples of zero length. However, the
OrbitalMatrixElement
should not be necessary for zero-body operators, since the full energy expression consists solely ofOrbitalOverlap
s.