OpenFermion icon indicating copy to clipboard operation
OpenFermion copied to clipboard

Total number operator function should be separate from number_operator

Open kevinsung opened this issue 7 years ago • 0 comments

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.

kevinsung avatar Sep 13 '18 21:09 kevinsung