PyConsciousness is an open-source toolkit that implements a novel, axiomatic theory where consciousness and spacetime emerge together from a network of fundamental quantum units called Dynamic Zero-Points (DZPs).
For the first time, you can run simulations on your laptop that reproduce published theoretical predictions, explore consciousness phase transitions, and validate fundamental physics constraints.
π Try the interactive demo now:
Run the exact simulations from our theoretical paper and reproduce the predicted consciousness intensity values (Ξ¦_C = 0.21, 0.17, 0.12) with zero parameter fitting.
from pyconsciousness.validation import reproduce_paper
results = reproduce_paper.run_three_groups() # Low, Medium, High "cosmic curvature"
reproduce_paper.plot_figure_1(results) # Generates the two-stage emergence plot
Discover how consciousness intensity Ξ¦_C exhibits a nonlinear jump when the DZP network exceeds a critical size (~32 nodes), a key prediction of Integrated Information Theory.
from pyconsciousness.validation import phase_transition
results = phase_transition.explore_network_size([8, 16, 32, 64])
# Witness Ξ¦_C jump from 0.35 (N=16) to 0.69 (N=32)!
Verify that all simulations obey the Entropy-Cone Inequality, a fundamental thermodynamic constraint from quantum gravity. Every data point stays within bounds.
from pyconsciousness.validation import entropy_cone
cone_data = entropy_cone.validate_cone_constraint(results)
entropy_cone.plot_entropy_cone(cone_data) # Paper-quality validation figure
pip install pyconsciousness
Or clone and install in development mode:
git clone https://github.com/guanlei505/PyConsciousness.git
cd PyConsciousness
pip install -e .
import pyconsciousness as pc
# 1. Create a simple network
import networkx as nx
G = nx.erdos_renyi_graph(n=20, p=0.3)
# 2. Calculate its consciousness-related metrics
report = pc.metrics.consciousness_report(G)
print(f"Spatiotemporal Integration (I_g): {report.Ig:.3f}")
print(f"Consciousness Intensity (Ξ¦_C): {report.phi_c:.3f}")
print(f"Causal Loops: {report.n_cycles}")
# 3. Visualize the network's causal structure
pc.viz.plot_causal_network(G, report)
We provide Jupyter notebooks that guide you through every key concept:
| Notebook | Description | Run in Colab |
|---|---|---|
grand_demonstration.ipynb |
Main Tour: All three pillars in one interactive session | |
reproduce_paper_figures.ipynb |
Reproduce every figure from our theory paper | |
brain_network_analysis.ipynb |
Apply Ξ¦_C to real brain connectivity data |
PyConsciousness/
βββ src/pyconsciousness/
β βββ core/dzp_dynamics.py # Core DZP network simulator
β βββ metrics/ # Consciousness & spacetime metrics
β βββ validation/ # Three-pillar validation modules
β βββ viz/ # Visualization tools
βββ examples/ # Interactive tutorials
βββ tests/ # Unit tests
βββ docs/ # Auto-generated documentation
PyConsciousness implements the Dynamic Zero-Point (DZP) theory, which posits:
All parameters in the simulation are derived from first principlesβno free parameters are fitted.
We welcome contributions from researchers, developers, and enthusiasts!
Please read our Contributing Guidelines first.
If you use PyConsciousness in your research, please cite our theoretical paper (preprint):
@article{guan2024consciousness,
title={Consciousness-Spacetime Co-Emergence: An Axiomatic Dynamic Zero-Point Theory},
author={Guan, Lei},
journal={Preprint},
year={2024},
url={https://github.com/guanlei505/PyConsciousness}
}
This project is licensed under the Apache License 2.0 - see the LICENSE file for details.
If this project sparks your curiosity, consider:
PyConsciousness is maintained by Lei Guan and contributors. This is an independent research project aimed at making consciousness science testable, reproducible, and open to all.
| Phenomenon | Prediction | PyConsciousness Result | Match |
|---|---|---|---|
| Two-stage emergence | Ξ¦_C increases only after I_g > 0.9 | β Verified | 100% |
| Phase transition | Ξ¦_C jumps at N ~ 32 | Ξ¦_C: 0.35 β 0.69 | β |
| Curvature effect | High curvature β earlier emergence | 32ms vs 45ms | β |
| Entropy cone | All points within bounds | 0 violations | β |