flipped
Method of Qbit.
Overloads
| Name | Description |
|---|---|
flipped(const List<integer> sites) -> Qbit | Returns a copy of the product state with the qubits at the specified sites flipped. |
flipped(integer site) -> Qbit | Returns a copy of the product state with the specified site flipped. |
flipped() -> Qbit | Returns a copy of the product state with the value of all of its qubits flipped. |
flipped(const List<integer> sites) -> Qbit
Returns a copy of the product state with the qubits at the specified sites flipped.
Parameters
- sites: A vector of integers representing the sites of the qubits to be flipped.
Example
Qbit("00110").flipped([0,1,3]) // Returns (1 + 0i)|11100>
flipped(integer site) -> Qbit
Returns a copy of the product state with the specified site flipped.
Parameters
- site: Site of the qubit to flip.
Example
Qbit("00110").flipped(2) // Returns (1 + 0i)|00010>
flipped() -> Qbit
Returns a copy of the product state with the value of all of its qubits flipped.
Example
Qbit("0101").flipped() // Returns (1 + 0i)|1010>