Documentation#

Documentation

In this part, detailed documentation of the Qhronology package is presented. This includes in-depth descriptions of the package’s various submodules and their respective functions and classes (including all methods and properties). Numerous usage examples of many of the most important objects are also provided. Note however that only the components of the package which are intended to be used by the end user are included here. For the other, undocumented modules, please see the relevant parts of the package’s source code.

Quantum

The quantum subpackage contains most of Qhronology’s underlying mathematical framework.

Table 1 Overview of Qhronology’s quantum subpackage#

Module

Contents

Objects

states.py

Classes for the creation of quantum states.

gates.py

Classes for the creation of quantum gates.

circuits.py

A class for the creation of quantum circuits.

prescriptions.py

A class for the creation of quantum circuits containing closed timelike curves. Classes and functions implementing quantum prescriptions of time travel.

Mechanics

The mechanics subpackage contains Qhronology’s core logic for creating quantum vectors and matrices, performing operations on such constructs, and computing various significant scalar quantities.

Table 2 Overview of Qhronology’s mechanics subpackage#

Module

Contents

Objects

matrices.py

Core functions for creating quantum vectors and matrices.

quantities.py

Functions for computing quantum quantities from matrices. A mixin for endowing compatible classes with the ability to calculate these quantities.

operations.py

Functions for performing quantum operations on matrices. A mixin for endowing compatible classes with the ability to perform these operations.

Structure

For reference, a structure diagram detailing the relationships between Qhronology’s classes in the standard UML (Unified Modelling Language) framework is depicted in Figure 7.

A simple diagram depicting the (inheritance) relationships between the package's classes.
A simple diagram depicting the (inheritance) relationships between the package's classes.

Types

Qhronology’s underlying functionality takes advantage of a few bespoke type aliases, which are detailed in the table below.

Table 3 Internal type aliases#

Type Alias

Description

Definition

num

Scalar numerical numbers

numbers.Number | numpy.generic | sympy.Basic

sym

SymPy symbolic scalar expressions and symbols

sympy.matrices.expressions.matexpr.MatrixSymbol | sympy.matrices.expressions.matexpr.MatrixElement | sympy.core.symbol.Symbol

mat

SymPy (mutable) dense matrices

sympy.matrices.dense.MutableDenseMatrix

arr

NumPy arrays

numpy.ndarray

Modules

Modules