{"id":27157954,"url":"https://github.com/angrysky56/quantum_three_body","last_synced_at":"2025-04-08T21:52:41.783Z","repository":{"id":284155876,"uuid":"953997647","full_name":"angrysky56/quantum_three_body","owner":"angrysky56","description":"This project explores the analogy between the classical three-body problem and a system of three entangled qubits. It investigates how quantum entanglement dynamics might mirror or differ from classical chaotic systems, potentially offering insights into quantum-classical correspondence.","archived":false,"fork":false,"pushed_at":"2025-03-24T12:33:14.000Z","size":6808,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-24T13:32:19.290Z","etag":null,"topics":["chaos","hamiltonian","heisenburg","ising","quantum"],"latest_commit_sha":null,"homepage":"","language":"Jupyter Notebook","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/angrysky56.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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}},"created_at":"2025-03-24T12:08:07.000Z","updated_at":"2025-03-24T12:54:03.000Z","dependencies_parsed_at":"2025-03-24T13:32:23.854Z","dependency_job_id":"4492e83c-e496-48f0-bcde-2431fb44fd32","html_url":"https://github.com/angrysky56/quantum_three_body","commit_stats":null,"previous_names":["angrysky56/quantum_three_body"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/angrysky56%2Fquantum_three_body","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/angrysky56%2Fquantum_three_body/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/angrysky56%2Fquantum_three_body/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/angrysky56%2Fquantum_three_body/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/angrysky56","download_url":"https://codeload.github.com/angrysky56/quantum_three_body/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247934789,"owners_count":21020724,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["chaos","hamiltonian","heisenburg","ising","quantum"],"created_at":"2025-04-08T21:52:41.221Z","updated_at":"2025-04-08T21:52:41.770Z","avatar_url":"https://github.com/angrysky56.png","language":"Jupyter Notebook","funding_links":[],"categories":[],"sub_categories":[],"readme":"# quantum_three_body\n \n# 🌌 Quantum Three-Body Simulation\n\nThis project explores the analogy between the classical three-body problem and a system of three entangled qubits. It investigates how quantum entanglement dynamics might mirror or differ from classical chaotic systems, potentially offering insights into quantum-classical correspondence.\n\nA lot isn't working right but maybe someone will have fun with it, I am not a mathematician or coder.\n\n![alt text](image.png)\n![alt text](image-1.png)\n\n## 🚀 Features\n\n- **Multiple Quantum Models**: \n  - Ising model with transverse field\n  - Heisenberg model with anisotropy\n  - Gravitational analog model\n  - Time-dependent Hamiltonian simulations\n\n- **GPU Acceleration**: \n  - CUDA-powered quantum evolution for faster simulations\n  - Parallel computation of quantum chaos metrics\n  - Optimized for NVIDIA RTX series GPUs\n\n- **Advanced Analysis**: \n  - Entanglement metrics (concurrence, von Neumann entropy)\n  - Quantum chaos indicators (fidelity decay, Lyapunov exponents)\n  - Quantum butterfly effect quantification\n\n- **Visualization**: \n  - Interactive Bloch sphere representations\n  - 3D phase space visualizations\n  - Entanglement dynamics plots\n  - Animated quantum state evolution\n\n## 🔬 Scientific Background\n\nThe classical three-body problem in physics describes the motion of three objects interacting through gravitational forces. It's famously chaotic and generally lacks analytical solutions. This project explores a quantum analog where three qubits interact through various coupling mechanisms, examining how concepts like chaos, predictability, and information scrambling manifest in quantum systems.\n\nKey research questions include:\n- How does quantum entanglement serve as an analog to classical gravitational interaction?\n- What quantum signatures correspond to classical chaos?\n- How does information spread in coupled qubit systems?\n- Where does the quantum-classical correspondence break down?\n\n## 📋 Project Structure\n\n```\nquantum_three_body/\n├── notebooks/             # Jupyter notebooks for exploration and visualization\n│   ├── quantum_simulation.ipynb    # Main simulation notebook\n│   └── other exploratory notebooks\n├── src/                   # Core simulation code\n│   ├── dynamics.py        # Quantum dynamics engine\n│   ├── gpu_accelerator.py # GPU acceleration utilities\n│   ├── hamiltonian.py     # Quantum Hamiltonian models\n│   ├── simulation.py      # High-level simulation presets\n│   └── visualization.py   # Visualization tools\n├── tests/                 # Unit tests\n├── requirements.txt       # Package dependencies\n└── README.md              # Project documentation\n```\n\n## 🔧 Setup\n\n### Prerequisites\n\n- Python 3.8+\n- [QuTiP](https://qutip.org/) for quantum toolbox functions\n- NumPy, SciPy, Matplotlib for scientific computing\n- [CuPy](https://cupy.dev/) (optional, for GPU acceleration)\n\n### Installation\n```bash\n# Clone the repository\ngit clone https://github.com/angrysky56/quantum_three_body.git\ncd quantum_three_body\n\n# Create and activate virtual environment\npython -m venv venv\nsource venv/bin/activate  # On Windows: venv\\Scripts\\activate\n\n# Install dependencies\npip install -r requirements.txt\n\n# For GPU acceleration (CUDA 12.x) Check your cuda version: nvcc --version and alter version below if required\n\npip install cupy-cuda12x\n```\n\n## 💻 Usage\n\n### Quick Start\n\nThe easiest way to get started is by running the main simulation notebook:\n\n```bash\n# Launch the notebook server\npython run_notebook.py\n```\n\nThen open `quantum_chaos_explorer.ipynb` in your browser.\n\n### Running Simulations\n\n```python\n# Import the simulation module\nfrom src.simulation import SimulationPresets\n\n# Run an Ising model simulation\nresults = SimulationPresets.run_ising_model(\n    J_coupling=1.0,\n    h_field=0.5,\n    initial_state_type='ghz',\n    tmax=10.0,\n    nsteps=1000,\n    compute_metrics=True\n)\n\n# Access the results\ndynamics = results['dynamics']\nmetrics = results['metrics']\n```\n\n### Visualization\n\n```python\nfrom src.visualization import plot_three_qubit_bloch_spheres\n\n# Plot Bloch vectors for each qubit\nbloch_fig = plot_three_qubit_bloch_spheres(\n    results['metrics']['bloch_vectors'],\n    title=\"Ising Model - Qubit Bloch Vectors\"\n)\n```\n\n## 🧪 GPU Acceleration\n\nThis project supports GPU acceleration for quantum simulations:\n\n```python\n# Forcing CPU mode (if GPU causes issues)\nresults = SimulationPresets.run_heisenberg_model(\n    J_coupling=1.0,\n    anisotropy=0.5,\n    initial_state_type='ghz',\n    force_cpu=True  # Disable GPU acceleration\n)\n```\n\nFor best performance on NVIDIA GPUs:\n- CuPy 12.x for CUDA 12.x compatibility\n- At least 6GB VRAM for complex simulations\n- Reset GPU resources between runs to avoid CUDA memory issues\n\n## 📊 Example Results\n\nThe simulations reveal interesting quantum behaviors:\n\n- **Ising Model**: Displays oscillatory entanglement dynamics with partial revivals\n- **Heisenberg Model**: Shows complex dynamics due to isotropic interactions\n- **Gravitational Analog**: Exhibits chaotic-like behavior similar to classical systems\n- **Time-Dependent Models**: Demonstrates resonance effects and complex driving responses\n\n## 📚 Contributing\n\nContributions are welcome! Please feel free to submit a Pull Request.\n\n## 📄 License\n\nThis project is licensed under the MIT License - see the LICENSE file for details.\n\n## 🔗 References\n\n- Nielsen, M. A., \u0026 Chuang, I. L. (2010). Quantum Computation and Quantum Information. Cambridge University Press.\n- Schlosshauer, M. (2007). Decoherence and the Quantum-to-Classical Transition. Springer.\n- QuTiP: Quantum Toolbox in Python, https://qutip.org/\n\n## 👥 Authors\n\n- Claude, GPT4o - Initial work - [angrysky56](https://github.com/angrysky56)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fangrysky56%2Fquantum_three_body","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fangrysky56%2Fquantum_three_body","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fangrysky56%2Fquantum_three_body/lists"}