q5m.js - Quantum Computing Library - v0.1.1
    Preparing search index...

    Function quantumFourierTransform

    • Applies the Quantum Fourier Transform (QFT) or its inverse to a set of qubits within a circuit.

      The QFT is a linear transformation on quantum bits, and is the quantum analogue of the discrete Fourier transform.

      Parameters

      • circuit: Circuit

        The quantum circuit to which the QFT will be applied.

      • startQubit: number = 0

        The index of the first qubit in the register to apply QFT to. Defaults to 0.

      • OptionalnumQubits: number

        The number of qubits to include in the QFT. Defaults to all qubits from startQubit.

      • inverse: boolean = false

        If true, applies the inverse QFT. Defaults to false.

      Returns void

      If the specified qubit range is invalid.