Unified cosmological simulation framework: quantum mechanics, N-body dynamics, coherence evolution, matter genesis, and holographic analysis
Project description
๐ Unified Cosmological Simulation Framework
A comprehensive Python library combining quantum mechanics, N-body dynamics, coherence evolution, matter genesis, and holographic analysis.
๐ Features
| Module | Description |
|---|---|
| quantum | Multi-qubit systems, entanglement, emergent laws, observer decoherence |
| cosmic | N-body gravitational simulations, orbital mechanics, presets |
| coherence | Universe coherence evolution, information theory, predictions |
| genesis | Parametric resonance, leptogenesis, quantum particle creation |
| holographic | k-alpha analysis, information capacity, cosmological models |
| visualization | 3D/2D plots, animations, unified plotting API |
๐ฆ Installation
# Clone the repository
git clone https://github.com/xtimon/unified-sim.git
cd unified-sim
# Install in development mode
pip install -e .
# Or install with all dependencies
pip install -e ".[all]"
GPU Acceleration (Optional)
# NVIDIA CUDA
pip install -e ".[gpu-cuda]"
# AMD/NVIDIA/Intel (Vulkan)
pip install -e ".[gpu-vulkan]"
# AMD/NVIDIA/Intel (OpenCL)
pip install -e ".[gpu-opencl]"
๐ฏ Quick Start
Quantum Simulation
from sim.quantum import QuantumFabric, EmergentLaws, HUMAN_OBSERVER
# Create 3-qubit system
qf = QuantumFabric(num_qubits=3)
# Create Bell states via entanglement
qf.apply_entanglement_operator([(0, 1), (1, 2)])
print(f"Entanglement entropy: {qf.get_entanglement_entropy():.4f}")
# Measure a qubit
result = qf.measure(0)
print(f"Measured: |{result}>")
# Emergent physics
particles = EmergentLaws.simulate_particle_creation(vacuum_energy=0.2)
energy = EmergentLaws.landauer_principle(bits_erased=1e6, temperature=300)
N-Body Simulation
from sim.cosmic import NBodySimulator, SystemPresets
# Create Solar System
presets = SystemPresets()
bodies = presets.create_solar_system(include_outer_planets=True)
# Simulate 1 year
sim = NBodySimulator(bodies)
times, states = sim.simulate(t_span=(0, 365.25*24*3600), n_points=2000)
# Analyze
print(f"Total energy: {sim.get_total_energy():.2e} J")
print(f"Center of mass: {sim.get_center_of_mass()}")
Coherence Evolution
from sim.coherence import CoherenceModel
from sim.constants import UNIVERSE_STAGES
model = CoherenceModel()
K, C, Total = model.evolve(N=12, alpha=0.66)
for i, stage in enumerate(UNIVERSE_STAGES):
print(f"{stage}: K = {K[i]:.4f}")
print(f"Growth: {K[-1]/K[0]:.2f}x")
Matter Genesis
from sim.genesis import MatterGenesisSimulation, LeptogenesisModel
# Leptogenesis
lepto = LeptogenesisModel(M=1e10, CP_violation=1e-6)
result = lepto.solve_leptogenesis()
print(f"Baryon asymmetry: {result['eta_B']:.2e}")
# Full simulation
sim = MatterGenesisSimulation()
history = sim.evolve_universe(total_time=1000)
Holographic Analysis
from sim.holographic import HolographicAnalysis
analysis = HolographicAnalysis()
results = analysis.analyze_all_models()
print(f"Mean k: {results['mean_k']:.6f}")
print(f"k/ฮฑ โ {results['mean_k_over_alpha']:.1f}") # โ 66
๐ฅ๏ธ Command Line Interface
# Show library info
sim info
# Run quantum simulation
sim quantum --qubits 5 --entangle
# Run N-body simulation
sim cosmic --system solar --days 365
# Run coherence evolution
sim coherence --stages 24 --alpha 0.66
# Generate holographic report
sim holographic --report
๐ Visualization
from sim.visualization import (
plot_trajectories_3d,
plot_coherence_evolution,
plot_quantum_state,
animate_simulation
)
# 3D trajectory plot
fig = plot_trajectories_3d(bodies, title="Solar System")
# Coherence bar chart
fig = plot_coherence_evolution(K, stages=UNIVERSE_STAGES)
# Quantum state distribution
fig = plot_quantum_state(qf.get_probability_distribution())
# Animation
anim = animate_simulation(bodies, save_path='orbit.gif')
๐ Project Structure
unified-sim/
โโโ sim/
โ โโโ __init__.py # Main API exports
โ โโโ constants/ # Physical & cosmological constants
โ โ โโโ fundamental.py # ฮฑ, G, c, masses, etc.
โ โ โโโ cosmological.py # H0, ฮฉ, A_s, n_s, k, etc.
โ โโโ core/ # Base classes & utilities
โ โ โโโ base.py # SimulationBase, SimulationResult
โ โ โโโ gpu.py # GPU acceleration
โ โ โโโ io.py # Save/load utilities
โ โโโ quantum/ # Quantum mechanics
โ โ โโโ fabric.py # QuantumFabric (multi-qubit)
โ โ โโโ emergence.py # EmergentLaws
โ โ โโโ observer.py # Observer decoherence
โ โโโ cosmic/ # N-body dynamics
โ โ โโโ body.py # Body class
โ โ โโโ nbody.py # NBodySimulator
โ โ โโโ presets.py # SystemPresets
โ โ โโโ calculator.py # CosmicCalculator
โ โโโ coherence/ # Universe coherence
โ โ โโโ models.py # CoherenceModel, DepositionModel
โ โ โโโ simulator.py # UniverseSimulator
โ โโโ genesis/ # Matter creation
โ โ โโโ resonance.py # ParametricResonance
โ โ โโโ leptogenesis.py # LeptogenesisModel
โ โ โโโ quantum_creation.py
โ โ โโโ simulation.py # MatterGenesisSimulation
โ โโโ holographic/ # Holographic analysis
โ โ โโโ analysis.py # HolographicAnalysis
โ โ โโโ report.py # UniverseFormulaReport
โ โโโ visualization/ # Plotting
โ โ โโโ plots.py # All visualization functions
โ โโโ cli/ # Command line interface
โ โโโ main.py
โโโ examples/
โ โโโ quick_start.py
โโโ tests/
โโโ pyproject.toml
โโโ requirements.txt
โโโ README.md
๐ฌ Physical Models
Coherence Model
$$K(n) = K_0 + \alpha \cdot \sum_{k=0}^{n-1} \frac{K(k)}{N - k}$$
Holographic Relation
$$k = \pi \cdot \alpha_{fs} \cdot \frac{\ln(1/A_s)}{n_s} \approx 66\alpha$$
Boltzmann Equations (Leptogenesis)
$$\frac{dY_L}{dz} = \epsilon D (Y_N - Y_N^{eq}) - W Y_L$$
๐ Dependencies
- numpy >= 1.21.0
- scipy >= 1.7.0
- matplotlib >= 3.5.0
- pandas >= 1.3.0
Optional:
- cupy (CUDA acceleration)
- vulkpy (Vulkan acceleration)
- pyopencl (OpenCL acceleration)
๐ค Contributing
Contributions welcome! Please:
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing) - Commit changes (
git commit -m 'Add amazing feature') - Push to branch (
git push origin feature/amazing) - Open a Pull Request
๐ License
MIT License - see LICENSE for details.
๐ค Author
Timur Isanov
- Email: tisanov@yahoo.com
- GitHub: @xtimon
๐ Acknowledgments
This unified framework combines features from:
- coherence-sim - Coherence evolution models
- cosmic-sim - N-body simulations
- oscillators-cosmology - Matter genesis
- reality-sim - Quantum mechanics
- holo - Holographic analysis
All based on current cosmological data from Planck 2018, WMAP, and other surveys.
โญ Star this repo if you find it useful!
Project details
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 cosmic_unified_sim-0.1.0.tar.gz.
File metadata
- Download URL: cosmic_unified_sim-0.1.0.tar.gz
- Upload date:
- Size: 76.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
acb8f09e37edc728c339b0f7a6a3ea94321a01a7c2e07d8fa71579a5ec06d4e6
|
|
| MD5 |
2bd30f47dcec215ea14bb86b530ee74e
|
|
| BLAKE2b-256 |
c9b7f13e3fea05980d919ccedb8f291d722d6eed4edb52e6c643f32bf4ed7b67
|
Provenance
The following attestation bundles were made for cosmic_unified_sim-0.1.0.tar.gz:
Publisher:
publish.yml on xtimon/cosmic-unified-sim
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
cosmic_unified_sim-0.1.0.tar.gz -
Subject digest:
acb8f09e37edc728c339b0f7a6a3ea94321a01a7c2e07d8fa71579a5ec06d4e6 - Sigstore transparency entry: 793314367
- Sigstore integration time:
-
Permalink:
xtimon/cosmic-unified-sim@4a250eb2d472cb1f91daca6dba75ee0a00275e85 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/xtimon
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@4a250eb2d472cb1f91daca6dba75ee0a00275e85 -
Trigger Event:
release
-
Statement type:
File details
Details for the file cosmic_unified_sim-0.1.0-py3-none-any.whl.
File metadata
- Download URL: cosmic_unified_sim-0.1.0-py3-none-any.whl
- Upload date:
- Size: 83.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ef0f28d5179d518f499bd120137c975db0f0478ffb58f7ad20a619891c8362af
|
|
| MD5 |
536b68f373d1471a04c0da7c8221dc48
|
|
| BLAKE2b-256 |
68145e663336e5ccba35d4208c8467f984732e6de60de2ac19178062dfa4f084
|
Provenance
The following attestation bundles were made for cosmic_unified_sim-0.1.0-py3-none-any.whl:
Publisher:
publish.yml on xtimon/cosmic-unified-sim
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
cosmic_unified_sim-0.1.0-py3-none-any.whl -
Subject digest:
ef0f28d5179d518f499bd120137c975db0f0478ffb58f7ad20a619891c8362af - Sigstore transparency entry: 793314415
- Sigstore integration time:
-
Permalink:
xtimon/cosmic-unified-sim@4a250eb2d472cb1f91daca6dba75ee0a00275e85 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/xtimon
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@4a250eb2d472cb1f91daca6dba75ee0a00275e85 -
Trigger Event:
release
-
Statement type: