Raise exception when `LocalOperator` finds duplicate sites in `acting_on`
Created by: wdphy16
We should raise an exception when two sites are duplicated in a term of acting_on
. For example, it's nonsense to apply a 4x4 matrix on the sites [0, 0]
, and the user should apply a 2x2 matrix on the site [0]
instead. Currently it silently produces unexpected result. It also affects GraphOperator
when there is an edge starting and ending at the same vertex in the graph.