Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

PyCauset Logo PyCauset Text



Documentation PyPI version License: MIT

A High-Performance Toolset for Causal Set Theory in Python.

Causal set theory is a discrete proposal for quantum gravity. PyCauset is a low-compromise numerical tool for causal sets ("causets"), built from the ground up to be fast, flexible, and easy to use.

PyCauset is made of two main components:

  • The PyCauset Engine is built to be NumPy for causal sets. If you know NumPy, you already know the engine: the same shapes, dtypes, operators, and conventions, backed by a C++ core for speed. It is specifically made for causal sets: bit-packed causal matrices, metadata that lets the math skip unnecessary work, storage that spills to disk when RAM runs out, and CPU dispatch handled behind the scenes.

  • The PyCauset Physics Tool Suite is an extensive collection of tools for working with causal sets: a library of spacetimes, sprinkling routines, field-theoretic machinery and visualizations.

Read the documentation.

Quick start

Sprinkle a causal set into a 2D Minkowski diamond:

import pycauset as pc
from pycauset.vis import plot_embedding

c = pc.CausalSet(n=3000, seed=42)   # 3000 points in a 2D diamond (default geometry)

fig = plot_embedding(c)             # interactive Plotly figure
fig.show()
3000 points in a 2D Minkowski diamond

Define a field and compute a propagator:

from pycauset.field import ScalarField

field = ScalarField(c, mass=1.5)    # a massive scalar field on the same causet
K = field.propagator()              # retarded propagator K_R = aC(I - baC)^-1

Or use the engine on its own:

A = pc.causal_matrix(10000, populate=True)
B = pc.causal_matrix(10000, populate=True)
Paths = pc.dot(A, B)                       # alternatively, use `A @ B` 

M = pc.zeros((2000, 2000), dtype=pc.float32)
M_inv = M.invert()                          # inversion

Features

Numerical Engine

PyCauset has an optimized C++ core with Python bindings, which is built specifically for work with causal sets:

  • Work with matrices bigger than your RAM. Large matrices stream to disk and back, so the only limit to computation is your storage and time.
  • It speaks NumPy. Same shapes, dtypes, operators, and conventions. It is also compatible with NumPy arrays, so you can mix and match.
  • Bit-wise causal relations. The causal matrix elements are individual bits, which allows for 8x more efficient storage than a byte-based representation.
  • CPU (and soon GPU) optimized. It just works.
  • Storage and precision, handled. Memory, precision, and hardware are automatically chosen.

Physics Tool Suite

  • Spacetimes: Minkowski diamond, cylinder, box. Arbitrary dimensions, signatures, and curved geometries (de Sitter, anti-de Sitter, FLRW) are on the R2 roadmap.
  • Sprinkling: fixed-N or Poisson density, seeded and reproducible.
  • Fields: scalar fields with propagator and Pauli-Jordan functions.
  • Visualization: interactive 2D/3D embeddings and Hasse diagrams.

Performance

PyCauset's dense kernels use the same OpenBLAS/LAPACK backend as NumPy, so the goal is parity rather than a large speedup, with a goal of all PyCauset operations being at least 0.90x the speed of NumPy for in-memory operations, (see BENCHMARKS.md). However, the biggest reason to use PyCauset is that it memory-maps past RAM, where NumPy raises MemoryError.

Both images come straight from the public API. Reproduce them with scripts/make_r1_gallery.py.

Hasse diagram of an 80-point diamond *The causal links of an 80-point diamond (Hasse diagram).* 3000 points on a Minkowski cylinder *3000 points sprinkled onto a Minkowski cylinder, rendered as a 3D tube.*

Installation

pip install pycauset

Pre-compiled wheels for Windows, macOS, and Linux. From source:

git clone https://github.com/BrorH/pycauset.git
cd pycauset
pip install .

GPU acceleration (optional)

The default install is CPU-only. To add GPU support:

pip install "pycauset[gpu]"

This also downloads the CUDA runtime, about 500 MB. It needs an NVIDIA GPU with Compute Capability 6.0 or newer, on Linux or Windows. macOS is not supported.

If you have an NVIDIA GPU but are on the CPU-only build, the first import pycauset prints a short note with the install command. Set PYCAUSET_GPU_HINT=0 to silence it.

Status

Pre-alpha. Release 1 (v0.6.1, the Foundation Release) shipped the numerical core, matrices, storage, and linear algebra, CPU-only (GPU parity is deferred). Release 2 (the Physics Release) adds the physics suite, arbitrary-dimension and curved spacetimes, fields, and the Sorkin-Johnston vacuum, and folds in the deferred optimization program. The current plan is tracked in the documentation.

Documentation

Guides, API reference, and the roadmap: brorh.github.io/pycauset

