NumberPotential
Overloads
| Name | Description |
|---|---|
NumberPotential(const List<real> coefficients) -> RealOperatorFermiParam | Returns an operator representing a weighted sum of number operators , where the site indices are implicitly . If a subset of sites or a different ordering is desired, use the factory overload that accepts an explicit list of site indices. |
NumberPotential(const List<real> coefficients, const List<integer> sites) -> RealOperatorFermiParam | Returns an operator representing a weighted sum of number operators . |
NumberPotential(const List<real> coefficients) -> RealOperatorFermiParam
Returns an operator representing a weighted sum of number operators , where the site indices are implicitly . If a subset of sites or a different ordering is desired, use the factory overload that accepts an explicit list of site indices.
Parameters
- coefficients: The coefficients .
Example
var coefficients = [1.0,3.0,4.0,0.0]
NumberPotential(coefficients)*Fbit("0110") // Returns (7 + 0i)|0110>
NumberPotential(const List<real> coefficients, const List<integer> sites) -> RealOperatorFermiParam
Returns an operator representing a weighted sum of number operators .
Parameters
- coefficients: The coefficients .
- sites: The site indices where the operator acts.
Example
var sites = [0,2,3]
var coefficients = [1.0,3.0,4.0]
NumberPotential(coefficients,sites)*Fbit("0110") // Returns (3 + 0i)|0110>