cirq.QuantumFourierTransformGate

class cirq.QuantumFourierTransformGate(num_qubits: int, *, without_reverse: bool = False)[source]

Switches from the computational basis to the frequency basis.

__init__(num_qubits: int, *, without_reverse: bool = False)[source]
Parameters
  • num_qubits – The number of qubits the gate applies to.

  • without_reverse – Whether or not to include the swaps at the end of the circuit decomposition that reverse the order of the qubits. These are technically necessary in order to perform the correct effect, but can almost always be optimized away by just performing later operations on different qubits.