flip
Method of Fbit.
Overloads
| Name | Description |
|---|---|
flip(const List<integer> sites) -> Fbit | This method modifies the Fbit object in place by flipping the state of the fermionic modes at the specified sites. |
flip(integer site) -> Fbit | This method flips the fermionic mode at the specified site in place. |
flip() -> Fbit | This method flips the value of all the fermionic modes of the product state in place. |
flip(const List<integer> sites) -> Fbit
This method modifies the Fbit object in place by flipping the state of the fermionic modes at the specified sites.
Parameters
- sites: A vector of integers representing the sites of the fermionic modes to be flipped.
Example
Fbit("00110").flip([0,1,3]) // Returns (1 + 0i)|11100>
flip(integer site) -> Fbit
This method flips the fermionic mode at the specified site in place.
Parameters
- site: The site of the fermionic mode being queried in the product state.
Example
Fbit("00110").flip(2) // Returns (1 + 0i)|00010>
flip() -> Fbit
This method flips the value of all the fermionic modes of the product state in place.
Example
Fbit("0101").flip() // Returns (1 + 0i)|1010>