Quantum computing experiments using Qiskit - Educational quantum algorithms and demonstrations.
Project description
Quant Experiments
Educational quantum computing experiments using Qiskit. Learn fundamental quantum algorithms through interactive code examples.
Installation
pip install quant-experiments
What's Included
Experiments
- coin_toss - Quantum coin toss using superposition with Hadamard gate
- quantum_entanglement - Create entangled qubits using Bell state
- bernstein_vazirani - Hidden string algorithm with quantum advantage
- quantum_teleportation - Teleport quantum state using entanglement
- deutsch - Determine if function is constant or balanced (1 query!)
- deutsch_jozsa - Generalized Deutsch with exponential speedup
Usage
List all experiments
import quant
print(quant.list_experiments())
View experiment code
quant.printfile('coin_toss')
quant.printfile('deutsch')
Get detailed explanation
quant.printdetail('quantum_entanglement')
Prints:
- Concept behind the algorithm
- Step-by-step how it works
- Quantum gates used
- Expected output
- Real-world applications
- Complete runnable code
Get raw code
code = quant.get_code('deutsch_jozsa')
print(code)
Quantum Concepts
What is Superposition?
A quantum system can exist in multiple states simultaneously until measured.
What is Entanglement?
Two qubits become correlated such that the state of one instantly affects the other.
What is Quantum Advantage?
Quantum algorithms can solve certain problems exponentially faster than classical algorithms.
Examples
Coin Toss
import quant
quant.printfile('coin_toss')
# Output shows 50-50 distribution of 0s and 1s
Deutsch Algorithm
import quant
quant.printfile('deutsch')
# Determines if function is constant or balanced with 1 query
# Classically needs 2 queries - quantum advantage!
Qiskit Requirements
This package requires:
qiskit >= 0.43.0- Quantum programming frameworkqiskit-aer >= 0.13.0- Quantum simulator
API Reference
list_experiments()
Returns list of available experiment names.
printfile(name)
Prints the Python code for the experiment.
printdetail(name)
Prints detailed explanation with concept, how it works, gates, expected output, and applications.
get_code(name)
Returns the experiment code as a string.
Learning Path
- Start with coin_toss - Learn superposition
- Move to quantum_entanglement - Learn Bell states
- Try deutsch - See quantum advantage
- Explore quantum_teleportation - Learn quantum communication
- Finish with deutsch_jozsa - Understand exponential speedup
Real-World Applications
- Quantum Cryptography - Secure key distribution
- Quantum Networks - Distributed quantum computing
- Drug Discovery - Molecular simulation
- Optimization - Financial modeling
- Machine Learning - Quantum data analysis
Educational Use
Perfect for:
- University quantum computing courses
- Self-paced quantum learning
- Research and experimentation
- Building quantum intuition
License
MIT License
Author
Quantum Computing Lab
Contributing
Contributions welcome! Feel free to add more quantum algorithms.
References
- Qiskit Documentation: https://qiskit.org/
- Quantum Computing Reference: https://en.wikipedia.org/wiki/Quantum_computing
- IBM Quantum: https://quantum-computing.ibm.com/
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file quant_experiments-0.1.0.tar.gz.
File metadata
- Download URL: quant_experiments-0.1.0.tar.gz
- Upload date:
- Size: 9.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
41c8ca44250c6be88fe67054f026b568ae6bb4db8f09803f798d619282d4d784
|
|
| MD5 |
4240d16ea9ce184087b7b3625c9b9a71
|
|
| BLAKE2b-256 |
f6a7b9b880f6568eeb71ed2e40ae3b06a18c195ab4e7ec2e4e412df8ab7f0008
|
File details
Details for the file quant_experiments-0.1.0-py3-none-any.whl.
File metadata
- Download URL: quant_experiments-0.1.0-py3-none-any.whl
- Upload date:
- Size: 16.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f123cb4f83d59272160a926c552c291c2faa4c78cd768789766aa90264e68e46
|
|
| MD5 |
88560beb7f09832a24835210c40e94e6
|
|
| BLAKE2b-256 |
e88e148f75e7140f612e0e347202abf4d43ed6eff31f96860b95ad147a350ff4
|