{"id":37689202,"url":"https://github.com/toolate28/quantum-redstone","last_synced_at":"2026-01-16T12:39:26.486Z","repository":{"id":332081881,"uuid":"1127964742","full_name":"toolate28/quantum-redstone","owner":"toolate28","description":"Quantum computing education via Minecraft Redstone - Mathematical bridge between quantum mechanics and block-based circuits","archived":false,"fork":false,"pushed_at":"2026-01-12T15:13:36.000Z","size":157,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2026-01-12T18:52:18.303Z","etag":null,"topics":["computational-physics","minecraft","minecraft-mod","minecraft-plugin","npc","quantum-computing","quantum-logic","redstone","redstone-circuit"],"latest_commit_sha":null,"homepage":"","language":"Jupyter Notebook","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/toolate28.png","metadata":{"files":{"readme":"README.ipynb","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-01-04T23:36:25.000Z","updated_at":"2026-01-12T15:08:48.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/toolate28/quantum-redstone","commit_stats":null,"previous_names":["toolate28/quantum-redstone"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/toolate28/quantum-redstone","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/toolate28%2Fquantum-redstone","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/toolate28%2Fquantum-redstone/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/toolate28%2Fquantum-redstone/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/toolate28%2Fquantum-redstone/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/toolate28","download_url":"https://codeload.github.com/toolate28/quantum-redstone/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/toolate28%2Fquantum-redstone/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28478716,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-16T11:59:17.896Z","status":"ssl_error","status_checked_at":"2026-01-16T11:55:55.838Z","response_time":107,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["computational-physics","minecraft","minecraft-mod","minecraft-plugin","npc","quantum-computing","quantum-logic","redstone","redstone-circuit"],"created_at":"2026-01-16T12:39:26.385Z","updated_at":"2026-01-16T12:39:26.454Z","avatar_url":"https://github.com/toolate28.png","language":"Jupyter Notebook","funding_links":[],"categories":[],"sub_categories":[],"readme":"{\n \"cells\": [\n  {\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"# Quantum-Redstone Educational Framework\\n\",\n    \"\\n\",\n    \"**Mathematical bridge between quantum computing and Minecraft Redstone**\\n\",\n    \"\\n\",\n    \"---\"\n   ]\n  },\n  {\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"## Overview\\n\",\n    \"\\n\",\n    \"This framework implements quantum computing concepts using Minecraft's Redstone mechanics, making abstract quantum principles tangible and interactive.\\n\",\n    \"\\n\",\n    \"### Core Innovation: Two-Rail Encoding\\n\",\n    \"\\n\",\n    \"```\\n\",\n    \"Quantum: |ψ⟩ = α|0⟩ + β|1⟩  where |α|² + |β|² = 1\\n\",\n    \"Redstone: ALPHA + OMEGA = 15 (signal conservation)\\n\",\n    \"```\\n\",\n    \"\\n\",\n    \"The discrete constraint ALPHA + OMEGA = 15 is topologically equivalent to the continuous quantum normalization constraint, providing a teaching tool that preserves quantum mechanical structure.\"\n   ]\n  },\n  {\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"---\\n\",\n    \"## Generated Circuits\\n\",\n    \"\\n\",\n    \"All 7 quantum gates have been implemented:\\n\",\n    \"\\n\",\n    \"1. **State Preparation** (16 blocks) - Basis state initialization\\n\",\n    \"2. **Pauli-X Gate** (24 blocks) - Bit flip operation\\n\",\n    \"3. **Pauli-Z Gate** (31 blocks) - Phase flip operation\\n\",\n    \"4. **Hadamard Gate** (12 blocks) - Superposition creation\\n\",\n    \"5. **CNOT Gate** (83 blocks) - Two-qubit entanglement\\n\",\n    \"6. **Phase Evolution Engine** (102 blocks) - 16-step quantum phase rotation\\n\",\n    \"7. **Conservation Verifier** (14 blocks) - Validates ALPHA + OMEGA = 15\"\n   ]\n  },\n  {\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"### Files\\n\",\n    \"\\n\",\n    \"```\\n\",\n    \"quantum-redstone/\\n\",\n    \"├── quantum_circuit_generator.py    # Main generator (639 lines)\\n\",\n    \"├── quantum_circuits.json           # All 7 circuit definitions\\n\",\n    \"├── phase_lookup_table.json         # 16-step cos²/sin² table\\n\",\n    \"├── quantum_redstone_verification.ipynb  # Comprehensive verification notebook\\n\",\n    \"├── quantum.ipynb                   # Quantum computing foundations notebook\\n\",\n    \"├── HOPENPC.ipynb                   # ClaudeNPC integration notebook\\n\",\n    \"├── mcfunctions/                    # Minecraft function files\\n\",\n    \"│   ├── place_state_preparation.mcfunction\\n\",\n    \"│   ├── place_pauli_x_gate.mcfunction\\n\",\n    \"│   ├── place_pauli_z_gate.mcfunction\\n\",\n    \"│   ├── place_hadamard_gate.mcfunction\\n\",\n    \"│   ├── place_cnot_gate.mcfunction\\n\",\n    \"│   ├── place_phase_evolution_engine.mcfunction\\n\",\n    \"│   └── place_conservation_verifier.mcfunction\\n\",\n    \"└── quantum-redstone-proposal-v0.1.0-complete.md  # Full 146-page spec\\n\",\n    \"```\"\n   ]\n  },\n  {\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"---\\n\",\n    \"## Quick Start\\n\",\n    \"\\n\",\n    \"### Generate Circuits\\n\",\n    \"\\n\",\n    \"Run the circuit generator to create all quantum circuits:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"# Generate all quantum circuits\\n\",\n    \"!python quantum_circuit_generator.py\"\n   ]\n  },\n  {\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"**Output:**\\n\",\n    \"- `quantum_circuits.json` - Structured block data\\n\",\n    \"- `phase_lookup_table.json` - Phase evolution lookup table\\n\",\n    \"- `mcfunctions/*.mcfunction` - In-game placement commands\"\n   ]\n  },\n  {\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"### Place in Minecraft\\n\",\n    \"\\n\",\n    \"1. Copy `mcfunctions/` to your world's datapacks:\\n\",\n    \"   ```\\n\",\n    \"   .minecraft/saves/YourWorld/datapacks/quantum/data/quantum/functions/\\n\",\n    \"   ```\\n\",\n    \"\\n\",\n    \"2. In-game:\\n\",\n    \"   ```\\n\",\n    \"   /function quantum:place_state_preparation\\n\",\n    \"   /function quantum:place_hadamard_gate\\n\",\n    \"   ```\\n\",\n    \"\\n\",\n    \"3. Circuits will build at your current location (relative positioning)\"\n   ]\n  },\n  {\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"---\\n\",\n    \"## Interactive Notebooks\\n\",\n    \"\\n\",\n    \"The framework includes three Jupyter notebooks for exploration, learning, and integration:\\n\",\n    \"\\n\",\n    \"### 1. `quantum_redstone_verification.ipynb` - Comprehensive Verification\\n\",\n    \"**Focus:** Complete testing and validation suite\\n\",\n    \"\\n\",\n    \"Features:\\n\",\n    \"- Two-rail encoding validation across full phase range\\n\",\n    \"- Phase evolution testing with 16-step lookup table\\n\",\n    \"- Viviani curve 3D visualization\\n\",\n    \"- All 7 quantum gates verification\\n\",\n    \"- CAD export verification\\n\",\n    \"- Conservation constraint stress testing\\n\",\n    \"- End-to-end integration tests\\n\",\n    \"\\n\",\n    \"**Use case:** Verify framework correctness, run tests, validate exports\\n\",\n    \"\\n\",\n    \"### 2. `quantum.ipynb` - Quantum Computing Foundations\\n\",\n    \"**Focus:** Mathematical theory and quantum gate operations\\n\",\n    \"\\n\",\n    \"Features:\\n\",\n    \"- Bloch sphere visualization of quantum states\\n\",\n    \"- Quantum gate mathematics (Pauli, Hadamard, CNOT)\\n\",\n    \"- Unitary transformations and probability conservation\\n\",\n    \"- Phase space and Viviani curve topology\\n\",\n    \"- Quantum entanglement and Bell states\\n\",\n    \"- Measurement theory and Born rule\\n\",\n    \"- Quantum algorithms (Deutsch algorithm demo)\\n\",\n    \"\\n\",\n    \"**Use case:** Learn quantum computing theory, understand mathematical foundations, study advanced concepts\\n\",\n    \"\\n\",\n    \"### 3. `HOPENPC.ipynb` - ClaudeNPC Integration \u0026 Python Bridge\\n\",\n    \"**Focus:** AI-powered building and real-world deployment\\n\",\n    \"\\n\",\n    \"Features:\\n\",\n    \"- Python Bridge architecture for language → code → world pipeline\\n\",\n    \"- ClaudeNPC conversation simulator\\n\",\n    \"- Interactive circuit building with position management\\n\",\n    \"- Real-time mcfunction generation\\n\",\n    \"- AI observer pattern for circuit recognition\\n\",\n    \"- Educational curriculum management\\n\",\n    \"- Multi-circuit orchestration for quantum algorithms\\n\",\n    \"\\n\",\n    \"**Use case:** Deploy AI NPCs, build interactively, create educational experiences, automate circuit generation\"\n   ]\n  },\n  {\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"### Running the Notebooks\\n\",\n    \"\\n\",\n    \"First, install the required dependencies:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"# Install dependencies\\n\",\n    \"!pip install jupyter numpy matplotlib\"\n   ]\n  },\n  {\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"Then launch Jupyter and open any of the notebooks:\\n\",\n    \"- `quantum_redstone_verification.ipynb`\\n\",\n    \"- `quantum.ipynb`\\n\",\n    \"- `HOPENPC.ipynb`\\n\",\n    \"- `README.ipynb` (this notebook)\"\n   ]\n  },\n  {\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"---\\n\",\n    \"## Integration with ClaudeNPC\\n\",\n    \"\\n\",\n    \"ClaudeNPC can build these circuits via conversation:\\n\",\n    \"\\n\",\n    \"**Player:** \\\"Build a Hadamard gate here\\\"\\n\",\n    \"\\n\",\n    \"**ClaudeNPC:** *Executes Python bridge, places 12 blocks*\\n\",\n    \"\\n\",\n    \"See `ClaudeNPC-Server-Suite` repository for Python integration.\"\n   ]\n  },\n  {\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"---\\n\",\n    \"## Mathematical Foundation\\n\",\n    \"\\n\",\n    \"### Viviani Curve Topology\\n\",\n    \"\\n\",\n    \"The phase space lives on a Viviani curve - intersection of a cylinder and sphere:\\n\",\n    \"\\n\",\n    \"```\\n\",\n    \"x² + y² = 1  (unit cylinder)\\n\",\n    \"x² + y² + z² = 2z  (sphere)\\n\",\n    \"```\\n\",\n    \"\\n\",\n    \"When ALPHA + OMEGA = 15 (discrete), we get crossings at:\\n\",\n    \"- Step 2: ALPHA=8, OMEGA=7 (cos²φ ≈ 0.5)\\n\",\n    \"- Step 6: ALPHA=7, OMEGA=8\\n\",\n    \"- Step 10: ALPHA=8, OMEGA=7\\n\",\n    \"- Step 14: ALPHA=7, OMEGA=8\\n\",\n    \"\\n\",\n    \"These are the discrete analogs of Viviani crossing points where cos²φ = sin²φ = 0.5.\"\n   ]\n  },\n  {\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"### Conservation Verification\\n\",\n    \"\\n\",\n    \"The `conservation_verifier` circuit uses Redstone comparators in subtract mode:\\n\",\n    \"\\n\",\n    \"```\\n\",\n    \"15 - OMEGA → compare with ALPHA\\n\",\n    \"If equal: constraint satisfied\\n\",\n    \"If not: ERROR lamp lights\\n\",\n    \"```\\n\",\n    \"\\n\",\n    \"This provides runtime verification that quantum state normalization is preserved.\"\n   ]\n  },\n  {\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"---\\n\",\n    \"## Circuit Details\\n\",\n    \"\\n\",\n    \"### State Preparation\\n\",\n    \"\\n\",\n    \"Simplest circuit. Lever position controls basis state:\\n\",\n    \"- Lever ON → |0⟩ (ALPHA=15, OMEGA=0)\\n\",\n    \"- Lever OFF → |1⟩ (ALPHA=0, OMEGA=15)\\n\",\n    \"\\n\",\n    \"Uses inverter (Redstone torch on block) for rail inversion.\\n\",\n    \"\\n\",\n    \"### Hadamard Gate\\n\",\n    \"\\n\",\n    \"Creates superposition via \\\"averaging\\\":\\n\",\n    \"- Two chests with different fill levels\\n\",\n    \"- Chest 1: 32 items → signal 8\\n\",\n    \"- Chest 2: 28 items → signal 7\\n\",\n    \"- Dropout randomizer determines measurement outcome\\n\",\n    \"- Demonstrates probabilistic collapse\\n\",\n    \"\\n\",\n    \"### CNOT Gate\\n\",\n    \"\\n\",\n    \"Most complex. Two qubits (4 rails total):\\n\",\n    \"- Control qubit: ALPHA_C, OMEGA_C\\n\",\n    \"- Target qubit: ALPHA_T, OMEGA_T\\n\",\n    \"- Threshold detector on OMEGA_C\\n\",\n    \"- Piston-based conditional swap\\n\",\n    \"- Demonstrates entanglement\\n\",\n    \"\\n\",\n    \"### Phase Evolution Engine\\n\",\n    \"\\n\",\n    \"16-hopper ring counter cycles through phase states:\\n\",\n    \"- Each hopper position = one phase step\\n\",\n    \"- Lookup table chests provide cos²/sin² values\\n\",\n    \"- Comparators read chest fill levels\\n\",\n    \"- Outputs animate on Redstone lamps (15-lamp bars)\"\n   ]\n  },\n  {\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"---\\n\",\n    \"## Educational Use\\n\",\n    \"\\n\",\n    \"### Learning Objectives\\n\",\n    \"\\n\",\n    \"Students will understand:\\n\",\n    \"1. Quantum superposition (as discrete signal distribution)\\n\",\n    \"2. Measurement collapse (via randomizer mechanisms)\\n\",\n    \"3. Entanglement (via conditional operations)\\n\",\n    \"4. Phase evolution (as cyclic state transitions)\\n\",\n    \"5. Conservation laws (topological constraints)\\n\",\n    \"\\n\",\n    \"### Grade Levels\\n\",\n    \"\\n\",\n    \"- **Grades 6-8:** State preparation, measurement basics\\n\",\n    \"- **Grades 9-10:** Hadamard gate, superposition concepts\\n\",\n    \"- **Grades 11-12:** CNOT, entanglement, phase evolution\\n\",\n    \"- **Undergraduate:** Full mathematical formalism, Viviani topology\\n\",\n    \"\\n\",\n    \"### Curriculum Integration\\n\",\n    \"\\n\",\n    \"- **Physics:** Quantum mechanics, conservation laws\\n\",\n    \"- **Mathematics:** Trigonometry (cos²/sin²), topology\\n\",\n    \"- **Computer Science:** Logic gates, circuit design\\n\",\n    \"- **Engineering:** Signal processing, Boolean algebra\"\n   ]\n  },\n  {\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"---\\n\",\n    \"## Technical Specifications\\n\",\n    \"\\n\",\n    \"### Signal Encoding\\n\",\n    \"\\n\",\n    \"| Signal Level | Chest Items | cos²(φ) | Notes |\\n\",\n    \"|--------------|-------------|---------|-------|\\n\",\n    \"| 0 | 0 | 0.0000 | Empty |\\n\",\n    \"| 1 | 4 | 0.0667 | Minimal |\\n\",\n    \"| 7 | 28 | 0.4667 | Near superposition |\\n\",\n    \"| 8 | 32 | 0.5333 | Superposition |\\n\",\n    \"| 13 | 52 | 0.8667 | High amplitude |\\n\",\n    \"| 15 | 60 | 1.0000 | Full signal |\\n\",\n    \"\\n\",\n    \"### Timing Considerations\\n\",\n    \"\\n\",\n    \"- **Hopper clock:** 8-tick cycle (0.4 seconds)\\n\",\n    \"- **Comparator delay:** 1 tick\\n\",\n    \"- **Piston extension:** 2 ticks\\n\",\n    \"- **Recommended TPS:** 20 (vanilla)\\n\",\n    \"\\n\",\n    \"### Chunk Loading\\n\",\n    \"\\n\",\n    \"Large circuits (CNOT, Phase Engine) may span multiple chunks. Use:\\n\",\n    \"- Spawn chunks for permanent operation\\n\",\n    \"- Chunk loaders for remote locations\\n\",\n    \"- Pregen world before building\"\n   ]\n  },\n  {\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"---\\n\",\n    \"## Performance\\n\",\n    \"\\n\",\n    \"### Resource Requirements\\n\",\n    \"\\n\",\n    \"| Circuit | Blocks | Chunks | Build Time |\\n\",\n    \"|---------|--------|--------|------------|\\n\",\n    \"| State Prep | 16 | 1 | 30 sec |\\n\",\n    \"| Pauli-X | 24 | 1 | 1 min |\\n\",\n    \"| Pauli-Z | 31 | 1 | 1 min |\\n\",\n    \"| Hadamard | 12 | 1 | 30 sec |\\n\",\n    \"| CNOT | 83 | 2 | 3 min |\\n\",\n    \"| Phase Engine | 102 | 3 | 5 min |\\n\",\n    \"| Conservation | 14 | 1 | 30 sec |\\n\",\n    \"\\n\",\n    \"### TPS Impact\\n\",\n    \"\\n\",\n    \"With all 7 circuits active:\\n\",\n    \"- Vanilla server: ~2% TPS reduction\\n\",\n    \"- Paper/Spigot: ~1% TPS reduction\\n\",\n    \"- Negligible when idle (no active signals)\"\n   ]\n  },\n  {\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"---\\n\",\n    \"## Future Work\\n\",\n    \"\\n\",\n    \"### Planned Circuits\\n\",\n    \"\\n\",\n    \"- Toffoli gate (universal classical computing)\\n\",\n    \"- Controlled-Phase gate\\n\",\n    \"- SWAP gate\\n\",\n    \"- Quantum Fourier Transform (QFT) - partial implementation\\n\",\n    \"\\n\",\n    \"### Litematica Export\\n\",\n    \"\\n\",\n    \"Not yet implemented. Schematics would enable:\\n\",\n    \"- One-click circuit placement\\n\",\n    \"- Circuit libraries\\n\",\n    \"- Community sharing\\n\",\n    \"\\n\",\n    \"### ClaudeNPC Observer\\n\",\n    \"\\n\",\n    \"AI NPCs could:\\n\",\n    \"- Read Redstone signals\\n\",\n    \"- Explain what circuit is doing\\n\",\n    \"- Debug signal propagation\\n\",\n    \"- Suggest optimizations\"\n   ]\n  },\n  {\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"---\\n\",\n    \"## Credits\\n\",\n    \"\\n\",\n    \"**Framework:** Hope\u0026\u0026Sauced Collaborative  \\n\",\n    \"**Mathematical Foundation:** Based on Viviani curve topology  \\n\",\n    \"**Implementation:** Python → Minecraft NBT/mcfunction  \\n\",\n    \"**Testing:** Virtual Redstone simulation  \\n\",\n    \"\\n\",\n    \"## License\\n\",\n    \"\\n\",\n    \"Educational use encouraged. Attribution appreciated.\\n\",\n    \"\\n\",\n    \"**The Evenstar Guides Us** ✦\"\n   ]\n  },\n  {\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"---\\n\",\n    \"## 📸 Showcase\\n\",\n    \"\\n\",\n    \"### mcstart Dashboard\\n\",\n    \"\\n\",\n    \"![Dashboard Overview](showcase/mcstart1.png)  \\n\",\n    \"*SpiralSafe Dashboard - Quick access to quantum circuit generation*\\n\",\n    \"\\n\",\n    \"![Project Status](showcase/mcstart2.png)  \\n\",\n    \"*Build status - All 7 quantum circuits ready*\\n\",\n    \"\\n\",\n    \"![Circuit Testing](showcase/mcstart3.png)  \\n\",\n    \"*Validation suite - Conservation constraint verified*\\n\",\n    \"\\n\",\n    \"![CAD Export](showcase/mcstart4.png)  \\n\",\n    \"*CAD integration - DXF, STL, OBJ, SVG exports*\"\n   ]\n  },\n  {\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"### CAD Exports\\n\",\n    \"\\n\",\n    \"All circuits available in multiple CAD formats:\\n\",\n    \"\\n\",\n    \"```\\n\",\n    \"cad_exports/\\n\",\n    \"├── state_preparation.{dxf,stl,obj,svg}\\n\",\n    \"├── pauli_x_gate.{dxf,stl,obj,svg}\\n\",\n    \"├── pauli_z_gate.{dxf,stl,obj,svg}\\n\",\n    \"├── hadamard_gate.{dxf,stl,obj,svg}\\n\",\n    \"├── cnot_gate.{dxf,stl,obj,svg}\\n\",\n    \"├── phase_evolution_engine.{dxf,stl,obj,svg}\\n\",\n    \"└── conservation_verifier.{dxf,stl,obj,svg}\\n\",\n    \"```\\n\",\n    \"\\n\",\n    \"**Import into:**\\n\",\n    \"- AutoCAD, LibreCAD (DXF)\\n\",\n    \"- Blender, Maya, 3ds Max (OBJ)\\n\",\n    \"- FreeCAD, SolidWorks, Fusion 360 (STL)\\n\",\n    \"- Inkscape, Illustrator (SVG)\"\n   ]\n  },\n  {\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"**Generate CAD files:**\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"# Export all circuits to CAD formats\\n\",\n    \"!python export_cad.py\"\n   ]\n  },\n  {\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"---\\n\",\n    \"## 🏗️ For 3D Printing\\n\",\n    \"\\n\",\n    \"STL files are ready for 3D printing at 1:1 scale (1 block = 1 meter in CAD units).\\n\",\n    \"\\n\",\n    \"Scale factor recommendations:\\n\",\n    \"- **Desktop display:** 0.01x (1 block = 1cm)\\n\",\n    \"- **Miniature:** 0.005x (1 block = 5mm)\\n\",\n    \"- **Large model:** 0.05x (1 block = 5cm)\\n\",\n    \"\\n\",\n    \"Print settings:\\n\",\n    \"- Layer height: 0.2mm\\n\",\n    \"- Infill: 15-20%\\n\",\n    \"- Supports: Auto-generate\\n\",\n    \"- Material: PLA, PETG, or Resin\\n\",\n    \"\\n\",\n    \"---\\n\",\n    \"\\n\",\n    \"**Build quantum computers in Minecraft, export to CAD, 3D print the circuits!**\"\n   ]\n  },\n  {\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"---\\n\",\n    \"## Interactive Examples\\n\",\n    \"\\n\",\n    \"### Example 1: Load and Inspect Circuit Data\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"import json\\n\",\n    \"from pathlib import Path\\n\",\n    \"\\n\",\n    \"# Load quantum circuits\\n\",\n    \"circuits_file = Path('quantum_circuits.json')\\n\",\n    \"if circuits_file.exists():\\n\",\n    \"    with open(circuits_file, 'r') as f:\\n\",\n    \"        data = json.load(f)\\n\",\n    \"    \\n\",\n    \"    print(\\\"Available Circuits:\\\")\\n\",\n    \"    print(\\\"=\\\"*50)\\n\",\n    \"    print(f\\\"Version: {data.get('version', 'N/A')}\\\")\\n\",\n    \"    print(f\\\"Author: {data.get('author', 'N/A')}\\\")\\n\",\n    \"    print(f\\\"\\\\n{data.get('description', '')}\\\\n\\\")\\n\",\n    \"    \\n\",\n    \"    for circuit in data.get('circuits', []):\\n\",\n    \"        name = circuit.get('name', 'Unknown')\\n\",\n    \"        blocks = circuit.get('block_count', 0)\\n\",\n    \"        desc = circuit.get('description', 'N/A')\\n\",\n    \"        dims = circuit.get('dimensions', {})\\n\",\n    \"        \\n\",\n    \"        print(f\\\"\\\\n{name}:\\\")\\n\",\n    \"        print(f\\\"  - Description: {desc}\\\")\\n\",\n    \"        print(f\\\"  - Total blocks: {blocks}\\\")\\n\",\n    \"        print(f\\\"  - Dimensions: {dims.get('x', 0)}x{dims.get('y', 0)}x{dims.get('z', 0)}\\\")\\n\",\n    \"else:\\n\",\n    \"    print(\\\"❌ Circuit file not found. Run quantum_circuit_generator.py first!\\\")\"\n   ]\n  },\n  {\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"### Example 2: Visualize Phase Lookup Table\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"import json\\n\",\n    \"import matplotlib.pyplot as plt\\n\",\n    \"import numpy as np\\n\",\n    \"from pathlib import Path\\n\",\n    \"\\n\",\n    \"# Load phase lookup table\\n\",\n    \"phase_file = Path('phase_lookup_table.json')\\n\",\n    \"if phase_file.exists():\\n\",\n    \"    with open(phase_file, 'r') as f:\\n\",\n    \"        phase_data = json.load(f)\\n\",\n    \"    \\n\",\n    \"    # Extract data from entries array\\n\",\n    \"    steps = []\\n\",\n    \"    alphas = []\\n\",\n    \"    omegas = []\\n\",\n    \"    \\n\",\n    \"    for entry in phase_data.get('entries', []):\\n\",\n    \"        steps.append(entry['step'])\\n\",\n    \"        alphas.append(entry['alpha'])\\n\",\n    \"        omegas.append(entry['omega'])\\n\",\n    \"    \\n\",\n    \"    # Create visualization\\n\",\n    \"    fig, (ax1, ax2) = plt.subplots(2, 1, figsize=(12, 8))\\n\",\n    \"    \\n\",\n    \"    # Plot alpha and omega signals\\n\",\n    \"    ax1.plot(steps, alphas, 'b-o', label='ALPHA', linewidth=2, markersize=6)\\n\",\n    \"    ax1.plot(steps, omegas, 'r-s', label='OMEGA', linewidth=2, markersize=6)\\n\",\n    \"    ax1.axhline(y=15, color='g', linestyle='--', alpha=0.3, label='Total (ALPHA+OMEGA)')\\n\",\n    \"    ax1.set_xlabel('Phase Step', fontsize=12)\\n\",\n    \"    ax1.set_ylabel('Signal Strength', fontsize=12)\\n\",\n    \"    ax1.set_title('Two-Rail Encoding: Phase Evolution', fontsize=14, fontweight='bold')\\n\",\n    \"    ax1.legend(fontsize=10)\\n\",\n    \"    ax1.grid(True, alpha=0.3)\\n\",\n    \"    ax1.set_ylim(0, 16)\\n\",\n    \"    \\n\",\n    \"    # Plot conservation constraint\\n\",\n    \"    conservation = [a + o for a, o in zip(alphas, omegas)]\\n\",\n    \"    ax2.plot(steps, conservation, 'g-o', linewidth=2, markersize=6)\\n\",\n    \"    ax2.axhline(y=15, color='r', linestyle='--', alpha=0.5, label='Expected (15)')\\n\",\n    \"    ax2.set_xlabel('Phase Step', fontsize=12)\\n\",\n    \"    ax2.set_ylabel('ALPHA + OMEGA', fontsize=12)\\n\",\n    \"    ax2.set_title('Conservation Constraint Verification', fontsize=14, fontweight='bold')\\n\",\n    \"    ax2.legend(fontsize=10)\\n\",\n    \"    ax2.grid(True, alpha=0.3)\\n\",\n    \"    ax2.set_ylim(14, 16)\\n\",\n    \"    \\n\",\n    \"    plt.tight_layout()\\n\",\n    \"    plt.show()\\n\",\n    \"    \\n\",\n    \"    print(\\\"\\\\n✅ Phase evolution visualization complete!\\\")\\n\",\n    \"    print(f\\\"\\\\nConservation check: All values = 15? {all(c == 15 for c in conservation)}\\\")\\n\",\n    \"else:\\n\",\n    \"    print(\\\"❌ Phase lookup table not found. Run quantum_circuit_generator.py first!\\\")\"\n   ]\n  },\n  {\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"### Example 3: Generate and Test a Circuit\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"# Import circuit generator functions\\n\",\n    \"try:\\n\",\n    \"    from quantum_circuit_generator import (\\n\",\n    \"        generate_hadamard_gate,\\n\",\n    \"        generate_state_preparation,\\n\",\n    \"        verify_conservation\\n\",\n    \"    )\\n\",\n    \"    \\n\",\n    \"    print(\\\"Generating circuits...\\\\n\\\")\\n\",\n    \"    \\n\",\n    \"    # Generate state preparation\\n\",\n    \"    state_prep = generate_state_preparation()\\n\",\n    \"    print(f\\\"✅ State Preparation: {len(state_prep['blocks'])} blocks\\\")\\n\",\n    \"    \\n\",\n    \"    # Generate Hadamard gate\\n\",\n    \"    hadamard = generate_hadamard_gate()\\n\",\n    \"    print(f\\\"✅ Hadamard Gate: {len(hadamard['blocks'])} blocks\\\")\\n\",\n    \"    \\n\",\n    \"    # Test conservation\\n\",\n    \"    test_alpha = 8\\n\",\n    \"    test_omega = 7\\n\",\n    \"    is_valid = verify_conservation(test_alpha, test_omega)\\n\",\n    \"    print(f\\\"\\\\n🔬 Conservation Test: ALPHA={test_alpha}, OMEGA={test_omega}\\\")\\n\",\n    \"    print(f\\\"   Result: {'✅ VALID' if is_valid else '❌ INVALID'}\\\")\\n\",\n    \"    \\n\",\n    \"except ImportError as e:\\n\",\n    \"    print(f\\\"❌ Error importing circuit generator: {e}\\\")\\n\",\n    \"    print(\\\"Make sure quantum_circuit_generator.py is in the current directory.\\\")\"\n   ]\n  },\n  {\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"---\\n\",\n    \"\\n\",\n    \"## Next Steps\\n\",\n    \"\\n\",\n    \"1. **Explore the other notebooks:**\\n\",\n    \"   - `quantum.ipynb` for quantum computing theory\\n\",\n    \"   - `quantum_redstone_verification.ipynb` for comprehensive testing\\n\",\n    \"   - `HOPENPC.ipynb` for AI integration\\n\",\n    \"\\n\",\n    \"2. **Generate circuits:**\\n\",\n    \"   - Run `quantum_circuit_generator.py`\\n\",\n    \"   - Experiment with different parameters\\n\",\n    \"\\n\",\n    \"3. **Build in Minecraft:**\\n\",\n    \"   - Copy mcfunctions to your world\\n\",\n    \"   - Execute placement commands\\n\",\n    \"   - Test circuit functionality\\n\",\n    \"\\n\",\n    \"4. **Contribute:**\\n\",\n    \"   - Report issues on GitHub\\n\",\n    \"   - Submit improvements\\n\",\n    \"   - Share educational use cases\\n\",\n    \"\\n\",\n    \"---\\n\",\n    \"\\n\",\n    \"**Happy Quantum Building! 🔴⚡🔵**\"\n   ]\n  }\n ],\n \"metadata\": {\n  \"kernelspec\": {\n   \"display_name\": \"Python 3\",\n   \"language\": \"python\",\n   \"name\": \"python3\"\n  },\n  \"language_info\": {\n   \"codemirror_mode\": {\n    \"name\": \"ipython\",\n    \"version\": 3\n   },\n   \"file_extension\": \".py\",\n   \"mimetype\": \"text/x-python\",\n   \"name\": \"python\",\n   \"nbconvert_exporter\": \"python\",\n   \"pygments_lexer\": \"ipython3\",\n   \"version\": \"3.10.0\"\n  }\n },\n \"nbformat\": 4,\n \"nbformat_minor\": 4\n}\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftoolate28%2Fquantum-redstone","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftoolate28%2Fquantum-redstone","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftoolate28%2Fquantum-redstone/lists"}