Package com.quantum4j.algorithms
Class QFT
java.lang.Object
com.quantum4j.algorithms.QFT
Quantum Fourier Transform (QFT) and inverse QFT (IQFT) circuit builders.
Uses only standard gates (H, CX, RZ) with CRZ decomposed as CX-RZ-CX.
-
Method Summary
Modifier and TypeMethodDescriptionstatic QuantumCircuitinverseQft(int n) Construct the n-qubit inverse QFT circuit as the exact adjoint ofqft(int)usingGateInversionPass.static QuantumCircuitqft(int n) Construct the n-qubit QFT circuit.
-
Method Details
-
qft
Construct the n-qubit QFT circuit.- Parameters:
n- number of qubits (>=1)- Returns:
- QFT circuit on n qubits
-
inverseQft
Construct the n-qubit inverse QFT circuit as the exact adjoint ofqft(int)usingGateInversionPass.- Parameters:
n- number of qubits (>=1)- Returns:
- inverse QFT circuit on n qubits
-