Keywords: quantum computing, quantum programming, Qiskit, Cirq, Q#, PyQuil, PennyLane, quantum algorithms, quantum circuits, quantum learning, quantum frameworks
Quantum-Programming/
โ
โโโ Qiskit/ # Programs and notes for IBM Qiskit
โโโ Cirq/ # Programs and notes for Google Cirq
โโโ QSharp/ # Programs and notes for Microsoft Q#
โโโ PyQuil/ # Programs and notes for Rigetti PyQuil
โโโ PennyLane/ # Programs and notes for PennyLane
โโโ LICENSE
โโโ README.md
Welcome to Quantum Programming โ a curated collection of learning notes, guides, and resources for anyone interested in quantum computing and quantum programming. This repository is designed to help beginners and enthusiasts understand the basics, explore top frameworks, and start coding for quantum computers.
- What Are Quantum Computers?
- Quantum Programming Basics
- Top Quantum Programming Languages & Frameworks
- Recommended IDEs & Tools
- Contributing
- Author & Contact
Classical computers (phones, laptops) work with bits that are either 0 or 1, solving problems step-by-step.
Quantum computers use qubits, which can be 0, 1, or both at the same time (a quantum phenomenon called superposition). This allows them to explore many possible solutions simultaneously.
Quantum computers excel at:
- Simulating molecules and materials (e.g., cleaner fertilizers, better batteries)
- Testing chemical reactions virtually (faster drug discovery)
- Solving complex problems that would take classical computers years or centuries
Quantum programming means writing instructions for a quantum computer instead of a classical one.
- In classical programming, you tell the computer what to do with 0s and 1s.
- In quantum programming, you instruct the computer how to work with qubits, which can be 0 and 1 at the same time.
Key differences:
- You set up a problem; the quantum computer explores many answers at once
- You measure the system to get the final result
-
Qiskit (IBM) โ Python-based
- Most popular framework for writing quantum programs (Python)
- Free: Open source, free IBM quantum hardware access (cloud)
- Paid: Optional premium compute credits
- Good for: Beginners, learning quantum circuits
-
Cirq (Google) โ Python library
- Python for defining quantum circuits, especially for Googleโs hardware
- Free: Open source
- Paid: Hardware access may cost
- Good for: Low-level circuit design control
Here's how to write and run your first quantum program using Cirq:
-
Create a file:
- Go to the
Cirq/folder. - Create a new file named
hello_quantum.py.
- Go to the
-
Paste this code:
Note: If you are running this code in Google Colab, you need to install Cirq first by running:
!pip install cirq
import cirq def main(): print("Hello Quantum!") # Create a simple quantum circuit with one qubit qubit = cirq.LineQubit(0) circuit = cirq.Circuit( cirq.H(qubit), # Apply Hadamard gate cirq.measure(qubit, key='result') # Measure the qubit ) print("Circuit:") print(circuit) # Simulate the circuit simulator = cirq.Simulator() result = simulator.run(circuit, repetitions=5) print("Measurement results:") print(result) if __name__ == "__main__": main()
-
Run the program:
- Open a terminal in the
Cirq/folder. - Run:
python hello_quantum.py
- Open a terminal in the
You should see output like:
Hello Quantum!
Circuit:
0: โโโHโโโM('result')โโโ
Measurement results:
result=01000
The actual measurement result (the string of 0s and 1s) may vary each time you run the program, but it will look similar to the above.
This is your first step in quantum programming!
-
Q# (Microsoft Q-Sharp) โ Standalone language
- Quantum-only language (not Python) by Microsoft
- Free: Part of Quantum Development Kit
- Paid: Azure Quantum hardware access may cost
- Good for: Learning quantum algorithms with full tooling
-
PyQuil & Quil (Rigetti) โ Python + low-level backend
- Python interface (PyQuil) for the Quil instruction language (Rigetti systems)
- Free: Libraries and simulators
- Paid: Real Rigetti hardware access may cost
- Good for: Hybrid quantum/classical programs
-
Other Useful Tools
- PennyLane โ Python for quantum machine learning (free)
- OpenQASM โ Low-level assembly language for quantum tools
- Guppy โ New Python-based language to simplify quantum coding (free)
-
IBM Quantum Experience (Qiskit Cloud)
Free access to real IBM quantum computers and simulators for running quantum programs.
https://quantum-computing.ibm.com/ -
Microsoft Azure Quantum (Free Tier)
Free credits for running quantum programs on IonQ, Quantinuum, and simulators via Azure Quantum.
https://azure.microsoft.com/en-us/products/quantum/ -
Amazon Braket (Free Tier)
Free access to quantum hardware (IonQ, Rigetti, OQC) and simulators with AWS Free Tier credits.
https://aws.amazon.com/braket/ -
QuTech Quantum Inspire
Free access to real quantum processors and simulators for program execution (Netherlands-based).
https://www.quantum-inspire.com/ -
Rigetti Forest Cloud (PyQuil)
Free access to Rigettiโs quantum virtual machine and limited real hardware for program execution.
https://www.rigetti.com/forest
| Algorithm | Use Case |
|---|---|
| Shorโs Algorithm | Integer factorization (breaking RSA encryption) |
| Groverโs Algorithm | Unstructured search (database search, NP-complete problems) |
| Quantum Fourier Transform (QFT) | Basis for many quantum algorithms (period finding, phase estimation) |
| Quantum Phase Estimation | Estimating eigenvalues (chemistry, physics simulations) |
| Deutsch-Jozsa Algorithm | Distinguishing between constant and balanced functions (demonstrates quantum speedup) |
| Simonโs Algorithm | Finding hidden periods in functions (precursor to Shorโs) |
| Quantum Approximate Optimization Algorithm (QAOA) | Solving combinatorial optimization problems (e.g., Max-Cut) |
| Variational Quantum Eigensolver (VQE) | Finding ground state energies in molecules (quantum chemistry) |
| Quantum Machine Learning (QML) Algorithms | Pattern recognition, classification, regression (quantum-enhanced ML) |
| Quantum Walks | Graph traversal, search, and optimization |
| Amplitude Amplification | Generalization of Groverโs (speeding up probabilistic algorithms) |
| Quantum Counting | Counting the number of solutions to a problem (database, search) |
| Harrow-Hassidim-Lloyd (HHL) Algorithm | Solving systems of linear equations (quantum linear algebra) |
| Quantum Principal Component Analysis (qPCA) | Dimensionality reduction in quantum data (quantum ML) |
| Quantum Error Correction Codes | Protecting quantum information from decoherence and errors |
- VS Code โ Free, popular for quantum coding (Qiskit, Q# extensions)
- Jupyter Notebooks โ Free, interactive browser notebooks (great for Python frameworks)
- Visual Studio โ Free Community Edition supports Q#; paid versions offer more features
- Quantum Development Kit (QDK) โ Free Microsoft toolset with Q# debugging
Most quantum languages are Python-based or run in free environments like VS Code/Jupyter. Paid options are mainly for access to real quantum hardware.
-
IBM Quantum Experience (Qiskit)
Free access to real quantum computers and simulators, with tutorials and a vibrant community.
https://quantum-computing.ibm.com/ -
Microsoft Quantum Development Kit (QDK) & Q#
Free tools, documentation, and online simulators for learning and coding quantum algorithms.
https://learn.microsoft.com/en-us/azure/quantum/ -
Google Quantum AI (Cirq)
Free Python library, code labs, and cloud simulators for building and running quantum circuits.
https://quantumai.google/ -
Quantum Country
Free interactive essays and spaced-repetition flashcards for deeply learning quantum computing concepts.
https://quantum.country/ -
Qiskit Textbook
Free, open-source online textbook with hands-on quantum programming exercises and theory.
https://qiskit.org/textbook/
| Concept | What it means (short) | Why / Key Idea | Result | How to improve (short) |
|---|---|---|---|---|
| Quantum Error Rate | How often qubits make mistakes | Noise, fragile qubits, hardware limits | Lower = better โ | Better hardware, noise control, error correction |
| Quantum Key Rate | Speed of generating secure keys | Depends on channel quality & hardware | Higher = better ๐ | Faster devices, low-loss links, better protocols |
| Quantum Error Correction (QEC) | Method to fix quantum errors | Uses multiple qubits to protect data | Improves reliability | More qubits, smarter correction codes |
| Quantum Key Distribution (QKD) | Secure key sharing using quantum physics | Eavesdropping changes quantum states | Ultra-secure communication | Better detectors, stable channels |
| Quantum Machine Learning (QML) | ML using quantum computers | Parallel quantum computation | Faster learning (future) | Improved algorithms, better quantum hardware |
My above learning notes ๐
We welcome first-time contributors! If youโre new to open source, look for issues tagged with good-first-issue or help-wanted. We provide mentorship and guidance to help you succeed.
How to contribute:
- Fork this repo and create your branch
- Make your changes and submit a pull request
- For questions, open a GitHub Discussion
- Report bugs via GitHub Issues
Padmaraj Nidagundi
Quantum Computing Enthusiast, Open Source Mentor
๐ง Email: padmaraj.nidagundi@gmail.com
๐ LinkedIn
๐ Personal Blog
Response time: Typically 24-48 hours
- Stay updated with the latest in quantum programming
- Access curated learning resources
- Join a growing community of quantum enthusiasts
Thank you for making quantum programming accessible to everyone! ๐