License

MIT. If you use PyCauset in your research, please cite the repository.

Questions and ideas: bror dot hjemgaard at gmail dot com

This repository contains AI-generated code.

Metadata

Release files for pycauset 0.6.2.dev53

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distributions (wheels)

Table of built distributions (wheels) for pycauset 0.6.2.dev53
File Actions
pycauset-0.6.2.dev53-cp313-cp313-macosx_15_0_arm64.whl CPython 3.13 CPython 3.13 macOS 15.0+ ARM64 Details for pycauset-0.6.2.dev53-cp313-cp313-macosx_15_0_arm64.whl
pycauset-0.6.2.dev53-cp312-cp312-win_amd64.whl CPython 3.12 CPython 3.12 Windows x86-64 Details for pycauset-0.6.2.dev53-cp312-cp312-win_amd64.whl
pycauset-0.6.2.dev53-cp312-cp312-manylinux_2_28_x86_64.whl CPython 3.12 CPython 3.12 Linux glibc 2.28+ x86-64 Details for pycauset-0.6.2.dev53-cp312-cp312-manylinux_2_28_x86_64.whl
pycauset-0.6.2.dev53-cp312-cp312-macosx_15_0_arm64.whl CPython 3.12 CPython 3.12 macOS 15.0+ ARM64 Details for pycauset-0.6.2.dev53-cp312-cp312-macosx_15_0_arm64.whl
pycauset-0.6.2.dev53-cp311-cp311-win_amd64.whl CPython 3.11 CPython 3.11 Windows x86-64 Details for pycauset-0.6.2.dev53-cp311-cp311-win_amd64.whl
pycauset-0.6.2.dev53-cp311-cp311-manylinux_2_28_x86_64.whl CPython 3.11 CPython 3.11 Linux glibc 2.28+ x86-64 Details for pycauset-0.6.2.dev53-cp311-cp311-manylinux_2_28_x86_64.whl
pycauset-0.6.2.dev53-cp311-cp311-macosx_15_0_arm64.whl CPython 3.11 CPython 3.11 macOS 15.0+ ARM64 Details for pycauset-0.6.2.dev53-cp311-cp311-macosx_15_0_arm64.whl
pycauset-0.6.2.dev53-cp310-cp310-win_amd64.whl CPython 3.10 CPython 3.10 Windows x86-64 Details for pycauset-0.6.2.dev53-cp310-cp310-win_amd64.whl
pycauset-0.6.2.dev53-cp310-cp310-manylinux_2_28_x86_64.whl CPython 3.10 CPython 3.10 Linux glibc 2.28+ x86-64 Details for pycauset-0.6.2.dev53-cp310-cp310-manylinux_2_28_x86_64.whl
pycauset-0.6.2.dev53-cp310-cp310-macosx_15_0_arm64.whl CPython 3.10 CPython 3.10 macOS 15.0+ ARM64 Details for pycauset-0.6.2.dev53-cp310-cp310-macosx_15_0_arm64.whl

Total release size: 140.7 MB

Release files / pycauset-0.6.2.dev53-cp313-cp313-macosx_15_0_arm64.whl

Download URL pycauset-0.6.2.dev53-cp313-cp313-macosx_15_0_arm64.whl
Size 9.8 MB
Tags CPython 3.13 macOS 15.0+ ARM64
SHA-256 checksum
How to use checksums
bcfbfce32ff00fac03f7a6b68bcc6dfcd309cfdefadb494db8ab0660ad8955e7
BLAKE2b-256 checksum
How to use checksums
903683b63f62ed1a46995c625a244bb4f729852fe4732971ccf2933bd107aab5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 30, 2026.

Transparency log

Release files / pycauset-0.6.2.dev53-cp312-cp312-win_amd64.whl

Download URL pycauset-0.6.2.dev53-cp312-cp312-win_amd64.whl
Size 14.9 MB
Tags CPython 3.12 Windows x86-64
SHA-256 checksum
How to use checksums
0fe01610ddaf45924fb0bbe986f6b16611eb63658e7d7a2ea95c2514b0ecf0da
BLAKE2b-256 checksum
How to use checksums
70a26414c0d5c470ff1348fb3293356782b9f24d5b4ad8b890590ed71d75737e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 30, 2026.

Transparency log

Release files / pycauset-0.6.2.dev53-cp312-cp312-manylinux_2_28_x86_64.whl

Download URL pycauset-0.6.2.dev53-cp312-cp312-manylinux_2_28_x86_64.whl
Size 18.9 MB
Tags CPython 3.12 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
c276376baa19776745a736b4c14430c9645b1b0fcf1840f78b62a1991c5af5de
BLAKE2b-256 checksum
How to use checksums
b907df2912735ab258d3077f394dfb75573e68941a7aa2f7d284f8eeab3c53e6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 30, 2026.

