# 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.

Methods

 controlled([num_controls, control_values, …]) Returns a controlled version of this gate. If no arguments are The number of qubits this gate acts on. on(*qubits) Returns an application of this gate to the given qubits. validate_args(qubits) Checks if this gate can be applied to the given qubits. wrap_in_linear_combination([coefficient])