Figure adapted from (Dündar, Arsiwalla, Elshatlawy, 2025)
Finally We Have the “Paths” to Quantum Operators from the Wolfram Model ... and It’s Beautiful
ABSTRACT (original preprint): We show how representations of finite-dimensional quantum operators can be constructed using nondeterministic rewriting systems. In particular, we investigate Wolfram model multiway rewriting systems based on string substitutions. Multiway systems were proposed by S. Wolfram as generic model systems for multicomputational processes, emphasizing their significance as a foundation for modeling complexity, nondeterminism, and branching structures of measurement outcomes. Here, we investigate a specific class of multiway systems based on cyclic character strings with a neighborhood constraint - the latter called Leibnizian strings. We show that such strings exhibit a Fermi-Dirac distribution for expectation values of occupation numbers of character neighborhoods. A Leibnizian string serves as an abstraction of a N-fermion system. A multiway system of these strings encodes causal relations between rewriting events in a nondeterministic manner. The collection of character strings realizes a -module with a symmetric -bilinear form. For discrete spaces, this generalizes the notion of an inner product over a vector field. This admits a discrete analogue of the path integral and a S-matrix for multiway systems of Leibnizian strings. The elements of this S-matrix yield transition amplitudes between states of the multiway system based on an action defined over a sequence of Leibnizian strings. We then show that these S-matrices give explicit representations of quantum gates for qubits and qudits, and also circuits composed of such gates. We find that, as formal models of nondeterministic computation, rewriting systems of Leibnizian strings with causal structure encode representations of the CNOT, π/8, and Hadamard gates. Hence, using multiway systems one can represent quantum circuits for qubits. CITATION (original preprint): Furkan Semih Dündar, Xerxes D. Arsiwalla, Hatem Elshatlawy (2025), Quantum Gates from Wolfram Model Multiway Rewriting Systems, arXiv:2512.20587. https://doi.org/10.48550/arXiv.2512.20587
Highlights
Highlights
◼
Computational interpretation of Leibniz’s monads in Wolfram Model rewriting systems.
◼
Construction of fermionic strings, discrete path integral and S-matrices from multiway rewriting.
◼
Representation of CNOT, π/8 and Hadamard gates from multiway S-matrices for qubits and qudits.
Leibniz’s Philosophy and Monads
Leibniz’s Philosophy and Monads
We briefly discuss Leibnizian philosophy of monads. For the original work of Leibniz on this matter, see (Leibniz, 2005) for an English translation.
The principle of identity of indiscernibles can be thought of as the cornerstone of Leibnizian philosophy of monads. This principle has various forms but the one we use is that: if two entities share the same properties, then they are the same entity.
In Leibnizian philosophy the idea of a monad is best summarized as a “meta-physical atom.” Unlike the usual modern idea of atom, such as an Hydrogen atom, each monad must be unique. The uniqueness property of monads is employed in this study to discover a Fermi-Dirac like statistics for occupation number for monads.
The Barbour-Smolin-Deutsch Variety
The Barbour-Smolin-Deutsch Variety
The term BSD variety is coined in (Dündar, 2024) and the name stands for Barbour-Smolin-Deutsch variety. It is one of the variety functions defined in (Barbour and Smolin, 1992) upon a suggestion by Deutsch who they cite as a private communication dated 1989. The most crucial step in its definition is the concept of relative indifference. The relative indifference is defined for two different objects (characters here). Then one considers neighborhoods of these objects increasing in radius. The relative indifference of two objects is the minimum value of radius where the two neighborhoods are not isomorphic. By isomorphic, here, we mean either equal substrings or mirror symmetric substrings.
Here one should note that we use cyclic character strings. This boundary condition indicates that the letter after the last letter of the word is the first letter, or the letter that comes before the first letter is the last letter.
If two characters, even when the whole string is exhausted, do not have non-isomorphic neighborhoods then this string is non-Leibnizian and cannot represent a monadic viewpoint. In a Leibnizian string each neighborhood is differentiated.
Example: The string “AAABBB” is non-Leibnizian. Because, for example, the neighborhoods of the first and the third “A”s are isomorphic,namely “BBAAA” and “AAABB”. Here is a graph representation.
Out[]=
Example : The string "AABABB" is Leibnizian. Here is a graph representation.
Out[]=
When we consider a single character and calculate its relative indifference with other characters the maximum of relative indifference values is called as absolute indifference. Then the BSD variety is a sum over 1/a where “a” stands for absolute indifference value of a character and the sum is over all characters. The more the variety, the more a string has structures.
Example: For the cyclic string “AABABB” the neighborhoods of letters that distinguish them from any others are as follows: “BBAAB”, “BAABA”, “ABA”, “BAB”, “BABBA”, and “ABBAA”. Hence the list of absolute indifference values are 2, 2, 1, 1, 2, 2 and the BSD variety is 4.
We considered string ontology, however BSD variety is also defined in the hypergraph ontology, see (Dündar, 2024). It should not be very hard to define it in other ontologies. The crucial insight is to define relative indifference and the rest follows easily. See also (Rickles et al, 2023; Arsiwalla et al, 2023) for connections of Leibniz’ monads to the WPP.
Multiway Systems of Leibnizian Strings
Multiway Systems of Leibnizian Strings
In our study we considered a string substitution system based on cyclic character strings of some alphabet. In that the concept of a rewriting rule is employed. A rewriting rule transforms a matched pattern (substring) to another pattern (substring). It can also work with hypergraphs. In general such rules are incorporated in the idea of “term rewriting systems.”
Multiway systems in general
Multiway systems in general
When a rewriting rule matches more than one pattern, we can use the idea of a multiway system. A multiway system is basically a tree where nodes (strings in our case) are connected if there is a rewriting rule that transforms one node to another.
Example: Beginning with the string “CCBBA” and applying the specific rewriting rule (i.e. the sorting rule) we have the following multiway system. This example does not use cyclic strings.
In[]:=
<<Wolfram`Multicomputation`
In[]:=
MultiwaySystem[{"BA""AB","CB"->"BC","CA"->"AC"},"CCBBA",Method->{"String"}]["StatesGraph",8,ImageSize->Medium]
Out[]=
The multiway system above terminates after certain number of rewriting term applications as it will be sorted finally.
Example: A multiway system employing cyclic boundary condition for strings.
In[]:=
MultiwaySystem[{"BA""AB","CB"->"BC"},"BACBAC",Method->{"String","Cyclic"->True}]["StatesGraph",8,"CanonicalStateFunction"->Full,ImageSize->Medium]
Out[]=
Leibnizian section of multiway systems
Leibnizian section of multiway systems
A multiway system with the head node “ABAABBABABA” and the rewriting rule “BA” “AB”. Adapted from (Dündar, Arsiwalla, Elshatlawy, 2025). The highlighted subgraph is that of its Leibnizian part.
The multiway system of Leibnizian strings is obtained when we consider the subgraph of multiway system that consists of only the Leibnizian strings. The multiway system just provided is an example for this concept. Its Leibnizian part is highlighted in red. As we will elaborate in the next Section, the Leibnizian subset of the multiway system consists of Leibnizian (or physical) paths. These are paths such that they include only Leibnizian strings as nodes. In our encoding of quantum circuits, we will employ Leibnizian part of the multiway system.
S-matrix and Transition Amplitudes
S-matrix and Transition Amplitudes
Here we define and elaborate on the properties of S-matrices. The use of the term S-matrix is not a field theory concept but rather indicates a transition amplitude between words.
Action
Action
Considering a path in the multiway system, if all the words on it are Leibnizian then we say this path is Leibnizian (or physical). Then one can define an action on a Leibnizian path which is proportional to the sum of variety values except the last word. The latter condition is required to have a matrix product structure for the composition of more than one S-matrices.
Out[]=
For the supposedly Leibnizian path above, the action is defined as the negative of the sum of variety values of the first three vertices: “a”, “b”, and “c”.
For a given multiway system, we select among the Leibnizian paths the ones that extremize the action and call them as maximal variety paths. These paths are related to the classical limit of our system.
The S-matrix
The S-matrix
Given an in-word and an out-word the S-matrix element is given as the following sum (Dündar, Arsiwalla, Elshatlawy, 2025).
Here the paths γ connecting in-word and out-word consist exclusively of Leibnizian words, and the path weights ω(γ) are -valued free parameters. Because of that reason our system does not single out a specific S-matrix, but rather produces a family of them.
If the in-word and the out-word is not connected by a Leibnizian path then the corresponding S-matrix element vanishes. Moreover, considering a two adjacent layers in the multiway system, the is non-zero if and only if the element is non-zero. In particular if the interaction is one-sided, meaning that in-word is connected to the out-word but the in-word is not connected to out-word, both of the corresponding matrix elements vanish.
th
i
th
j
i,
th
j
j,
th
i
th
i
th
j
th
j
th
i
Example: The form of the S-matrix for a system of three in-words and three out-words. Here is proportional to the variety of the in-word. In essence it is the negative of the mentioned variety value.
S
i
th
i
Here is a multiway representation.
Out[]=
The form and composition of S-matrices
The form and composition of S-matrices
An S-matrix (U) that is produced by our system can be written as a product of two matrices. As a product of the matrix ω ∈ O(N) and a diagonal matrix where phases occur in the diagonal.
iS/k
e
When one calculates the S-matrices for adjacent layers, the S-matrix that relates more than two layers is found by matrix multiplication of a series of S-matrices.
Here we focused on square S-matrices, however for the general case of rectangular S-matrices please consult to original preprint (Dündar, Arsiwalla, Elshatlawy, 2025).
Representing Quantum Phenomena
Representing Quantum Phenomena
In this Section, we elaborate on how our system encodes quantum behavior.
Path-sum approach
Path-sum approach
In classical mechanics the path, for example, of a particle under the influence of forces is definite and single. However in quantum mechanics, one needs to include all possible paths that a particle can travel in order to represent the time evolution. This formulation of quantum mechanics is known as the Feynman’s path-integral.
In the study, we employed path-sums similar to Feyman’s path-integral, in order to obtain the elements of the S-matrix. The paths we employed are Leibnizian paths (i.e. each vertex on the path is a Leibnizian string) in the multiway system that connect a set of in-words and out-words.
Fermi-Dirac like character of computational monads
Fermi-Dirac like character of computational monads
We have mentioned previously that each monad must be unique. We can represent a monad by its view. A view is in essence the neighborhood of a character with radius equal to its absolute indifference. Since two monad cannot be equal to each other in Leibnizian philosophy, a specific view is either present in the string or not. This observation is crucial in that it results in Fermi-Dirac like distribution of occupation number of a view, or in other words, of a monad.
Applications
Applications
In this Section we provide a few applications of our system in the form of qubit gates.
The Hadamard gate
The Hadamard gate
Using a 2 x 2 interacting system, one can encode the Hadamard gate. The minimal multiway representation is as follows. Here we suppose that each of the in-words has the same variety.
The general form of S-matrix for a 2 x 2 interacting case is as follows.
The π/8 gate
The π/8 gate
The π/8 gate can be encoded using a non-interacting 2 x 2 system. The minimal multiway system representation is as follows.
The corresponding S-matrix representation is:
The CNOT gate
The CNOT gate
The CNOT gate is defined for a system of two qubits. Hence the unitary matrix should be 4 x 4. This gate can be encoded using a 4 x 4 non-interacting system.
We also suppose in this case that the variety values of in-words are the same. The general form of the S-matrix in this case is the following, up to a global phase.
Word ordering symmetries
Word ordering symmetries
Since there is no a-priori way to order words in a specific layer in a multiway system, we have the symmetry of permutation of the order of words in each layer. Because of that reason the CNOT gate and the SWAP gate can be encoded even if the S-matrix corresponds to the identity operator upon reordering of words.
Universal quantum computation
Universal quantum computation
Because we can represent the Hadamard gate, the π/8 gate and the CNOT, we can represent any quantum circuit for qubits using multiway rewriting systems and choosing the path weights (ω) accordingly.
A Quantum Circuit
A Quantum Circuit
In this Section, we consider multiway system representation of a quantum circuit.
For that purpose we consider the following multiway system.
The S-matrix representation of the first two layers is as follows (supposing that all of the in-words have the same variety value):
The last two layers of the multiway system can correspond to a CNOT gate. Hence, using the multiway system we can represent these two quantum circuits (the only condition in this example that all of the words in a specific layer should have the same variety value so that the global phase can be factored out):
What is interesting in this example is that the whole S-matrix is equivalent to identity operator when the order of words are permuted, if the variety values of the words are the same in each layer.
To iterate, our system produces a family of S-matrices and it is a future research direction to find rules and principles to constrain S-matrices.
ZX-Calculus
ZX-Calculus
ZX-calculus is a diagrammatic representation language for linear operators. In particular via ZX-calculus one can represent quantum circuits. Our system is capable of representing each element of ZX-calculus: 1) Z-spider, 2) Hadamard gate, 3) X-spider. We use the examples from the (Dündar, Arsiwalla, Elshatlawy, 2025).
Z-spider
Z-spider
A Z-spider with some input and output legs is a non-interacting system where two of the in-words are connected to two of the out-words. As an example consider the Z-spider with two input and two output legs. Its S-matrix representation is as follows:
and the corresponding multiway system as:
The Hadamard gate
The Hadamard gate
The Hadamard gate is represented by a 2 x 2 interacting system meaning that the corresponding layer of the multiway system is a complete bipartite graph.
X-spider
X-spider
The representation of X-spider is more complex. When one puts Hadamard gate to each input and output leg of a Z-spider one obtains a X-spider. The tensor product of two Hadamard gates is represented by the following multiway system:
If one sandwiches a Z-spider between two such multiway systems, one can obtain an X-spider.
Conclusion
Conclusion
Using Wolfram Model multiway rewriting systems we have found that by using multiway systems one can construct representations of quantum circuits, showing that one can encode the Hadamard gate, the π/8 gate and the CNOT using multiway rewriting systems. This suggests the possibility of universal quantum computation using multiway rewriting.
Quantum operators are thus seen as statistical mechanical constructions of paths over a multiway system.
The study employed the cyclic string ontology however in future studies our methodology can be generalized to other ontologies such as the hypergraph ontology.
For a more detailed account of the discussions presented please consult to (Dündar, Arsiwalla, Elshatlawy, 2025).
Wolfram Language Files
Wolfram Language Files
Wolfram Language files for the study can be found at
under the CC BY-SA 4.0 license.
References
References
◼
G.W. Leibniz (2005) “Discourse on Metaphysics and The Monadology.” Dover Publications. Editors: Chandler AR, Montgomery GR.
◼
F. S. Dündar (2024) “A Case Study for Leibnizian Ideas in Wolfram Model.” Foundations of Physics. 54(3) p. 43.
◼
D. Rickles, H. Elshatlawy, X. D. Arsiwalla (2023) “Ruliology: Linking computation, observers and physical law”, arXiv:2308.16068.
◼
X. D. Arsiwalla, H Elshatlawy, D Rickles (2023) “Pregeometry, formal
language and constructivist foundations of physics”, arXiv:2311.03973.
language and constructivist foundations of physics”, arXiv:2311.03973.
◼
J. Barbour, L. Smolin (1992) “Extremal Variety as the Foundation of a Cosmological Quantum Theory.” arXiv:hep-th/9203041
◼
F. S. Dündar, X.D. Arsiwalla, H Elshatlawy (2025) “Quantum Gates from Wolfram Model Multiway Rewriting Systems”, arXiv:2512.20587 https://doi.org/10.48550/arXiv.2512.20587
CITE THIS NOTEBOOK
CITE THIS NOTEBOOK
Quantum operators from Wolfram Model multiway systems
by Furkan Semih Dündar, Xerxes D. Arsiwalla, and Hatem Elshatlawy
Wolfram Community, STAFF PICKS, January 1, 2026
https://community.wolfram.com/groups/-/m/t/3599773
by Furkan Semih Dündar, Xerxes D. Arsiwalla, and Hatem Elshatlawy
Wolfram Community, STAFF PICKS, January 1, 2026
https://community.wolfram.com/groups/-/m/t/3599773