Metadata-Version: 2.4
Name: myqclab
Version: 0.1.2
Summary: Quantum Computing Lab programs in Python and Qiskit
Requires-Python: >=3.8
Description-Content-Type: text/markdown
Requires-Dist: qiskit>=1.0.0
Requires-Dist: qiskit-aer>=0.14.0
Requires-Dist: matplotlib>=3.5.0
Dynamic: requires-python

# Quantum Computing Lab Programs & `myqclab` Package

Compact, verified Python and Qiskit implementations of 9 core quantum algorithms for lab exams.

Available both as standalone scripts/notebooks and as an installable Python package **`myqclab`**.

---

## 📦 Package Installation

Install directly in your environment:
```bash
pip install .
```
Or in editable/development mode:
```bash
pip install -e .
```

---

## 🚀 Package Usage

### 1. In Python / Jupyter Notebook
```python
import myqclab

# Show the code of any algorithm in the terminal (quotes optional!)
myqclab.show(grover)
myqclab.show("grover")

# Run the algorithm and print the circuit and simulation output
myqclab.run(grover)

# List all available programs
myqclab.list()
```

### 2. From Terminal CLI
```bash
# Print code of a program
myqclab grover
myqclab show grover

# Execute program directly
myqclab run grover

# List all programs
myqclab list
```

---

## 📚 Available Quantum Programs

### 1. Quantum State & Gate Realizations (with Bloch Sphere)

| Program Name | Description | Circuit & Expected Output |
|---|---|---|
| `r0` | Realization of state \|0⟩ | Single qubit initialized to \|0⟩, Bloch vector pointing north (+Z), measurement: `{'0': 1024}` |
| `r1` | Realization of state \|1⟩ | Single qubit flipped with X gate to \|1⟩, Bloch vector pointing south (-Z), measurement: `{'1': 1024}` |
| `c0` | Realization of CNOT (control = 0) | Control is \|0⟩, target remains \|0⟩, both Bloch vectors point north (+Z), measurement: `{'00': 1024}` |
| `c1` | Realization of CNOT (control = 1) | Control flipped to \|1⟩, target flips to \|1⟩, both Bloch vectors point south (-Z), measurement: `{'11': 1024}` |
| `s0` | Realization of SWAP (input \|01⟩) | Starts with q0=\|0⟩, q1=\|1⟩; swaps to q0=\|1⟩, q1=\|0⟩; measurement: `{'01': 1024}` |
| `s1` | Realization of SWAP (input \|10⟩) | Starts with q0=\|1⟩, q1=\|0⟩; swaps to q0=\|0⟩, q1=\|1⟩; measurement: `{'10': 1024}` |
| `cc0` | Realization of CCNOT (controls = 1, 0) | Controls are not both 1; target stays \|0⟩; measurement: `{'001': 1024}` |
| `cc1` | Realization of CCNOT (controls = 1, 1) | Both controls are 1; target flips to \|1⟩; measurement: `{'111': 1024}` |
| `bs` | Realization of Bell States | Prepares Bell state (e.g. \|Φ+⟩ = (\|00⟩ + \|11⟩)/√2), Bloch vectors at origin (entangled), measurement: `00` & `11` |

### 2. Quantum Algorithms

| Program Name | Loop Variation | Algorithm | Manually Configurable Input |
|---|---|---|---|
| `qe` | `qeloop` | Quantum Entanglement | `state = '00'` (`'00'`, `'01'`, `'10'`, `'11'`) |
| `tele` | `teleloop` | Quantum Teleportation | `state = '1'` (`'0'` or `'1'`) |
| `super` | `superloop` | Superdense Coding | `msg = '01'` (`'00'`, `'01'`, `'10'`, `'11'`) |
| `de` | `deloop` | Deutsch's Algorithm | `oracle_type = 'balanced_id'` (`'constant_0'`, etc.) |
| `dj` | `djloop` | Deutsch-Jozsa Algorithm | `oracle_type = 'balanced'`, `n = 3` |
| `simon` | `simonloop` | Simon's Algorithm | `s = '11'` |
| `bv` | `bvloop` | Bernstein-Vazirani | `s = '1011'` |
| `grover` | `groverloop` | Grover's Search | `target = '10'` (`'00'`, `'01'`, `'10'`, `'11'`) |
| `shor` | `shorloop` | Shor's Algorithm | `N = 15, a = 7` |

---

## Standalone Running

Run any script with Python:
```bash
python qe.py
```
Or open any `.ipynb` file in Jupyter Notebook / JupyterLab / Google Colab.
