Tutorials
Welcome to the pyqpanda3 tutorial series! This section provides a structured learning path from basic quantum computing concepts to advanced features of the pyqpanda3 SDK.
Learning Path
The tutorials are organized in a progressive order. Each tutorial builds upon concepts introduced in previous ones. We recommend following them in sequence.
Tutorial List
| # | Tutorial | Description | Prerequisites |
|---|---|---|---|
| 1 | Getting Started | Installation, setup, and your first quantum program | None |
| 2 | Quantum Basics | Qubits, quantum gates, measurement, and Bloch sphere | Tutorial 1 |
| 3 | Circuit Construction | Building circuits with QProg, QCircuit, and the << operator | Tutorial 2 |
| 4 | Simulation | Running circuits on CPUQVM, GPUQVM, DensityMatrixSimulator, Stabilizer, and PartialAmplitudeQVM | Tutorial 3 |
| 5 | Noise Simulation | NoiseModel, 7 error channels, per-gate and per-qubit noise configuration | Tutorial 4 |
| 6 | Dynamic Circuits | Classical control flow with qif, qelse, qwhile for mid-circuit measurement | Tutorial 3 |
| 7 | Variational Circuits | VQCircuit, Parameter, gradient computation, and batch evaluation | Tutorial 4 |
| 8 | Hamiltonian & Pauli Operators | PauliOperator algebra, Hamiltonian construction, and expectation values | Tutorial 4 |
| 9 | Quantum Information | StateVector, DensityMatrix, quantum channels, and distance metrics | Tutorial 4 |
| 10 | Visualization | Bloch sphere, circuit drawing, state plots, and probability charts | Tutorial 3 |
| 11 | Transpilation | Topology-aware transpilation, gate decomposition, and optimization | Tutorial 3 |
| 12 | Cloud Computing | QCloudService, job submission, backend selection, and result retrieval | Tutorial 4 |
| 13 | Quantum State Preparation | 10 encoding methods: amplitude, angle, IQP, Schmidt, sparse isometry, and more | Tutorial 3 |
Recommended Reading Order
Beginner Path
If you are new to quantum computing:
- Start with Getting Started to set up your environment
- Follow Quantum Basics to understand core concepts
- Learn Circuit Construction to build your first circuits
- Try Simulation to run your circuits
Intermediate Path
Once you are comfortable with the basics:
- Explore Noise Simulation for realistic hardware modeling
- Study Hamiltonian & Pauli Operators for variational algorithms
- Learn Variational Circuits for parameterized circuits and gradients
- Try Dynamic Circuits for classical-quantum hybrid programs
Advanced Path
For specialized topics:
- Quantum Information for state analysis and channel representations
- Transpilation for hardware-aware circuit optimization
- Cloud Computing for running on real quantum hardware
- Quantum State Preparation for advanced encoding techniques
- Visualization for circuit and state visualization
Conventions
Throughout these tutorials, we use the following conventions:
- All code examples use the
from pyqpanda3 import coreimport style - Code blocks include descriptive comments above each example
- Mathematical formulas use LaTeX notation: inline
$...$and block-level$$...$$ - Diagrams use Mermaid syntax for flowcharts and sequence diagrams