Skip to main content

translate

Method of Qbit.

Overloads

NameDescription
translate() -> QbitCircularly shifts in place the qubits of the product state by 11 site to the right.
translate(const integer shift) -> QbitCircularly shifts in place the qubits of the product state by 11 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 11 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 11 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>