A hands-on collection of scripts, notebooks, and notes that explore quantum computing concepts using Qiskit, Cirq, PennyLane, and a custom NumPy-based simulator. This repo mixes beginner-friendly explanations with runnable demos for Grover, Deutsch-Jozsa, Shor (toy example), and state-vector simulation.
.
├── algorithms/ # Qiskit-based algorithm snippets
├── DJ-Algorithm/ # Deutsch-Jozsa in Qiskit and Cirq
├── docs/ # Beginner-friendly guides (EN/ES)
├── fundamentals/ # Grover-style oracle and diffuser demos
├── Grover/ # Grover in Qiskit and Cirq
├── IBM-Quantum-Platform/ # QASM and Qiskit examples for IBM platform
├── Notebook/ # Jupyter notebooks (qOSF tasks, random walk)
├── optimize_quantum_circuit/ # PennyLane cost landscape visualization
├── shor/ # Shor (toy N=15) in Qiskit and Cirq
├── simulating/ # Custom NumPy simulator + CLI + plots
├── quantum_results.html # Plotly output (generated)
├── grover_circuit.png # Qiskit Grover circuit output
├── bell_state_histogram.png # Qiskit Bell-state histogram output
└── References.md # External references and reading list
python -m venv .venv
.venv\Scripts\activatepython -m pip install qiskit qiskit-aer cirq pennylane matplotlib numpy plotlypython fundamentals\main.py
python Grover\qiskit_grover.py
python DJ-Algorithm\main_qiskit.py
python simulating\quantum_simulator.py --visualize- docs/quantum_computing_explained.md: Plain-language introduction with analogies and use cases.
- docs/computacion_cuantica_explicada.md: Spanish version of the same guide.
- README.es.md: Spanish overview of the repo structure and highlights.
- bell_state_qiskit.py: Builds a Bell pair, measures it, and saves a histogram to bell_state_histogram.png.
- beel_state_cirq.py: Cirq-based Bell-state example.
- main_qiskit.py: Deutsch-Jozsa with a balanced/constant oracle, outputs dj_circuit.png and dj_histogram.png.
- main.cirq.py: Deutsch-Jozsa in Cirq using a small 3-qubit input + ancilla.
- dj_circuit.txt: Notes for the circuit layout.
- qiskit_grover.py: Grover search with a 3-qubit oracle marking |101> and |110>, saves grover_circuit.png.
- cirq_grover.py: Grover search with a 2-qubit oracle and ancilla, prints sampled results.
- shor_qiskit.py: Shor toy demo for N=15 using Qiskit Aer. Supports CLI parameters for N (fixed to 15 in this demo) and a (one of 2,7,8,11,13).
- Example:
python shor\shor_qiskit.py -n 15 -a 7
- Example:
- shor_cirq.py: Shor order-finding circuit using Cirq arithmetic operations. Requires a Cirq version that provides ArithmeticGate support.
- main.py: Builds a Grover-style SAT oracle (XOR clauses), a diffuser, and runs the circuit in Aer. Saves a histogram to fundamentals/output/my_circuit.png.
- surface_plot.py: PennyLane-based cost-landscape visualization and optimizer trajectories.
- hello_pennylane.ipynb: Interactive notebook for variational circuits and optimizers.
- quantum_simulator.py: A full-featured NumPy simulator with CLI and Plotly visualizations.
- examples.py: Multiple prebuilt circuits.
- QUICKSTART.md and README.md: Usage, CLI arguments, and troubleshooting.
- DJ-Algorithm/openqasm-dj.qasm: OpenQASM version of Deutsch-Jozsa.
- DJ-Algorithm/qiskit-dj.py: Qiskit implementation for IBM platform.
- Grover/qiskit-grover.py and qiskit-grover.qasm: Grover in Qiskit and QASM.
- qosf-simulator-task.ipynb: Notes and experiments for the QOSF task.
- quantum_random_walk.ipynb: Random walk exploration notebook.
The custom simulator supports a compact circuit string format:
python simulating\quantum_simulator.py -q 3 -s 1500 -c "h:0,h:1,cx:0-2,cx:1-2,x:0" --visualize
Gates supported: h, x, y, z, s, t, i, cx.
Outputs include an interactive Plotly dashboard saved as quantum_results.html with:
- Measurement counts
- State vector amplitudes
- Theoretical probabilities
- Measured vs theoretical comparison
- Qiskit Aer is a separate package (qiskit-aer). The Qiskit demos use AerSimulator in newer versions.
- The Cirq Shor demo relies on ArithmeticGate support. If you see an error about arithmetic operations, upgrade Cirq.
- Keep explanations approachable and concrete.
- Add small comments for non-obvious quantum steps.
- Place generated images and plots next to their related scripts or in output/ folders.
- References.md for curated reading.
- Qiskit documentation: https://docs.quantum.ibm.com/
- Cirq documentation: https://quantumai.google/cirq
- PennyLane documentation: https://pennylane.ai/