Reversible circuits with Janus

Run a circuit forward. Then watch it unwind.

call emits a circuit gate by gate. uncall walks the same Janus procedure backward, reversing both the gate order and each operation.

Quantum Fourier Transform

A number becomes phase.
Reverse it to get the number back.

QFT spreads one basis value across eight equal magnitudes. The arrows reveal where the value went: it is now stored in their relative phases.

|101⟩

Gate sequence

ready · 0 / 7
q0 · LSBq1q2 · MSB

Forward circuit appears gate by gate.

Ready. Call QFT and watch the value move into relative phase.

  1. |000⟩ 0.000 0.000 rad
  2. |001⟩ 0.000 0.000 rad
  3. |010⟩ 0.000 0.000 rad
  4. |011⟩ 0.000 0.000 rad
  5. |100⟩ 0.000 0.000 rad
  6. |101⟩ 0.000 0.000 rad
  7. |110⟩ 0.000 0.000 rad
  8. |111⟩ 0.000 0.000 rad

Call · QFT

    Uncall · inverse QFT