Quantum Fourier Transform Calculator

Model basis states, custom vectors, and inverse transforms. Review magnitudes, probabilities, and phase angles fast. Turn complex amplitudes into clear spectral insight for qubits.

Calculator Inputs

Allowed range: 1 to 6 qubits.
Valid range updates with qubit count.
Controls table precision and export detail.
Enter one amplitude per line. Accepted forms: 0.5, -i, 0.5+0.5i, or 0.5,0.5.

Example Data Table

Parameter Example Value Meaning
Qubits 2 Creates a four-state Hilbert space.
Transform Type Forward QFT Uses the positive exponential phase convention.
Input Mode Basis state |01⟩ Starts from state index 1.
Output Amplitudes 0.5, 0.5i, -0.5, -0.5i QFT spreads one basis state across all frequencies.
Output Probabilities 25%, 25%, 25%, 25% Every spectral component carries equal weight.

Formula Used

Hilbert dimension: N = 2n

Forward transform: QFT|x⟩ = (1/√N) Σy=0N-1 e2πixy/N|y⟩

General vector mapping: βy = (1/√N) Σx=0N-1 αx e±2πixy/N

Magnitude:y| = √(Re(βy)² + Im(βy)²)

Probability: P(y) = |βy|² × 100

Phase angle: θ(y) = atan2(Im(βy), Re(βy)) × 180/π

The forward transform uses a positive phase sign. The inverse transform flips that sign while preserving the same 1/√N normalization factor.

How to Use This Calculator

  1. Choose the qubit count. The calculator automatically sets the Hilbert space dimension to 2n.
  2. Select forward QFT or inverse QFT, depending on whether you want spectral decomposition or reconstruction.
  3. Pick an input mode: basis state, uniform superposition, or a custom complex state vector.
  4. For custom vectors, enter one amplitude per line in the exact state order from |00...0⟩ upward.
  5. Enable normalization when your amplitudes do not already sum to unit probability.
  6. Choose natural or bit-reversed output ordering to match math notation or circuit-level output wires.
  7. Click the calculate button to place the results directly below the header and above the form.
  8. Use the CSV or PDF buttons after calculation to export the detailed spectral table.

FAQs

1) What does this calculator compute?

It applies the forward or inverse quantum Fourier transform to a qubit state vector, then reports amplitudes, phases, magnitudes, probabilities, entropy, and dominant basis states.

2) Which input formats are accepted for custom amplitudes?

You can enter real values like 0.25, imaginary values like -i, algebraic complex values like 0.5+0.5i, or comma pairs like 0.5,0.5.

3) Why should I normalize the input vector?

Normalization converts arbitrary amplitudes into a valid quantum state with total probability one. Disable it only when you intentionally want raw linear-algebra output.

4) What is bit-reversed output order?

Many circuit decompositions of the QFT finish with swapped output wires. Bit-reversed order displays amplitudes in that circuit-style arrangement instead of standard mathematical index order.

5) How is inverse QFT different from forward QFT?

The inverse transform changes the sign of the phase exponent. It reconstructs computational-basis amplitudes from frequency-domain amplitudes while remaining unitary.

6) Why do probabilities sometimes not sum to 100%?

That happens when normalization is disabled and the input vector norm is not one. The transform preserves norm, so non-unit inputs keep non-unit total probability.

7) What qubit counts are practical in this page version?

This implementation accepts one to six qubits. That range keeps manual entry and result tables readable while still covering many educational and analytic use cases.

8) Can this replace a full quantum circuit simulator?

No. It focuses on state-vector QFT analysis only. Gate noise, measurements, entangling circuit depth, and device-specific execution are outside this calculator’s scope.

Related Calculators

holevo bound calculatorschmidt decomposition calculator

Important Note: All the Calculators listed in this site are for educational purpose only and we do not guarentee the accuracy of results. Please do consult with other sources as well.