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

    Function qftEncode

    • Encodes a classical value using Quantum Fourier Transform. This function prepares a quantum state corresponding to the given value and then applies QFT to it.

      Parameters

      • value: number

        The classical value to encode (should be < 2^numQubits)

      • numQubits: number

        The number of qubits to use for encoding

      Returns Circuit

      A Circuit with the value encoded using QFT

      If value is out of range for the given number of qubits