Transparency log

Release files / pycauset-0.6.2.dev53-cp312-cp312-macosx_15_0_arm64.whl

Download URL pycauset-0.6.2.dev53-cp312-cp312-macosx_15_0_arm64.whl
Size 9.8 MB
Tags CPython 3.12 macOS 15.0+ ARM64
SHA-256 checksum
How to use checksums
e9e72eb9821008fbf128ed87c32e74d8ab82ce51996f8acb4f071f99d92a7b99
BLAKE2b-256 checksum
How to use checksums
4ad260224c493d1c68872b24dccc4aa725028290499de76e070464d9ce4c36f0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 30, 2026.

Transparency log

Release files / pycauset-0.6.2.dev53-cp311-cp311-win_amd64.whl

Download URL pycauset-0.6.2.dev53-cp311-cp311-win_amd64.whl
Size 14.9 MB
Tags CPython 3.11 Windows x86-64
SHA-256 checksum
How to use checksums
92734ecec9b0c2a275e4023ed3912e3f98a69e62df43697e9c54acbf0b5b7ebf
BLAKE2b-256 checksum
How to use checksums
c4ca5fb24525ecc4e21c1e8cf48119dd7b1558bb82da85e244013b6aa81bb3f8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 30, 2026.

Transparency log

Release files / pycauset-0.6.2.dev53-cp311-cp311-manylinux_2_28_x86_64.whl

Download URL pycauset-0.6.2.dev53-cp311-cp311-manylinux_2_28_x86_64.whl
Size 18.9 MB
Tags CPython 3.11 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
5b38a7f8591c2b55fdcdd9a4fdbbec75ea58bdd2575ec1f0373d440af58bdb44
BLAKE2b-256 checksum
How to use checksums
d44184d9b6e1550ef7b206dd8ff95f09635d8cb1cfd3e351212576168dbb471e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 30, 2026.

Transparency log

Release files / pycauset-0.6.2.dev53-cp311-cp311-macosx_15_0_arm64.whl

Download URL pycauset-0.6.2.dev53-cp311-cp311-macosx_15_0_arm64.whl
Size 9.8 MB
Tags CPython 3.11 macOS 15.0+ ARM64
SHA-256 checksum
How to use checksums
cdb1953db16479be2c425b54141004903758d6819428c40ff8e30a64ef55c5fe
BLAKE2b-256 checksum
How to use checksums
3fee54745f862b363cd8a3bfae455dafde4243fc1073e1f5b947abf6aa743546
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 30, 2026.

Transparency log

Release files / pycauset-0.6.2.dev53-cp310-cp310-win_amd64.whl

Download URL pycauset-0.6.2.dev53-cp310-cp310-win_amd64.whl
Size 14.9 MB
Tags CPython 3.10 Windows x86-64
SHA-256 checksum
How to use checksums
f0e1890ead15059ad66c36abc9040bfc49db140e8d07aacef68225efc969b1e5
BLAKE2b-256 checksum
How to use checksums
436d5fff1171966a0475ef2aacf1929b4179b0735a13a14ae6138cf2c00144db
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 30, 2026.

Transparency log

Release files / pycauset-0.6.2.dev53-cp310-cp310-manylinux_2_28_x86_64.whl

Download URL pycauset-0.6.2.dev53-cp310-cp310-manylinux_2_28_x86_64.whl
Size 18.9 MB
Tags CPython 3.10 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
e82540580a89f2413d49b5edec17a7ba95776a20900d0515b6c5e7d9c1405169
BLAKE2b-256 checksum
How to use checksums
e02c8c956a10039b3085f1e02808815bfbc7b9b59eedd602d7ab060d44dcecbd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 30, 2026.

Transparency log

Release files / pycauset-0.6.2.dev53-cp310-cp310-macosx_15_0_arm64.whl

Download URL pycauset-0.6.2.dev53-cp310-cp310-macosx_15_0_arm64.whl
Size 9.8 MB
Tags CPython 3.10 macOS 15.0+ ARM64
SHA-256 checksum
How to use checksums
0e510f7c44ebbddf7def5f3f8da84317cefeabc6308fc594014a79a9fc007e43
BLAKE2b-256 checksum
How to use checksums
ea4f51b6dbe5cfdce9518ee091775b50bcb5a7b76b036a13d97bcbb0f34bccb3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 30, 2026.

Transparency log

Security for pycauset 0.6.2.dev53

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 10 files in this release have been uploaded with provenance metadata.

Select from 10 files

Attestation for pycauset-0.6.2.dev53-cp313-cp313-macosx_15_0_arm64.whl

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 30, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release
Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page