D3 Framework Documentation
Python library and REST API for black hole information geometry. Based on the D3 research series — 9 exact results by Bharat Sharma (2026). Back to calculator · Live site ↗
Quick start
bash
pip install d3framework
python
from d3framework import blackhole, compute, papers
# Black hole calculation (Papers 1-7)
bh = blackhole(mass_solar=30, chi=0.67, q=0)
print(bh.R_total_m) # 75519.2 m — evaporation invariant
print(bh.h_chi_q) # 0.8521 — KN master formula
print(bh.T_hawking_K) # 2.06e-9 K
print(bh.cite) # citation string for your paper
# Computation limits
r = compute(temperature_K=0.015, bits_per_sec=1e6)
print(r.landauer_J_per_bit) # 1.44e-25 J/bit
print(r.D3_m_per_bit) # 2.28e-76 m/bit
print(r.ratio_universal_m_per_J) # 1.65e-44 m/J — universal constant
# Black hole calculation (Papers 1-7)
bh = blackhole(mass_solar=30, chi=0.67, q=0)
print(bh.R_total_m) # 75519.2 m — evaporation invariant
print(bh.h_chi_q) # 0.8521 — KN master formula
print(bh.T_hawking_K) # 2.06e-9 K
print(bh.cite) # citation string for your paper
# Computation limits
r = compute(temperature_K=0.015, bits_per_sec=1e6)
print(r.landauer_J_per_bit) # 1.44e-25 J/bit
print(r.D3_m_per_bit) # 2.28e-76 m/bit
print(r.ratio_universal_m_per_J) # 1.65e-44 m/J — universal constant
Installation
bash
# PyPI (recommended)
pip install d3framework
# From source
git clone https://github.com/bsharma173860-oss/d3-research
pip install -e .
pip install d3framework
# From source
git clone https://github.com/bsharma173860-oss/d3-research
pip install -e .
Requires Python 3.8+. No dependencies — pure Python standard library.
blackhole() Papers 1–7
Compute all D3 information-geometry invariants for a black hole.
Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
| mass_solar | float | required | Black hole mass in solar masses (M > 0) |
| chi | float | 0.0 | Dimensionless spin [0, 1) — Kerr parameter |
| q | float | 0.0 | Dimensionless charge [0, 1) — must have χ²+q² < 1 |
Returns: BlackHoleResult
| Field | Units | Description | Paper |
|---|---|---|---|
| r_s_m | m | Schwarzschild radius 2GM/c² | P1 |
| T_hawking_K | K | Hawking temperature | P1 |
| D3_m_per_bit | m/bit | D3 displacement per bit erased | P1 |
| S_bekenstein_bits | bits | Bekenstein-Hawking entropy | P3 |
| f_chi | — | Kerr spin suppression f(χ) | P2 |
| g_q | — | RN charge suppression g(q) | P6 |
| h_chi_q | — | KN master formula h(χ,q) | P7 |
| sigma | — | σ = √(1−χ²−q²) | P7 |
| R_total_m | m | Total evaporation invariant = h·r_s | P3,4,7 |
| D3_over_rs | — | (M_QG/M)² power law | P5 |
| M_QG_kg | kg | Quantum gravity boundary mass | P5 |
| M_QG_over_mP | — | M_QG/m_P = √(ln2/8π) = 0.16607 | P5 |
| cite | str | Citation string for papers | — |
python — examples
from d3framework import blackhole
# Schwarzschild: R_total = r_s exactly
bh = blackhole(1.0)
assert bh.R_total_m == bh.r_s_m # True — Paper 3
assert bh.h_chi_q == 1.0# h(0,0) = 1
# Kerr: R_total = f(chi)*r_s
bh = blackhole(mass_solar=10, chi=0.9)
print(bh.f_chi) # 0.5359
print(bh.R_total_m) # = f(chi) * r_s
# Kerr-Newman: full master formula
bh = blackhole(mass_solar=5, chi=0.5, q=0.5)
print(bh.h_chi_q) # h(0.5, 0.5) from Paper 7
print(bh.sigma) # sqrt(1-0.25-0.25) = 0.7071
# Export to LaTeX table
print(bh.to_latex())
# Export to dict (for pandas/JSON)
d = bh.to_dict()
# Schwarzschild: R_total = r_s exactly
bh = blackhole(1.0)
assert bh.R_total_m == bh.r_s_m # True — Paper 3
assert bh.h_chi_q == 1.0# h(0,0) = 1
# Kerr: R_total = f(chi)*r_s
bh = blackhole(mass_solar=10, chi=0.9)
print(bh.f_chi) # 0.5359
print(bh.R_total_m) # = f(chi) * r_s
# Kerr-Newman: full master formula
bh = blackhole(mass_solar=5, chi=0.5, q=0.5)
print(bh.h_chi_q) # h(0.5, 0.5) from Paper 7
print(bh.sigma) # sqrt(1-0.25-0.25) = 0.7071
# Export to LaTeX table
print(bh.to_latex())
# Export to dict (for pandas/JSON)
d = bh.to_dict()
compute()
Calculate Landauer energy limit and D3 geometric limit for any computation.
Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
| temperature_K | float | required | Operating temperature in Kelvin |
| bits_per_sec | float | 1e9 | Bits erased per second |
| run_seconds | float | 1.0 | Total run time in seconds |
Returns: ComputeResult
| Field | Units | Description | Value at 300K |
|---|---|---|---|
| landauer_J_per_bit | J/bit | Minimum energy per bit erasure = k_B·T·ln2 | 2.87e-21 |
| D3_m_per_bit | m/bit | Geometric cost per bit = 2G·k_B·T·ln2/c⁴ | 4.74e-65 |
| ratio_universal_m_per_J | m/J | D3/Landauer = 2G/c⁴ — universal constant | 1.65e-44 |
| landauer_total_J | J | Total Landauer heat over run time | — |
| D3_total_m | m | Total geometric shift over run time | — |
| reversible_saving_J | J | Energy saved by reversible logic | — |
| ML_max_ops_per_sec | ops/s | Margolus-Levitin max operations | — |
papers() and get_paper()
python
from d3framework import papers, get_paper
# List all 9 papers
for p inpapers():
print(f"P{p.number}: {p.central_result}")
print(f" DOI: {p.doi}")
# Get specific paper
p3 = get_paper(3)
print(p3.title)
print(p3.bibtex()) # BibTeX citation
# List all 9 papers
for p inpapers():
print(f"P{p.number}: {p.central_result}")
print(f" DOI: {p.doi}")
# Get specific paper
p3 = get_paper(3)
print(p3.title)
print(p3.bibtex()) # BibTeX citation
Export — LaTeX and BibTeX
python — LaTeX table
bh = blackhole(mass_solar=30, chi=0.67)
print(bh.to_latex())
# Output:
# \begin{table}[h]
# \centering
# \begin{tabular}{ll}
# \hline
# Parameter & Value \\
# $r_s$ & $8.8624e+04$\,m \\
# $h(\chi,q)$ & $0.85213232$ \\
# ...
print(bh.to_latex())
# Output:
# \begin{table}[h]
# \centering
# \begin{tabular}{ll}
# \hline
# Parameter & Value \\
# $r_s$ & $8.8624e+04$\,m \\
# $h(\chi,q)$ & $0.85213232$ \\
# ...
python — BibTeX citation
from d3framework import get_paper
# Get BibTeX for any paper
p = get_paper(3)
print(p.bibtex())
# @article{sharma2026_p3,
# author = {Sharma, Bharat},
# title = {The Schwarzschild Radius as Information-Geometry Invariant},
# doi = {10.5281/zenodo.20548070},
# }
# Get BibTeX for any paper
p = get_paper(3)
print(p.bibtex())
# @article{sharma2026_p3,
# author = {Sharma, Bharat},
# title = {The Schwarzschild Radius as Information-Geometry Invariant},
# doi = {10.5281/zenodo.20548070},
# }
POST /api/blackhole
Base URL: https://phenex-d3.vercel.app
API keys coming soon. Currently open for testing. Rate limits apply after launch.
Request
| Field | Type | Default | Description |
|---|---|---|---|
| mass_solar | number | 1 | Mass in solar masses |
| chi | number | 0 | Spin [0,1) |
| q | number | 0 | Charge [0,1), χ²+q²<1 |
curl
curl -X POST https://phenex-d3.vercel.app/api/blackhole \
-H "Content-Type: application/json" \
-d '{"mass_solar":30,"chi":0.67,"q":0}'
-H "Content-Type: application/json" \
-d '{"mass_solar":30,"chi":0.67,"q":0}'
curl — GET (quick test)
curl "https://phenex-d3.vercel.app/api/blackhole?mass_solar=30&chi=0.67&q=0"
response
{
"ok": true,
"result": {
"mass_solar": 30,
"chi": 0.67,
"r_s_m": 88623.8,
"T_hawking_K": 2.056e-9,
"D3_m_per_bit": 3.25e-76,
"h_chi_q": 0.85213232,
"R_total_m": 75519.2,
"S_bekenstein_bits": 1.363e80,
"M_QG_over_mP": 0.16607064,
"cite": "Sharma, B. (2026). D3 Research Series..."
}
}
"ok": true,
"result": {
"mass_solar": 30,
"chi": 0.67,
"r_s_m": 88623.8,
"T_hawking_K": 2.056e-9,
"D3_m_per_bit": 3.25e-76,
"h_chi_q": 0.85213232,
"R_total_m": 75519.2,
"S_bekenstein_bits": 1.363e80,
"M_QG_over_mP": 0.16607064,
"cite": "Sharma, B. (2026). D3 Research Series..."
}
}
POST /api/compute
curl
curl "https://phenex-d3.vercel.app/api/compute?temperature_K=300&bits_per_sec=1e9"
python
import requests
r = requests.get('https://phenex-d3.vercel.app/api/compute',
params={'temperature_K': 0.015, 'bits_per_sec': 1e6})
data = r.json()['result']
print(data['landauer_J_per_bit']) # 1.44e-25
print(data['ratio_universal_m_per_J']) # 1.65e-44
r = requests.get('https://phenex-d3.vercel.app/api/compute',
params={'temperature_K': 0.015, 'bits_per_sec': 1e6})
data = r.json()['result']
print(data['landauer_J_per_bit']) # 1.44e-25
print(data['ratio_universal_m_per_J']) # 1.65e-44
GET /api/papers
curl
# All papers
curl https://phenex-d3.vercel.app/api/papers
# Specific paper
curl https://phenex-d3.vercel.app/api/papers?number=3
curl https://phenex-d3.vercel.app/api/papers
# Specific paper
curl https://phenex-d3.vercel.app/api/papers?number=3
Jupyter notebook example
Download ready: 8 complete examples — LIGO events, spin suppression, KN contour, QG boundary, AdS correction, LaTeX/BibTeX export.
Download d3framework_examples.ipynb
jupyter / python
import numpy as np
import matplotlib.pyplot as plt
from d3framework import blackhole
# Plot R_total/r_s vs spin chi for 10 solar mass BH
chis = np.linspace(0, 0.99, 100)
ratios = [blackhole(10, chi=c).h_chi_q for c in chis]
plt.figure(figsize=(8,5))
plt.plot(chis, ratios, 'b-', lw=2)
plt.xlabel('Spin χ')
plt.ylabel('h(χ,0) = R_total/r_s')
plt.title('D3 spin suppression — Paper 7')
plt.grid(alpha=0.3)
plt.show()
# Compare all LIGO events
events = {
'GW150914': (65, 0.67),
'GW170814': (53, 0.81),
'GW190521': (150, 0.69),
}
for name, (M, chi) in events.items():
bh = blackhole(M, chi=chi)
print(f"{name}: R_total={bh.R_total_m:.0f} m, h={bh.h_chi_q:.4f}")
import matplotlib.pyplot as plt
from d3framework import blackhole
# Plot R_total/r_s vs spin chi for 10 solar mass BH
chis = np.linspace(0, 0.99, 100)
ratios = [blackhole(10, chi=c).h_chi_q for c in chis]
plt.figure(figsize=(8,5))
plt.plot(chis, ratios, 'b-', lw=2)
plt.xlabel('Spin χ')
plt.ylabel('h(χ,0) = R_total/r_s')
plt.title('D3 spin suppression — Paper 7')
plt.grid(alpha=0.3)
plt.show()
# Compare all LIGO events
events = {
'GW150914': (65, 0.67),
'GW170814': (53, 0.81),
'GW190521': (150, 0.69),
}
for name, (M, chi) in events.items():
bh = blackhole(M, chi=chi)
print(f"{name}: R_total={bh.R_total_m:.0f} m, h={bh.h_chi_q:.4f}")
All 9 papers
| # | DOI | Central result |
|---|---|---|
| P1 | 10.5281/zenodo.20502577 | D3(T) = 2G·kB·T·ln2/c⁴ |
| P2 | 10.5281/zenodo.20535347 | f(χ) = 2√(1−χ²)/(1+√(1−χ²)) |
| P3 | 10.5281/zenodo.20548070 | R_total = r_s — all constants cancel |
| P4 | 10.5281/zenodo.20549627 | R_total(Kerr) = f(χ)·r_s |
| P5 | 10.5281/zenodo.20549980 | M_QG = mP·√(ln2/8π) |
| P6 | 10.5281/zenodo.20561229 | g(q) = 4√(1−q²)/(1+√(1−q²))² |
| P7 | 10.5281/zenodo.20563756 | h(χ,q) = 4σ/(2(1+σ)−q²) |
| P8 | 10.5281/zenodo.20564313 | R_total = r_s for all d≥4 |
| P9 | 10.5281/zenodo.20567233 | R_total(AdS) = r_s·(1+(r_s/L)²) |
Physical constants used
| Symbol | Value | Description |
|---|---|---|
| G | 6.67430×10⁻¹¹ m³kg⁻¹s⁻² | Newton's constant |
| c | 2.99792458×10⁸ m/s | Speed of light |
| ℏ | 1.054571817×10⁻³⁴ J·s | Reduced Planck constant |
| k_B | 1.380649×10⁻²³ J/K | Boltzmann constant |
| l_P | 1.616255×10⁻³⁵ m | Planck length |
| m_P | 2.176434×10⁻⁸ kg | Planck mass |
| M_sun | 1.989×10³⁰ kg | Solar mass |
How to cite
BibTeX — software
@software{sharma2026d3framework,
author = {Sharma, Bharat},
title = {d3framework: Black hole information geometry calculator},
year = {2026},
url = {https://phenex-d3.vercel.app},
version = {0.1.0}
}
author = {Sharma, Bharat},
title = {d3framework: Black hole information geometry calculator},
year = {2026},
url = {https://phenex-d3.vercel.app},
version = {0.1.0}
}
BibTeX — Paper 3 (central result)
@article{sharma2026p3,
author = {Sharma, Bharat},
title = {The Schwarzschild Radius as Information-Geometry Invariant},
year = {2026},
doi = {10.5281/zenodo.20548070},
note = {PhenexAI Research, Vancouver}
}
author = {Sharma, Bharat},
title = {The Schwarzschild Radius as Information-Geometry Invariant},
year = {2026},
doi = {10.5281/zenodo.20548070},
note = {PhenexAI Research, Vancouver}
}
Contact: bsharma173860@gmail.com ·
GitHub ·
phenex-d3.vercel.app