OpenFermion
OpenFermion copied to clipboard
Total number operator function should be separate from number_operator
The function number_operator has the very awkward property that number_operator(n_sites, k) gives the same operator no matter what the value of n_sites is. The output only depends on k, yet the user is required to specify n_sites anyway. I this should definitely be changed.
I propose to have a separate function, total_number_operator, that takes in n_sites. Then, number_operator would not take n_sites as input.