BigraphQM is a web-based implementation of a graph-theoretic approach to quantum mechanics.
In the current version, quantum systems can be modelled by manually building bipartite graphs. The method for calculating probabilities is based on finding maximal cliques by using a variant of the Bron-Kerbosch algorithm.
Run it: https://met4citizen.github.io/BigraphQM/
The app uses @hpcc-js/wasm for rendering graphs and KaTeX for displaying LaTeX notation. The model is a spin-off of my earlier project Hypergraph. For a philosophical take on these ideas see my blog post The Game of Algorithms.
We start with the assumption that at the lowest level of physical reality all the possible sequences of interactions get actualized.
We model these sequences as maximal paths in a directed bipartite graph. The model is computational so that each maximal path describes a sequence of operations and their operands.
For two sequences to interact, they must be local and mutually consistent (i.e. spacelike).
In our model, for two operands to interact, their maximal paths must compute the same function and be composable in parallel. Technically, the latter means that their lowest common ancestors must be operations, not operands.
Since consistency is a pairwise property, there can be situations in which
some sequence
Interaction/observation is a process in which some internal part (observer) interacts with some other spacelike part (system) in a way that resolves these second-order inconsistencies. The result will be a set of mutually inconsistent outcomes in each of which every pair is connected. In graph theory, these kind of subgraphs are called maximal cliques.
There are typically many sequences (permutations, ordered sets) that lead to the same maximal clique (image, unordered set). From the observer's point of view, the proportion of all the sequences that lead to each maximal clique is the probability — or more precisely the weight — of that outcome.
NOTE: In our current model we consider all the maximal paths as local.
Let
At each new step, the lowest set of operands
Two operands are spacelike if and only if their
lowest common ancestors
(LCA) are operations. Let an undirected graph
NOTE: In our current model we consider all maximal paths as local in the sense that they compute the same function.
Let the sample space
One way to find all the possible measurement outcomes
Instead, we approach the problem by finding all the maximal
cliques
of
Finding all maximal cliques is an NP-complete problem, but solvable
within our sample space sizes. In the app we use a variant of the
Bron-Kerbosch algorithm
with the worst-case time complexity
ALGORITHM BK(R, P, X) IS
IF P and X are both empty THEN
report R as a maximal clique
choose a pivot vertex u in P ⋃ X
FOR each vertex v in P \ N(u) DO
BK(R ⋃ {v}, P ⋂ N(v), X ⋂ N(v))
P := P \ {v}
X := X ⋃ {v}
Let
Based on the weights, we can calculate the weight
Let
The observer gets only one sequence at measurement, so the expected energy
Using the clique weights we can calculate the
Shannon entropy
Suppose we start with the
past hypothesis
so that all the tokens in
If the system interacts only with itself, it tends to become more inconsistent over time. This seems to be compatible with the second law of thermodynamics.
Furthermore, since each interaction decreases the average size of the cliques, and thus the probability for that specific branch, the principle of least action applies and determines the most likely path.
Eventually the system will reach its highest entropy state with the lowest free energy.
Let
We can extend this measure to all combinations.
If
The pure quantum state of each clique can be presented as a linear combination
of orthonormal vectors
The density matrix
NOTE: The density matrix, as described here, is a limited projection and unable to represent the detailed ancestral structure. The bipartite graph is the actual data structure of the model.
Based the overlap of two cliques
From the observer's point of view all the tokens are identical. It means that they can't distinguish between two local cliques with the same number of tokens. At measurement they might, however, distinguish the number of interactions (i.e. energy), which is proportional to the size of the clique.
So, in order to create a two-state system that the observer can use for
computation, we can define a qubit
so that
The bipartite graph on the app describes one possible set of consistent sequences relative to the observer. It doesn't follow sequences that have become inconsistent with the observer, because the two parts can't interact with each other.
To ensure consistency, the editor only allows new edges between spacelike elements.
User Actions / Shortcuts:
- Click on a token/event/clique to select it. Remove all the selections by clicking on the background.
- Double click on a token/event to add a new branch.
- Drag a token/event on top of another event/token to connect the two with an edge. Note: Only consistent (spacelike) connections are allowed.
- Drag a token to an empty space before or after another token to reorder the tokens.
- Click on an edge to select it.
- Double click on an edge to delete it.
TOOL | DESCRIPTION |
---|---|
UNDO |
Undo/redo operations. The maximum size of the undo buffer is 50 operations. The app also uses localStorage to store the current graph so that if you refresh the page without any URL parameters, you can restore the previous working model. |
ZOOM |
Zoom the graph. If you want to increase/decrease the font size, zoom the browser window first and scale your graph to fit the screen using these zoom buttons. |
TIME |
Decrease/increase time steps. When a new time step is added, new branches are added to the existing spacelike tokens. By decreasing the time steps you can go back all the way to the initial state. |
ADD |
Add a new branch to the selected token/event. The new branch is automatically extended to the bottom of the graph. |
DEL |
Delete the selected token/event/edge together with all its parents and children that are dependent on it. |
MEASURE |
Shortcut for making a random proto-measurement. |
DECOHERE |
Shortcut for adding random decoherence to the system. |
B C VIEW |
Switch to an alternative view: B) Maximal cliques (classical states) and their probabilities, C) the final state with the induced graph G' and its clique graph K(G'). Note: While an alternative view is shown the editing mode is disabled. |
INFO |
Show the sidebar with details. The details include information about the selected tokens, probabilities, direct URL link to the graph, and the DOT source describing the shown graph. Refer to The Model for an explanation of the presented mathematical concepts. |
URL |
Copy URL to clipboard. Parameter g includes the Base64 encoded bipartite graph. |
SVG |
Download the shown bipartite graph as a SVG file. |
GitHub |
Link to the GitHub project. |
MODEL | DESCRIPTION |
---|---|
Wave function collapse Open in App |
All events are local by definition. However, new edges can add shortcuts through the graph's ancestral structure and break some existing spacelike relations. These instantaneous and non-local effects are known as the wave function collapse. |
Bell state (entanglement) Open in App |
Bell state is an example of a maximally entangled state. Here we start with two sequences |
Decoherence Open in App |
Decoherence is a process in which the system interacts with its environment so that the overlap decreases and the states become separable. |
Interference Open in App |
Two spacelike parts of the sample space can interact and thus interfere with each other. This changes the probabilities over time and disturbs the probability wave. This can be seen at measurement as an interference pattern. - Note: The shown example is the result of random interactions. |
- The idea that every possible outcome is realised is based on Many-Worlds Interpretation.
- The terminology of consistent and inconsistent sequences is taken from Consistent Histories.
- The idea that all the facts/outcomes are relative comes from Carlo Rovelli's Relational Quantum Mechanics.
- The graph-based approach is heavily influenced by the Wolfram Model and Max Piskunov's work on Local Multiway Systems (SetReplace).
- Several parts of the code are from my earlier project Hypergraph.
- Many of the ideas were originally discussed with Tuomas Sorakivi.
The Born rule is often considered a key postulate of quantum mechanics. It says that the absolute value of the vectors inner product, or equivalently the cosine squared of the angle between the lines the vectors span, corresponds to the transition probability.
The reason why the cosines are squared in the Born rule is geometric. First, Kolmogorov's axioms tell us that the probabilities should add up to one. Second, as shown below, the sum of cosines squared equals to one in high dimensional vector spaces:
Let
This works both ways. So, if we want to move from classical probabilities to quantum probabilities - that is, from sets to vector spaces - we need to take square roots to get the probability amplitudes.