translate
Method of Qbit.
Overloads
| Name | Description |
|---|---|
translate() -> Qbit | Circularly shifts in place the qubits of the product state by site to the right. |
translate(const integer shift) -> Qbit | Circularly shifts in place the qubits of the product state by site to the right a number of times equal to the provided integer. |
translate() -> Qbit
Circularly shifts in place the qubits of the product state by site to the right.
Example
Qbit("00100").translate() // Returns (1 + 0i)|00010>
translate(const integer shift) -> Qbit
Circularly shifts in place the qubits of the product state by site to the right a number of times equal to the provided integer.
Parameters
- shift: The number of single site shift applied.
Example
Qbit("00100").translate(2) // Returns (1 + 0i)|00001>