-
Notifications
You must be signed in to change notification settings - Fork 0
Tutorial 00 Quantum Fourier Transform
A comprehensive review of quantum Fourier transform over finite Abelian groups with use cases in phase estimation and Hadamard test.
This tutorial provides a thorough introduction to the mathematical foundations of quantum Fourier transform (QFT) over finite Abelian groups. You'll learn how QFT serves as a linear transformation between function spaces and explore practical applications in phase estimation and Hadamard test scenarios.
Location: quantum_fourier_transform_abelian/
Notebook: qft_abelian_qpe_hadamard.ipynb
Framework: Classiq
Difficulty: 🟢 Beginner
Estimated Time: 2 hours
By completing this tutorial, you will be able to:
- Understand the mathematical foundations of QFT over finite Abelian groups
-
Recognize the relationship between
$\mathbb{C}[G]$ and$\mathbb{C}[\widehat{G}]$ vector spaces - Implement QFT circuits for phase estimation applications
- Apply QFT in Hadamard test scenarios
- Design quantum circuits using Classiq for QFT operations
-
Linear Algebra:
- Vector spaces and linear transformations
- Inner products and orthogonality
- Eigenvalues and eigenvectors
-
Complex Numbers:
- Complex exponentials:
$e^{i\theta} = \cos\theta + i\sin\theta$ - Complex arithmetic operations
- Complex exponentials:
-
Quantum Computing Basics:
- Qubits and quantum states
- Quantum gates (Hadamard, phase gates)
- Quantum measurement
- Group Theory: Basic understanding of groups and Abelian groups (helpful but not required)
- Fourier Transforms: Familiarity with classical Fourier transforms (conceptual understanding)
- None required - this is a foundational tutorial
The main focus of this tutorial is a review of the mathematical foundations of quantum Fourier transform (for Abelian groups) as a linear transformation between:
-
$\mathbb{C}[G]$ : The vector space of complex-valued functions$f : G \to \mathbb{C}$ where$G$ is a finite Abelian group -
$\mathbb{C}[\widehat{G}]$ : The vector space of complex-valued functions$\widehat{f} : \widehat{G} \to \mathbb{C}$ where$\widehat{G}$ is the complete set of characters of$G$
Both are vector spaces over the field of complex numbers
-
Finite Abelian Groups (
$G$ ):- A group where the operation is commutative
- Examples:
$\mathbb{Z}_n$ (cyclic groups), direct products of cyclic groups
-
Characters (
$\widehat{G}$ ):- Group homomorphisms from
$G$ to the unit circle - Form an orthonormal basis for functions on
$G$
- Group homomorphisms from
-
Quantum Fourier Transform:
- Maps quantum states representing functions on
$G$ to states representing functions on$\widehat{G}$ - Enables efficient phase estimation and other quantum algorithms
- Maps quantum states representing functions on
- Phase Estimation: Using QFT to estimate eigenvalues of unitary operators
- Hadamard Test: Measuring expectation values using QFT-based techniques
The quantum circuit for the Hadamard test example is designed to be simple and self-explanatory. The implementation demonstrates:
- State Preparation: Setting up the initial quantum state
- QFT Application: Applying the quantum Fourier transform
- Measurement: Extracting phase information through measurement
- Quantum Circuit Design: Using Classiq to construct QFT circuits
- Phase Estimation: Implementing phase estimation algorithms
- Hadamard Test: Applying QFT in Hadamard test scenarios
The notebook uses Classiq's high-level quantum programming interface to:
- Define quantum functions
- Synthesize optimized quantum circuits
- Execute circuits and analyze results
The following Python packages are required:
-
numpy- Numerical operations and array handling -
matplotlib- Plotting and visualization -
classiq- Quantum circuit design and synthesis
Installation:
All packages are included in the top-level requirements.txt. If you have set up the base environment as described in the main README, no additional installation is needed.
# If not already installed
pip install numpy matplotlib classiqcd quantum_fourier_transform_abelianjupyter notebook qft_abelian_qpe_hadamard.ipynbOr in JupyterLab:
jupyter lab qft_abelian_qpe_hadamard.ipynb- Read through the theory sections to understand the mathematical foundations
- Run cells sequentially to see the implementation
- Observe the outputs including plots and measurement results
- Experiment with parameters to deepen understanding
If you want to save the quantum circuit as a model file:
- Execute the cell containing
write_qmod(create_model(main), "qft-expvalue") - This will generate
qft-expvalue.qmodin the current directory
-
Plots:
- Expectation values visualization
- Measurement results showing phase information
- QFT transformation results
-
Quantum Model File (Optional):
-
qft-expvalue.qmod- Quantum model file (generated if thewrite_qmodcell is executed)
-
-
Understanding:
- How QFT transforms quantum states
- Relationship between time and frequency domains in quantum context
- Application of QFT in phase estimation
- QFT is a fundamental quantum algorithm with wide applications
- Mathematical foundations connect group theory to quantum computing
- QFT enables efficient phase estimation and related algorithms
- Classiq provides high-level tools for QFT circuit design
Solution:
- Ensure Classiq is installed:
pip install classiq - Check Classiq version compatibility
- Some features may require API authentication (see Classiq documentation)
Solution:
- Ensure matplotlib is installed:
pip install matplotlib - Use
%matplotlib inlinein Jupyter if plots don't appear - Check that cells executed successfully
Solution:
- Ensure you have write permissions in the directory
- Check that the
write_qmodcell executed without errors - Verify Classiq authentication if required
Solution:
- Review the theory section carefully
- Refer to linear algebra and group theory resources
- See Academic Resources for related papers
-
Group Theory and Quantum Computing: See papers in
6.B/directory - Phase Estimation: Original quantum phase estimation algorithm papers
- Fourier Transforms: Classical and quantum Fourier transform literature
- Tutorial 02 - Quantum Walk: Uses QFT concepts in graph algorithms
- Tutorial 05 - Coupled Harmonic Oscillators: Applies similar mathematical foundations
- Classiq Documentation - Framework reference
- Qiskit Textbook - Quantum Fourier Transform - Alternative perspective
- Microsoft Learn - QFT - Additional examples
- Mohammadreza Khellat - Primary author and maintainer
For questions or contributions, see the Contributing Guide.
This tutorial provides a comprehensive introduction to quantum Fourier transform over finite Abelian groups. You've learned:
✅ Mathematical foundations of QFT
✅ Relationship between function spaces
✅ Practical applications in phase estimation and Hadamard test
✅ Implementation using Classiq framework
Next Steps:
- Try modifying parameters to see how QFT behaves
- Explore Tutorial 02 (Quantum Walk) which builds on these concepts
- Review Academic Resources for deeper theoretical understanding
Return to: Tutorial Catalog | Home