Giter Site home page Giter Site logo

c-minz / python-causets Goto Github PK

View Code? Open in Web Editor NEW
4.0 1.0 3.0 903 KB

Python (version 3.8) source code (with mypy typing support) to generate and plot causal sets as well as use them in numerical calculations.

License: BSD 3-Clause "New" or "Revised" License

Python 100.00%
causets causal-sets quantum-gravity sprinkling

python-causets's Introduction

Introduction

Causal set theory is a framework for quantum gravity where the classical spacetime manifold is replaces by the discrete structure of locally finite, partially ordered sets i.e., causal sets or short causets. This repository contains Python modules for numerical investigations of causal set theory.

The modules developed in this project implement methods to create causal sets generically, define them using coordinates of a spacetime manifold, or generate them via the sprinkling process (a Poisson process) on any implemented spacetime (spacetimes.py currently supports flat spacetime, de Sitter, Anti-de Sitter, and some first developments of black hole spacetimes).

An instance of Causet (causet.py) is a set of CausetEvent (causetevent.py) that has additional functionality. Each instance of CausetEvent can be used in logical expressions, e.g. for two instance a and b, a < b is True if and only if a is in the causal past of b. The Causet class provides methods that return subsets like Layers, Ranks, the future and past of event as sets of CausetEvent, the future and past infinities, causal paths, and much more.

The class EmbeddedCauset extends Causet and is able to handle the coordinates of events (their embedding) in a given region of a spacetime. Instances of this class can be plotted (including light-cones where implemented). The subclass SprinkledCauset further adds the functionality to create a new causet or add more events to it via sprinkling the spacetime region.

Examples and testing

Most of the implemented code has been tested in unittest modules, named test_.... Some of these modules also contain causet examples.

A simple demonstration is given in the file demo.py, which generates a sprinkle in 3-dimensional de Sitter space, for example, as shown by the following plot: Example plot for a sprinkle in de Sitter spacetime

Using methods of matplotlib, the causet plotting functions may also be used to create animations. For example, I created an animation of a 2-simplex embedded in de Sitter spacetime. The source code of this example is not included in this repository, but the animation is available at my YouTube channel:

Example animation for a 2-simplex in de Sitter spacetime

Progress of the source code development

The original code was developed in MATLAB R2019a and R2020a as part of my PhD projects at the University of York (from 2017 to 2021). Most parts of the MATLAB source code are in separate repositories:

In order to make the code usable without a MATLAB license, I started to convert it to the Python modules (Python 3.8.3) with mypy typing support that are in this repository.

The Python modules (classes and functions) are documented (use help [class/function name] in Python).

Further development ideas are:

  1. Visualization of generic causets as (Hasse) diagrams
  2. Methods for finding an embedding of a general causal set in a spacetime manifold, or a "reconstruction" of a spacetime manifold

If you wish to contribute to the project, please get in contact via email: christoph(dot)minz[at]gmail(dot)com

License information

The source code is published under the BSD 3-Clause License, see license file.

Copyright (c) 2020-2023, Christoph Minz

If you use the source code of this repository (with or without modification), please acknowledge it in your project. I appreciate if you add a link to this repository as reference.

python-causets's People

Contributors

c-minz avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.