Doug Dissertation
Doug Dissertation
Douglas J. Matzke
by
DISSERTATION
in Partial Fulfillment
of the Requirements
May 2002
ACKNOWLEDGEMENTS
My first thank you goes to my committee chair Dr. Cyrus Cantrell, who gave me a chance
three years ago when I approached him with a very vague idea about mapping Boolean logic
into linear mathematics. Choosing this kind of subject (ultimately, quantum computing) is
engineering perspective must have caused him some amusement while requiring the patience
of a saint. My most heartfelt thanks goes to my like- minded friend and committee co-chair
Michael Manthey, whom I first met at the PhysComp94 conference, and who lives in the
mountains of Crestone, Colorado. I visited Mike in Colorado for three days in the summer of
equations. Based on that tedious manual experience, I returned to Dallas and a month later
created the prototype ga.pl tool described in this dissertation. Once this and subsequent GA
tools were available, the qua ntum representation practically revealed itself in another month.
I am eternally indebted to Mike for enabling one of the most creative and fulfilling periods of
my life. Another very big thank you also goes to Nick Lawrence of Lawrence Technologies
who hired me in the summer of 2001, due to his interests in high-dimensional software
technology, which enabled me to write the bulk of this dissertation in only two months. My
other committee members William Pervin, Wolfgang Rindler, and Samuel Villareal were
fabulous and very supportive. A very special thanks goes to my spouse Patricia, who kept our
home running smoothly while I was enjoying this time-consuming, yet creative, endeavor.
v
QUANTUM COMPUTATION USING GEOMETRIC ALGEBRA
This dissertation reports that arbitrary Boolean logic equations and operators can be
vectors using only addition and multiplication. Geometric algebra is a topologically based
algebraic system that naturally incorporates the inner and anti-commutative outer products
into a real-valued geometric product, yet does not rely on complex numbers or matrices. A
series of custom tools was designed and built to simplify geometric algebra expressions into
a standard sum of products form, and automate the anticommutative geometric product and
operations. Using this infrastructure, quantum bits (qubits), quantum registers and EPR-bits
(ebits) are expressed symmetrically as geometric algebra expressions. Many known quantum
computing gates, measurement operators, and especially the Bell/magic operators are also
expressed as geometric products. These results demonstrate that geometric algebra can
naturally and faithfully represent the central concepts, objects, and operators necessary for
quantum computing, and can facilitate the design and construction of quantum computing
tools.
vi
TABLE OF CONTENTS
ACKNOWLEDEMENTS ........................................................................................................v
ABSTRACT..............................................................................................................................vi
vii
3.5 Boolean Logic and Operators Using Linear Mathematics ........................................... 28
3.5.1 Boolean Logic in Galois Fields ............................................................................. 28
3.5.2 XOR Dominated Logic ......................................................................................... 30
3.5.3 Toffoli and Fredkin Gates in GF(2) ...................................................................... 31
3.5.4 Boolean Logic is formally non-linear ................................................................... 33
viii
6.7 Entanglement Means Co-occurrence with Cross-Qubit Spinor .................................. 117
6.8 Bell Basis States are Irreversible in Q2 ...................................................................... 118
6.8.1 Discarded Phase Information in Bell States......................................................... 119
6.8.2 No Multiplicative Inverse for (SA + SB) ............................................................... 120
6.8.3 Recursive Operator Erases Phase Information .................................................... 120
ix
LIST OF TABLES
Table 3.2: Logic Tables for Fredkin and Toffoli Gates .......................................................... 27
Table 3.5: Logic Inclusive OR for {2, 3, 4} input states in GF(2) ......................................... 31
Table 4.10: Product terms (1±a)(1±b) and (1±b)(1±a) show phases for G2 .......................... 72
x
Table 4.13: Eigenvector Summary from Ek Rk = Rk for G2 .................................................... 78
Table 4.14: Eigenvectors EK are major axe s that form Dual Tetrahedrons in G2 ................... 79
Table 4.16: Linear Independence of Decode States in Karnaugh Map for G2 = span{a, b} . 84
Table 5.2: Summary of Spinor SA = (a0 a1) Action on Qubit States in G2 – .......................... 89
Table 5.4: Computational Basis Measurement (A)(1 ± a0)(1 ± a1) for G2 ............................ 96
Table 5.6: Computation Basis Measurement Destroys Qubit Symmetry for G2 .................... 98
Table 6.1: Summary of Basis States using spinor singlets {S00 , S01 , S10 , S11 } for Q2 ......... 115
Table 6.2: Summary of Bell/magic States times Recursive Operators for Q2 ..................... 116
Table 6.3: Masked Operator States (–1 – SA SB)(SA + SB) = 0 for Q2 .................................. 121
Table 7.1: Operator and Basis Summary for Single Qubit A in Q1 ...................................... 124
Table 7.2: Operator Summary for 41 out of 81 states for Q1 ............................................... 125
Table 7.6: Desired Control-Not Operator X = +a1 where (a1 b1) X = – b1......................... 132
Table 7.8: Row by Row Operator Solutions for CNOT for Q2 = {A, B}.............................. 135
xi
Table 7.10: Valid State Rows for A0 B0 C0 TOF AB in Q3 ..................................................... 143
xii
LIST OF FIGURES
Figure 4.2: Bivector Defines an Oriented Area (via right hand rule) ..................................... 42
Figure 4.7: Example Products and Table Controls for ga.pl Tool.......................................... 59
Figure 4.9: Second attempt produces two- input Logic AND in G2 ........................................ 60
Figure 4.10: Inversion of Logic AND Produces 2- input Logic NAND in G2 ........................ 61
Figure 4.14: Validation of logic AND for up to ten vectors using {+, 0} .............................. 65
Figure 4.16: Addition and Subtraction of ROW 1 and ROW 3 for vectors in G2 .................. 68
xiii
Figure 4.19: Solve for eigenvectors where (e k)2 = 1............................................................... 76
Figure 4.21: Major diagonals form eigenvectors E0-3 on left and duals E7-4 on right for G2 .. 77
Figure 4.22: Sides of dual tetrahedrons form P0-3 on left and duals P7-4 on right for G2 ....... 79
Figure 5.3: Illustration of Qubit States for 90° and 180° Rotations ....................................... 90
Figure 5.4: On-axis and Off-axis Bases for G2 – on left and G2 + on right............................. 95
Figure 5.5: Spinor in Spin-down, spin- up, and superposition states (from IBM) ................ 100
Figure 6.6: Concurrent Hadamard Transform for Q3 , Q4 and Q5 (truncated tables) .......... 109
Figure 6.7: Square of Concurrent Hadamard (SA + SB)2 = (1 – SA SB) in Q2 ....................... 112
Figure 6.8: Validation of Magic State Phase Relationship M3 =B0 – S00 in Q2 .................. 118
Figure 6.9: Summary of Bell and magic states using Pauli basis singlets ............................ 122
Figure 7.1: Full Matrix Decode of CNOT AB gate output for Q2 = {A, B} ............................ 134
Figure 7.2: Control-Hadamard Operator CHADAB for Q1 = {A} and Q2 = {A, B}.............. 136
Figure 7.3: Fredkin Gate States for Q3 in Pauli Basis .......................................................... 143
xiv
CHAPTER 1
The original motivation for this dissertation was to understand how the fundamental
computational resources of space and time differ between classical and quantum computers.
It was anticipated that if Boolean logic could be represented as a set of simultaneous linear
matrix equations for both classical and quantum systems, then insightful distinctions would
arise about the nature of information, space, time, concurrency, reversibility, and
computation. The minimum outcome expected from this approach was that, by representing
better logic tools that treat logic and registers in a unified way. This goal of representing
Boolean logic in a linear mathematics is the conceptual glue that binds this dissertation while
connecting the computer engineering perspective to the math and physics domains.
classical computers. This promise was encouraged by Peter Shor’s 1994 discovery of a
quantum-computing algorithm [34] that would efficiently factor the product of two large
prime numbers. The difficulty of factoring the product of two large prime numbers is the
1
running Shor’s algorithm, in contrast, can solve this type of problem rela tively easily with
linear time increase in effort for a linear growth of the problem size. This ability defines a
new computational complexity class called Quantum Polynomial Time. In spite of this
immense computational speedup, very few people can comprehend or apply this result
because the existing mathematical notation for expressing quantum computing is derived
from, and conceptually indebted to, traditional quantum mechanics which, lacking any notion
between information and quantum mechanics. Visionaries such as Richard Feynman [11] and
Rolf Landauer [19] worked on the problem over 40 years ago. During the last 20 years,
researchers in this field justified working on this problem as preparing solutions for the
Shor’s discovery, this quest was accelerated by the desire for a drastic increase in computing
My own interest in this field originates with the understand ing that classical computers are
intrinsically limited, not by technology or energy concerns, but rather because information
encoded as energy or matter is primarily segregated and limited by the nature of space and
time [27]. Information encoded using quantum states somehow bypasses these classical
information encoding limits and creates a non- local and a-temporal information wholism, as
2
required by large scale quantum consistency. Even though information encoded as quantum
states is not synonymous with energy, it must still be physical in order to be consistent with
the second law of thermodynamics and black hole mechanics [31]. Quantum computing is
the ideal place to study the core relationship between information and the classical
computing resources of space and time. True computational concurrency is not possible
except in the quantum domain because causal spacetime segregates classically encoded
information.
Classically trained computer engineers and programmers seem ill equipped to participate in
the quantum computing revolution unless they have been educated in the specialized math
and physics of quant um computing. The quantum computation rules are so different from
classical computing that currently this field is inhabited predominantly by physicists and
mathematicians. Unfortunately, many of these researchers lack the sophisticated and well
program complex and unintuitive quantum systems. This is a classic skills- mix problem and
the goal is to provide the tools needed by designers of quantum computing systems.
The quantum rules are so bizarre and therefore counterintuitive that most traditional classical
programming techniques do not apply because they depend on implicit assumptions about
spacetime, information representation, energy, and causality that are inappropriate in the
entanglement, high dimensional spaces, and true concurrency add additional confusion to the
3
1.1.3 Expanding the Quantum Computing Industry
Since quantum computing is both fundamental and important, the computing industry needs
more engineers and programmers to participate in its understanding and development. The
traditional computer industry has an inverted developers’ pyramid within which a relatively
small percentage of designers build hardware while many more people build tools such as
editors, assemblers, linkers, libraries, compilers, debuggers, operating systems, networks, and
other infrastructure utilities. The next larger group of people builds application-specific
software on top of the hardware and software infrastructure. Finally, a very large group of
customers use these applications and are supported by sales and service personnel.
This same development progression must occur in order to make quantum computing a
applications or that it acts as the transition technology when conventional electronics scales
into the nanoelectronic region. The diverse occupations listed above will not be primarily
and programmers must somehow get involved in the quantum tools and programming effort
and this can only be accomplished if a mathematical bridge [21] exists to facilitate the
building of the required software tools and applications. Such an approach to quantum
This dissertation is primarily intended for classically trained computer engineers and
underpinnings (usually using Hilbert space matrix notation). The goal is to gently define,
4
using geometric algebra, the concepts and mathematical representations needed for
conventional computer design and programming. Despite this approach and targeted
audience, another goal is to be faithful to physics, reproducing the usual quantum physics
descriptions of devices and phenomena in a new language. The ultimate goal is to provide a
common mathematical language and tool framework that acts as a bridge between engineers
and physicists.
notatio n , where the “ket” is a column vector and its transpose the “bra” is a
row vector. This matrix notation is compact and terse, and represents a language and
conceptual barrier to engineers and programmers in the same way that physicists and
mechanics rely on complex numbers, which also creates a representational mismatch because
of the semantic gap between complex numbers and the binary 1’s and 0’s of computers.
spaces in expressing the high-dimensional spaces that inevitably occur, but using only real
(rather than complex) numbers. Additionally, geometric algebra uses an algebraic rather than
a matrix notation, similar to Boolean algebra, thereby making it more palatable to engineers
and programmers. Real numbers more closely match the traditional Boolean logic
5
encouraging the creation of customized tools for quantum computing. Since geometric
[21], it should also be useful for exploring quantum computing. The geometric algebra
This dissertation demonstrates that arbitrary Boolean logic equations and operators can be
vectors using only addition and multiplication. A set of tools is defined, built, and described
that generate, simplify, evaluate, print, and solve Boolean logic equations written as
geometric algebra expressions. Quantum bits (qubits) and quantum registers are expressed
using this representation and the new tools are used to discover, define, and explore the
states, operators, and intrinsic properties that are important to quantum computing. These
results demonstrate that geometric algebra appears to faithfully capture central quantum
computing concepts, enabling deeper insight into the mechanisms behind quantum
computing as well as the direct creation of efficient qua ntum computing development tools.
6
CHAPTER 2
The universe is really a very large extended quantum simulation [12] whose outcome is the
classical world view we experience around us. This fact is accepted because the inverse
mechanical systems. Even empty space and black holes are filled by invisible, nonphysical
quantum states (or zero-point energy), which represent a very high-dimensional quantum
foam or ether that can only be observed as a small projection into our 4D spacetime.
This accepted understanding means that quantum states are protophysical [28], since they are
more fundamental than classical entities such as space, time, energy, or matter. This idea
agrees with the “big bang” theory of cosmic evolution in which quantum states existed before
classical features appeared. Since primitive quantum states encode (or are) information,
information is primitive and the start of the universe represents a quantum “bit bang” [23].
IBM Fellow Rolf Landauer lectured for years that “information is physical” [20]. In this he
opposed the prevailing thought during most of this century that computation took a minimum
temperature [26]. Landauer argued that the irreducible cost of computing was not the
7
computation itself, but rather was due to erasing information, which releases a small amount
of energy consistent with thermodynamics. With the efforts of others, Landauer’s Principle
Landauer’s Principle requires that information be conserved in order to be consistent with the
2nd Law of Thermodynamics, even when the information is encoded as quantum phase states.
Bekenstein and Schiffer ultimately showed [2][32][33] this physical reality of quantum-
encoded information by demonstrating that, when a quantum state is thrown into a black
hole, the surface area size increases by the minimum discrete amount of one bit, which is
Black holes are therefore bit buckets, due to the combined laws of thermodynamics, quantum
mechanics, gravity, and information theory. The surface area of the black hole is known as its
event horizon (or entropy, measured in bits), and represents the boundary between our
physical 4D spacetime and the quantum dimensions inside (that form the singularity). Since
time is infinitely dilated and space infinitely contracted within a black hole, the entire
perspective inside is experienced as a single spacetime point, exactly like the observer frame
high-dimensional spaces, to physical observables such as space, time, energy, and gravity.
This relationship between the physicality of information and physical observables can be
examined from a computational complexity perspective rather than the above classical
energy viewpoint. For example, take an NP-complete computer algorithm and scale the
problem so that solving it using today’s most advanced fixed size computer technology
8
would take longer than the age of the universe. This spatially limited algorithm thus has
unlimited temporal extent. Now temporally restrict this solution to a relatively small time T
and compute the number of processors N working in parallel to solve it in that time T. The N
processors each of mass m communicate using light traveling at the speed of light c, thereby
must fit into the volume of this sphere, and as the problem size increases, the mass grows
exponentially faster than its volume and exceeds the black hole mass density limit. Even
though a classical computational solution therefore cannot be built, this class of problem can
be solved using quantum computers. Therefore, even though quantum states are physical,
they must have a completely different relationship to space, time, and information than
computers made with mass, information encoded as energy, and computation responsive to
Computation is smarter the greater the number of independent degrees of freedom because
more dimensions mean more information is local simultaneously. The unit distance locality
metric (number of neighbors at unit distance away from any grid point) in a discrete cellular
grid is simply 2n, where n is the number of orthogonal dimensions. As will be formally
shown later in this chapter, every qubit represents two separate degrees of freedom (i.e.
dimensions), so large quantum systems represent many more degrees of freedom than are
Based on this thinking and assuming scaling is at the maximum, it is impossible to simulate
9
any number of dimensions in fewer than that number of dimensions without the appearance
of some kind of anisotropic behaviors, because the locality metric is no longer uniform.
Quantum systems can be smarter than classically constrained computers because they
possess a locality metric proportional to the number of degrees of freedom and this space- like
locality represents a primitive computational resource. This is also the primary reason why
The key to understanding quantum computing is to learn about the physical reality of
quantum bits (qubits) are represented as two orthogonal vectors, so each dimension can
change independently of the other, thus allowing all possible combinations of these vector
states, and hence capable of expressing both classical and superposition phase states. Many
qubits entangled in a quantum register thus create an exponentially larger number of linearly
independent dimensions, due to the tensor product operator combining the orthogonal vector
states of every qubit. As operators evolve the overall system state, the independent states
become constrained due to the erasure of information but still represent the same large
number of dimensions. In contrast, the state space size does not exponentially expand for
classical systems.
The concept that mathematically ideal quantum states actually encode information is foreign
to most computer scientists and engineers, since historically they have been taught the now
obsolete idea that energy is synonymous with information encoding (except in classical
10
in order to have a tangible effect on the 4D universe. The quantum states and their associated
information metric constitute the bookkeeping method for tracking bits, just as the energy
metric is the bookkeeping method for the 2nd Law of Thermodynamics. Quantum systems
represent a particle/wave duality and also an energy/information duality with separate ledgers
for energy and state information. Erasing information represents a transfer I → E between
High dimensional spaces are difficult to understand because the intuition we develop for one,
two and three dimensions does not scale to n dimensions where say n >>20. For example,
metrics based on the Cartesian distance (square root of the sum of the squares) between two
points in an n-dimensional unit hypercube have the following properties: as n becomes large,
the expected mean or standard distance between any two random points grows as d = n/6
(as one might expect), but the standard deviation of a random collection of points at the
distance d approaches the constant s = 7/120 = .2415 [22]. For example for n = 3, then d =
.707 and most points lie at distance .707 ± .24 but for n = 30 then d = 2.23 so most points lie
This experimentally verified result is unexpected, and therefore unintuitive, because it means
that two randomly chosen points are likely to be the standard distance apart from each other
and it is statistically highly unlikely to find randomly chosen points closer or farther away.
This property makes high dimensional spaces useful as content addressable or error
dimensional hypercube lies near its surface, similar to the event horizon surface area of a
11
black hole. For these reasons, much of the work in high-dimensional spaces is done using
Einstein showed that space and time are linked together in an integrated 4D spacetime
framework. This classical spacetime must emerge from the high-dimensional framework of
quantum mechanics, as described in Wheeler’s “It from Bit” paper [36]. Therefore the
quantum domain must have a different kind of primitive temporal framework, if for no other
reason than it exists in a completely different spatial environment. Conceptually, this proto-
asynchronous logic [29] and the work of Manthey [23] (not to mention that of C.A. Petri in
the 1960s and 70s). The understanding of quantum time is very important to computation
This idea can be easily envisioned by adapting a thought experiment devised to illustrate
relativistic time dilation. In a variation of that famous thought experiment, we postulate twin
astronauts, one of whom stays on earth while the other takes a ride in a spaceship for 20
years at 0.995 the speed of light. Each astronaut took one of two identical computers, both of
which are tasked with solving the same set of 200 problems, each of which is estimated to
take 10% of a year to complete. For the humans involved, the twin staying on earth ages 20
years. Due to time dilation, his brother ages only 2 years during the 20 earth years and arrives
home 18 years younger than his twin brother. Slowing down human aging is generally
12
labeled as good. For the twin computers, the outcome is interpreted somewhat differently.
The computer on earth finishes all 200 problems just as the spaceship returns. The onboard
computer however has finished only 20 problems. Slow computation is considered to be bad.
Time dilation therefore is considered to be good for humans but bad for computers because
This concurrency is a direct result of the independent spatial degrees of freedom, since a
countable but practically infinite locality metric exists for high-dimensional spaces. If all
independent states can simultaneously interact due to superposition, then no delay is required
to complete a piecewise decision process. Since these states also have no mass, they also
need no spatial separation, and are similar to a small singularity as found in a black hole.
Ideal concurrency due to superposition must be valid for quantum states, otherwise placing a
detector after one of the slits in the twin-slit experiment could not retroactively create the
self-consistent effect of the single pho ton passing only through the other slit. Quantum
energy eigenstates act like a memory constraint mechanism because they exist outside
classical time (or persist through time) and all possible interaction sequences must be self
consistent. True superposition concurrency with unlimited local spatial extent (a la Einstein-
Podolsky-Rosen - EPR) [3] is possible only for quantum-encoded states and is impossible for
13
Quantum-encoded states directly address both primary computation resources (i.e. space and
time) by allowing an unlimited locality metric, thus eliminating the need for the sequential
integration of partial results. Quantum systems are always self-consistent because they act as
a whole, which again is only possible with the unlimited spatial locality of a high-
dimensional space, thereby enabling true concurrency (cf. co-occurrence) [23]. Interaction of
disjoint finite sets of dimensions (operators and resulting co-exclusions [23]) creates a
synchronization-based proto-time from which classical time and energy metrics ultimately
Matrix notation is a compact way of expressing simultaneous linear systems, and has been
extensively used. The original goal of this dissertation was to map the Boolean logic of
traditional computing into matrix notation in the hope of gaining mathematical insight and
formalism for classical computing and parallelism. Since quantum computing is also
represented this way, though as reversible linear matrices and unitary operators in high-
dimensional Hilbert space, this effort was quietly extended to include the quantum
Traditionally, qubits and quantum systems have been described [15] using complex-valued n-
1 0
0 = , 1 = , {α , β }∈C and α + β = 1 . The complex constants {α , β } are called
2 2
0 1
14
the probability amplitudes and their square is the probability of that state’s occurring.
Operators are square matrices that allow linear combinations of these basis vectors.
Quantum registers combine q = n/2 qubits to form larger Hilbert spaces H 2n=2q using the
2 q −1
tensor product ( ⊗) operator to form ψ = ψ 1 ⊗ ψ 2 ⊗ ... ⊗ ψ q = ∑ α i i with
i =0
2q −1
{α i} ∈C with the unitarity constraint ∑α = 1 . The number of states grows as the power
2
i
i= 0
2 q of the number of qubits due to the tensor product operator. While the above definitions
are pleasantly concise to mathematicians, they are terse and enigmatic to engineers and
programmers. Complex-valued states, bra-ket notation, and the tensor product are all
notational ideas that are much simpler to describe and understand using geometric algebra.
The focus of this dissertation is therefore to provide an alternative and more palatable
Geometric algebra relies on real numbers rather than complex numbers. This is topologically
and can be directly represented in geometric algebra using two orthogonal real- valued
Matrix algebra is non-commutative and so is geometric algebra. The big difference is that
geometric algebra uses an algebraic rather than a matrix notation. Non-commutativity means
15
that multiplication order is important, since right side multiplication produces a different
result from left side, such that a * b ≠ b * a. This is obvious for matrix operators that are not
square. Some matrices A have no multiplicative inverses A-1 defined for them and this is also
true for some expressions in geometric algebra. In both algebras where A-1 is undefined, the
determinant, which is used in the denominator for computing the multiplicative inverse, is
matrices because its geometric product is the sum of the inner (or dot) and outer (or wedge)
orthogonal vectors {a, b}. The geometric product will be shown to be equivalent to the
tensor product when using the correct representation for qubits, complex numbers are
replaced by the geometric product of vectors, and algebraic notation replaces matrices and
computing rather more palatable to engineers, but nevertheless equivalent (and perhaps
superior) to the Hilbert space approach. Chapter Four is devoted to geometric algebra
fundamentals.
Several definitions used in quantum computing have a slightly different contextual meaning
than their classical counterparts. Also, quantum computing contains ideas that are not present
16
2.3.1 States and Vectors for Bits versus Qubits
A bit is a representation of two possible binary states denoted as {–, +} or {false, true} but is
often expressed as the implementation-specific binary values {0, 1}. In the following
chapters, please know that the {–, +} binary representation in particular does not imply the
values {0, 1}. A classical bit can be mathematically expressed as a vector because it
represents a single independent degree of freedom. The primary property of the binary states
of a classical bit is they are mutually exclusive and inverting either state produces the other.
Multiple bits can be represented as multiple, orthogonal bit- vectors “concatenated” together,
which means that their bit values can change independently of each other, resulting in 2n
possible state combinations. The state thus produced by concatenating multiple bit-values can
dimensional unit hypercube. Since each vector’s binary states are mutually exclusive, the
concatenated states also exclude all others, so effectively the vector address means only a
single corner of the hypercube can be represented at a given instant. Inverting this address
(i.e. composite state) is equivalent to addressing the diagonally opposite corner of the
hypercube. Classical bits and states are clearly separate but closely related concepts.
Quantum bits or qubits exhibit a slightly different relationship between vectors and states. A
classical bit uses a single vector to represent its two mutually exclusive states. In contrast, a
qubit must additionally handle the physically observed cases when the two states are
simultaneously both on or both off so the representation requires two independent binary-
17
valued vectors to encode those four possibilities. The simplest way to encode this is to assign
each quantum state its own unique vector, which makes the states independent of each other.
As a result, vectors represent bits in the classical case but states in the quantum case.
Under these conditions, an individual state vector has the mutually exclusive modes of either
on = “+”, or when inverted, off = “–” = not on. Each state vector can be independently placed
in the mutually exclusive states of either on or off. In order not to confuse the use of the word
“state,” when classical states are mapped to individual vectors in qubits, the word state will
refer to one of the unique combinations of a set of orthogonal vectors, and this terminology is
In any case, the qubit representation allows a qubit to represent the possibility of being in the
classical state “+” and classical state “–” simultaneously, which is impossible for classically
encoded bits. The qubit state to simultaneously express two mutually exclusive classical
simultaneously represents both True and False, both Catholic and Protestant, or both
Republican and Democrat. This idea is very hard to grasp coming from a traditional
computing perspective where these states are historically regarded as obviously mutually
The best way to think about such non-mutually exclusive states is to envision sets of states,
where each state is represented by its own vector. The traditional classical bit-encoding can
then be represented when the two vectors have opposite semi-redundant values such as
18
{Catholic=on, Protestant=off} which means the same as {Catholic, not Protestant}.
Additionally its inversion can be expressed as {not Catholic, Protestant}. Alternatively, the
superposition states are represented when both values are the same, resulting in the set
{Catholic, Protestant} or its inversion {not Catholic, not Protestant}. A qubit can be
initialized to a particular starting state using standard quantum operators (Inversion and
Hadamard).
The tensor product operator ( ⊗ ) is now easy to understand using this state set model
Quantum operators applied to this product set would simultaneously work on each
combination. The orthogonal vectors that represent these sets of concurrent states for each
qubit are not concatenated together like classical bits but written as the linear sum of vectors
(C + P) and (R + D). Vector-state addition represents true concurrency (cf. Chapter 4) and
enables superposition of qubit states, including combination generation using the tensor
product. These ideas will be expressed in a formal and obvious manner in the geometric
algebra notation. The wholistic properties (or coherence) of superposition and entanglement
Some sets of states can be separated or factored back to the original constituent sets. For
example, combining qubit states {red} ⊗ {car, truck} produces the entangled set of states
{red car, red truck} which is separable back into the sets {red} and {car, truck}. But the
entangled set {red car, black dog} is not separable [15] because no sets of smaller dimension
19
exist that, when combined using the tensor product combination operator, can produce that
result. Inseparable entanglement will be precisely shown later to be caused by informa tion
erasure. Inseparable entanglement does not exist in classical computation systems because it
represents a specialized simultaneity constraint with information erasure. This subject will be
Classical computation and state machines are built on the causal state-to-state transition
model known from finite state machines (FSM). FSM implementations assume that states are
mutually exclusive, measurable, and most use a many-to-one state-to-state mapping, making
them irreversible. Quantum algorithms work with sets of states at one time and must only
destroy information (i.e. a projection operator) so are also not reversible. This dissertation
shows that GA projection operators without multiplicative inverses are not reversible and
therefore cause information erasure. All of these new concepts will be defined and discussed
Two major classes of quantum algorithm exist. The first class is the implementation of
discussed later, such as Fredkin and Toffoli gates [24]. Quantum Finite State Automata
(QFSA) also fall into this category. These algorithms may be useful for implementing
traditional logic when the nanoelectronics scaling limit is reached; they only use classical
20
The second class of quantum algorithm outperforms its classical counterpart by using
superposition and entangled states. Shor’s factoring algorithm [34] (which uses the Quantum
Fourier Transform (QFT)) and Grover’s quantum search algorithm [14] are the primary
known algorithms in this class. A very useful outcome of the present research would be to
A physical implementation of the currently largest (seven qubit) quantum computer was
reported by the Los Alamos National Labs (LANL) in March 2000 [18], only 18 months after
the first three qubit machine was reported (using Nuclear Magnetic Resonance (NMR) and
customized molecules). Early in 2002, IBM announced Shor’s algorithm factored the number
15 into factors three and five, running on a seven qubit NMR quantum computer. Nanodots
(single 3D-confined quantum states) and nanomolecules (4-5 coupled nanodots) are the long-
term hope for quantum computers because they represent the continuation of contemporary
The earlier sections of this chapter tried to show how fundamental quantum information
principles are to the structure of the universe. Effectively, the universe is an extremely large
quantum simulation from which classical entities emerge. This section describes the steps
required to harness this innate ability to produce useful computation and answers.
The coherence of a quantum state is easily affected by noise from the environment, so special
care must be taken to prepare and maintain the state to be used for computation. Each
21
quantum computation follows an algorithm or recipe of operations, starting with initializing
the qubits to known states. At the end of evolving the system state using a programmed
sequence of operators, the final evolved state must be measured to produce the answer,
which has the side effect of destroying the coherent information represented in the evolved
state. This measurement process is called a projection, because the high dimensional states
are reduced to a single classical bit vector result inside the measurement apparatus.
Anywhere during this process, noise can also modify the system state, acting like an
unwanted operator or measurement. For these reasons, redundancy of state with error
correction techniques has been successfully applied to the evolution of quantum states.
Designing quantum computers and algorithms is still in its infancy, but significant
engineering progress has been made over the last ten years.
Quantum theory is very strong due to its very precise mathematical models. Unfortunately,
Manthey and I believe the overall understanding and intuition about quantum computing is
far less mature than generally thought. It is also not very widespread due to the various
complexities involved. The dream is to make quantum computing a natural extension of the
knowledge, techniques, and tools used in classical computing, resulting in a much larger
22
CHAPTER 3
This chapter introduces the ideas that information, reversible computing, non-erasure, and
unitary transforms are equivalent concepts, due to thermodynamic principles. Rolf Landauer
first demonstrated in the 1960s that any information erasure leads to a logical irreversibility,
which must ultimately result in a physical irreversibility and thus ultimately impacts the
amount of heat generated by a computation. Unitary transforms are defined as a set of one-to-
one state mappings that are reversible [24], whereas the many-to-one state mappings used by
conventional logic OR and logic AND gates are logically irreversible, and most classical
state machines have multiple ways of reaching a state (many-to-one) so are also not
reversible. All these topics are very important to realizing logic via quantum mechanics.
The only useful operations on the quantum states of an isolated system are unitary transforms
(expressed as unitary matrices in Hilbert space). Since unitary transforms preserve the norm
of the inner product of quantum states, they effectively are performing rotations on those
states. In fact, the only unitary operation possible on quantum states is to “rotate” them.
Rotation is inherently unitary because it uniformly transforms all states, which is equivalent
is unitary, it can be reversed and thus implies that none of these states are truly destroyed or
23
erased. Rotations are easily expressed using linear rotation groups [7]. Unfortunately, the
formal mathematics for describing unitary transforms in complex- valued Hilbert spaces is
quite involved. Therefore a formal and rigorous explanation will be provided in Chapter Four
The concept of mapping states in a one-to-one and reversible fashion is identical to the
unitary transforms used in quantum mechanics. This equivalence necessitates the exploration
linear system. Once some linear system is in place, the two well known three- input reversible
gates, Fredkin and Toffoli, can be expressed. Note that some one-to-one transforms erase
Again, the usual mathematics of complex Hilbert spaces is too complex to make this simple
point regarding the relationship between reversible Boolean logic and linear systems.
Therefore, the remainder of this chapter covers the main concepts of reversible logic and
quantum gates without relying on Hilbert space mathematics. In order to demonstrate how
linear systems must adapt to encompass logic operations (both reversible and irreversible),
real vector linear algebras called Galois Fields (GF) will be introduced and used to express
Boolean logic operators. The forms of these Galois Field expressions are similar to those
developed later in geometric algebra and constitute an introduction to the key issues.
24
3.3 Univers al Logic and Quantum Gates
A set of operators is “universal” or “Boolean complete” if any Boolean logic function can be
represented using combinations of only those operators. The traditional two-input NAND
logic gate (with one output) is universal even though it is not reversible. Likewise the two-
input NOR gate is also universal, but its near-cousin the eXclusive-OR (XOR) gate is not
universal by itself. Logic inclusive OR and logic AND gates are also Boolean incomplete by
themselves unless inversion is available using logic NOT or logic XOR gates.
A universal one- input gate clearly does not exist, and likewise no two- input gates exist that
are both universal and reversible. A minimum of three inputs and three outputs are required
The rules regarding universality and reversibility change for quantum gates because all
quantum systems are unitary and thus are inherently reversible. The cha llenge is to use this
kind of system to produce classical Boolean logic and other useful computation. The smallest
quantum system is a single qubit containing two interlocked orthogonal state vectors. This
quantum phase gate is q-universal [1] because it can place the qubit in an arbitrary phase
state. The Hadamard gate is equivalent to a phase gate with a preset 90° angle. Consequently
25
the Hadamard gate is not q-universal. Hadamard gates switch qubits back and forth between
classical and superposition phases. A single qubit cannot represent any classical Boolean
For systems with two qubits, conditional operators can be defined where, when the control
qubit is “True”, the operation on the other data qubit is conditionally performed, else nothing
the most common is the control-not gate. The control-not gate conditionally inverts the data
qubit when the control qubit is “True,” and so is equivalent to an asymmetric XOR logic
operator. If the control is not in a classical state, the data bit is placed into a superposition
state. The control- not gate is not logic universal. Similarly, the phase gate equivalent for two
qubits is called the control-phase gate, which is q-universal for setting any quantum state.
The control-V [10] gate is equivalent to a conditional control-Hadamard gate and is not logic
universal. No two-qubit system (or logic operator) is Boolean complete, even though the
The first Boolean complete classical logic operators arise using three classical bits or three
qubits. The reversible Toffoli and Fredkin gates are the only two universal classical logic
gates possible [24] and require three inputs and three outputs. Table 3.2 shows the logic
tables for Fredkin and Toffoli gates with classical inputs {a, b, c) and outputs {A, B, C}.
26
Table 3.2: Logic Tables for Fredkin and Toffoli Gates
c b a C B A c b a C B A
0 0 0 0 0 0 0 0 0 0 0 0
0 0 1 0 1 0 0 0 1 0 0 1
0 1 0 0 0 1 0 1 0 0 1 0
0 1 1 0 1 1 0 1 1 0 1 1
1 0 0 1 0 0 1 0 0 1 0 0
1 0 1 1 0 1 1 0 1 1 0 1
1 1 0 1 1 0 1 1 0 1 1 1
1 1 1 1 1 1 1 1 1 1 1 0
Fredkin Gate c=control Toffoli Gate c=b=control
The Toffoli Gate is called a control-control-not gate, where the two control inputs must both
be “True” to conditionally invert the third data qubit. The input values nevertheless pass
through to the outputs so nothing is ultimately erased. Other useful gates, defined as the
later using geometric algebra. Thus, control gates can be defined with any number of inputs.
The Fredkin gate is similar to a small two-pole relay with a single control line and two data
lines, which is functionally equivalent to a 2x2 crossbar switch. If the control line is “True,”
the switch is in the “bar” state and the data values just pass thru. If the control line is “False,”
the switch is in the “cross” state and the data values are routed to the opposite data output.
All input values pass thru to an output, so this gate conserves the number of 0s and 1s
between input and output pins. Using ballistic computing ideas where a logic “True” value is
represented by the presence of a ball, the Fredkin gate is thermodynamically the most passive
reversible gate since no balls need be created or destroyed. Assuming a steady supply of
spare balls (source) as needed then destroying a ball (sink) is the same as erasing
information.
27
The Toffoli and Fredkin operators are important because they link universal classical logic to
unitary systems, and as well, demonstrate reversibility in classical computing systems. These
bridge operators will be used in Section 3.5 below to illustrate how Boolean logic operators
cannot be directly represented in linear systems composed exclusively from the input vector
set. This concept is necessary in order to explain why unitary quantum computation requires
inflated linear spaces (using the tensor product) to represent reversible logic operators.
Much of physics models can be expressed using simultaneous linear equations traditionally
represented as matrices. Therefore, the first step in integrating computation and physics
This approach permits the same robust mathematical techniques from physics to be applied
to computational science. Since any linear algebraic system that is Boolean complete should
work, the relatively simple linear algebraic system called Galois Fields [30] is chosen, which
is classical logic universal. This approach produces the unexpected result that Boolean logic
operators can only be expressed when embedded into an expanded linear space.
Galois Fields are finite fields that can be extended to any size GF(n) but we use only the one-
bit fields, i.e. GF(2). Table 3.3 defines the multiplication and modulo 2 addition operators for
inputs {a, b} in GF(2) and their respective equivalence to logic AND and logic XOR. The
standard input values {1, 0} correspond to the logic meanings {True, False}.
28
Table 3.3: Karnaugh Maps of Intrinsic Logic Operators in GF(2)
Table 3.4 illustrates that GF(2) is Boolean complete since it intrinsically contains the logic
AND operator and the inversion operator via logic XOR. Therefore any Boolean logic
function can be written as a linear equation in GF(2) and simultaneous equations can be
expressed as matrices.
This derivation is straightforward and can be expanded to any number of input states, but the
two highlighted points warrant further comment. First, the NOT operator is implemented
with XOR by adding a constant value of “1.” Second, the size of the OR expressions are
longer in this algebra, since GF(2) intrinsically provides only logic XOR and logic AND.
Subsection 3.5.2 demonstrates that logic OR gates for n inputs require 2n –1 terms in GF(2).
29
3.5.2 XOR Dominated Logic
Logic AND operations can be expressed compactly using GF(2)’s intrinsic multiply operator.
Conversely, the logic OR operator is not intrinsic and must rely on XOR, which is the mutual
exclusion operator. Since XOR logic is unintuitive, some useful design insight will be
presented. Traditional logic designers use Karnaugh maps to help define logic equations by
circling groups of quadrants and writing down the linearly independent expression using
logic inclusive OR, sometimes writing + to signify the logic OR (symbol ∨ ). This approach
also works for Karnaugh maps using GF(2) only if the coverage terms are non-overlapping
or odd. The Karnaugh maps and equations in Figure 3.1 depict this idea for logic OR.
(a * !b) + b
= (a*(b+1))+b
=ab+a+b
= a OR b
The linear independence difference between inclusive and exclusive OR is simply that XOR
is odd parity: where each square in an XOR oriented Karnaugh map covered by an odd
number of terms produces a value of 1. By definition, disjoint sets produce an odd number of
covered squares for XOR logic and an even number of covered squares always produces a
value of 0. Because of the symmetry of XOR, expressed as (1 + vector), the final number of
terms in sum-of-products form grows large. A similar result will occur later in geometric
algebra.
30
Table 3.5: Logic Inclusive OR for {2, 3, 4} input states in GF(2)
Applying this same approach for n inputs shows that inclusive OR in GF(2) requires every
This result is significant for two reasons. First, since GF(2) is logic AND predominant, logic
OR expressions require an exponential number of terms due to the influence of XOR. Second
and more importantly, each product term used to define an operator in a GF(2) sum is
linearly independent of all other terms. This directly implies that, given a matrix for
orthogonal basis states {a, b}, then the basis set must be inflated (adding columns/rows) for
each product term {a b} in order to express Boolean logic operators in the linear matrix form.
The next subsection demonstrates this result using the Fredkin and Toffoli gates.
The universal reversible Fredkin gate has three inputs [c b a] and three outputs [C B A]. The
three inputs form a basis vector set using the values {1, 0}. The Fredkin linear operator is a
The summary of this result is shown in Table 3.6. See Appendix A for the full derivation of
31
Table 3.6: Fredkin Gate as Matrix Operator in GF(2)
As expected, the Fredkin gate can be expressed as simultaneous equations in universal GF(2)
the conditional matrix representation of F(c) can only be described in a larger linear vector
space, inflated by the product of the control signal with each data line (see the bold text in
table). Similarly, as Table 3.7 illustrates, the Toffoli gate with controls c and b should also be
32
3.5.4 Boolean Logic is formally non-linear
Based on universality and reversibility requirements in the context of finite linear systems, it
is clear that conditional logic operators such as F(c) and T(c, b) can not be expressed solely
in the linear space defined only by the input state space of {a, b, c}. The size of the linear
space must be inflated by all the conditional terms, expressed as products, required to
represent the logic operators in a linear algebra such as GF(2). Once expressed in this
expanded linear matrix format, the entire system defined by both the state and the operators
is subject to full matrix techniques. Full reversibility is possible if all input and output states
The independent choice of including the product term (a b) inside some function f (a, b) is
and independent of the values of either a or b. Therefore, a closed linear space which is to be
capable of representing both the functional operators and their state must be inflated by all
the products used by the functional behaviors. This is very important since the states and
operators of many algebras are the same elements (cf. they are group elements), and the
The size of the inflated linear space depends on both the number of input vectors and the
complexity of the operations performed. The reason logic OR creates the maximum space
inflation is that its output is reached from almost any combination of input states, which
represents a many-to-one mapping. The reversible linear space must therefore be big enough
to hold and reverse the state changes made by operators that perform logic OR.
33
In conclusion, any reversible linear system is Boolean complete when it reaches a certain
minimum size. To represent both the states and the operators of arbitrary Boolean functions,
the size of the closed linear system must be further expanded. The overall size of the closed
reversible linear system is dependent on the amount of state plus the overall complexity of
34
CHAPTER 4
This chapter summarizes the principles of geometric algebra (GA) required for this
University and the University of Cambridge. GA unifies much of the existing mathematics in
the specialized areas of vector algebra, quaternions, spinor algebra, matrix, and tensor
who united the inner product with Grassmann’s outer product. David Hestenes of ASU
Most of modern physics is based on vector and matrix algebra, plus the proliferation of other
novel algebraic systems listed above that were created as they were needed. These
specialized systems are naturally included as part of the topological approach to geometric
algebra, including such broad application areas as mechanics, quantum mechanics, and
As will be shown, GA’s use of high-dimensional algebraic notation is particularly useful for
efforts in quantum computing, because computer engineers and scientists have different skills
35
from physicists and mathematicians, thus making cross-disciplinary efforts in quantum
algebra removes this difficulty and serves as a unifying mathematical language. As a result,
attracted to his framework because of the allure of a mathematical formalism based on only
addition and multiplication that bootstraps respectively spatial and temporal concepts for
logic. I found much more by adopting his approach and interpretation, which works naturally
with the highly symmetric geometric algebra. Manthey’s conceptual primitives are Co-
An important premise of Manthey’s work is that a simple state and its additive inverse
exclude each other (written as a ↔ a ), which defines the mutually exclusive states of a
classical bit. Simple states are binary, where +a = a = “ON” and ( −a) = a = “NOT ON” and
denoted by simple vectors a, b, c, etc. that are herein generally considered to be orthonormal.
These two states are classical and their exclusion is expressed as a + a = 0 . Exclusion is the
constraint that two given states of a vector CANNOT logically or meaningfully said to occur
36
Co-occurrence is defined as two or more states “occurring” simultaneously and is expressed
as the sum of these states. For states a, b, c, etc. (which will later be taken to be vector
elements of GA), if state a and state b can occur at exactly the same instant in time (assuming
simultaneous states as co-occurring is used heavily in this research to give consistent and
Co-exclusion requires two co-occurrences (wherein each component of the constituent co-
occurrences can change independently) that exclude each other. Initially the state of the co-
occurrence is say (a + b) and later the state is observed as ( a + b ). Since this later state is the
complement of the earlier one, this transition implies that some operator interacted (using
multiplication) with the system. The existence of such an operator implicitly invokes a
hierarchical abstraction: two 1-bit-of-state processes (a and b) have been treated (by this
operator) as one process with two bits of state. This operator can be determined, and in fact is
expressed in geometric algebra as the product (a b). For states a, b, c, etc the co-exclusion
(b + c) ↔ (b + c ) or (b + c) | (b + c ) (4.1)
Since co-exclusion infers an operator for change and implies temporal sequence, it is
primitive since it is static. Also, according to Einstein and Feynman, if anything is conserved
37
Mutual exclusion (or mutex), which controls execution or access order for shared
form the foundation for the computational interpretation of GA used in this dissertation. No
other temporal or causal ideas are defined or implied for GA addition and multiplication. See
According to Manthey, a Turing machine cannot express the notion of true simultaneity since
no co-occurrence primitive exists for it. His coin demonstration shown below illustrates this
point about true simultaneity by relying on the premise that the coins are formally identical
tokens, which are indistinguishable in every respect (cf. synchronization tokens). You could
38
The Coin Demonstration [23]:
Act I: A man stands in front of you with both hands behind his back. He shows you
one hand containing a coin and then returns the hand and coin behind his back. After
a brief pause, he again shows you the same hand with what appears to be an identical
The best answer at this point is “at least one,” which represents one bit of information with
two possible states, state1 = “one coin” or state2 = “more than one coin.”
Act II: The man now extends the same hand and it contains two identical coins.
We now know that there are two coins, that is, we have received one bit of information, in
that the ambiguity is resolved. We have now arrived at the final step in this demonstration.
Act III: The man now asks, “Where did that bit of information come from??”
This bit originates in the simultaneous presence of the two coins. Thus true concurrency
cannot be simulated with a sequential Turing machine no matter how fast the individual
tokens are sequentially presented. Likewise, even though modern general-purpose computers
are Turing equivalent, the missing atomic “test and set” locking primitive must usually be
added to the architecture in order to support the mutual exclusion synchronization tokens
needed by the operating systems. Manthey argues that computing only with tokens is
quantum mechanics used in this dissertation. Addition is used to express the simultaneity of
co-occurrence while multiplication is the mechanism for state change operators. Co-
exclusion implies an operator must interact with the system state to allow a new state to
emerge.
39
Distinct labels for “states” and “operators” become blurred when working with the
mathematical elements defined by GA because both uses are merely conventions applied to
the same expressions in the algebra. Also, these states are NOT assumed to be classical.
Multiplication just means expressions in the algebra (states and operators) interact in a self-
consistent manner without any notion of classical time or causality. According to Manthey, a
simple state s and its inverse [= not s] cannot logically occur at the same instant in time. This
is true for both individual simple states and complex sums of states. This postulate is
expressed in equation (4.2) as a co-occurrence expression that sums to zero, and thus reserves
expression to zero and solving for the roots has a different meaning because the solutions
found cannot occur and actually represent the non-solutions. This idea will acquire more
meaning later when we look at destructive interference for sets of quantum states.
mathematical language for mathematics, physics, and engineering, [21] because GA’s real-
valued geometric product (consisting of the sum of inner and outer products) replaces
complex numbers. The original approach behind GA was developed by William Clifford in
1) scales to arbitrary number of dimensions (i.e. scalars, vectors, bivectors, trivectors, etc)
40
3) geometric product is invertible, which is the multiplicative inverse denoted as 1/A=A-1
5) generalized rotors work for both quantum mechanics and dilation in relativity.
The remainder of this section includes the basic definitions of geometric algebra, organized
by the grade (or arity) of the elements. These elements form a finite algebra that is closed
under addition, subtraction, multiplication and inversion, but not division (so is not a division
algebra). Other books [16] carefully derive the properties of geometric algebra, so this
section introduces only the concepts and rules used elsewhere in this dissertation.
Scalars and vectors have the familiar definitions from general mathematics. Scalars are just a
real valued magnitude without any orientation or direction. A vector adds the notion of
orientation where the sign is significant. The notation convention used here is to denote
scalars (only real values –1, 0, and +1) in normal font Greek characters {α , β , λ , µ ,... }, bold
vector names usually start in lower case alphabetic characters {a, a1, b, c, d, e, …} and
bivectors in bold uppercase alphabetic characters {A, B}. Normal associative, distributive,
The addition of vectors (a + b) forms a new vector by placing the tail of b to the head of a.
Any set of n linearly independent vectors forms a basis set for a space of dimension n.
Multiplying a scalar times a vector represents dilation of the vector length and also allows
direction inversion. Scalars are defined as grade-0 (denoted as 〈 A〉 0 ) and vectors as grade-1
(denoted as 〈 A〉1 ). Scalars and vectors (and higher-grade terms) can be added together to
41
form a mixed grade multivector ( A = 〈 A〉 0 + 〈 A〉 1 + ... + 〈 A〉 n ), which is conceptually similar to
representing complex numbers as the sum of the real and imaginary parts.
Geometric algebra is novel because the outer product ( ∧ ) is formed by multiplying two
vectors together to create a grade-2 bivector. A bivector represents the parallelogram defined
by two vectors with its orientation defined by the right hand rule. This also applies for
oriented volumes (trivector) and higher dimensional n-volumes (n-vectors). The diagram in
Figure 4.2 portrays the topological basis for the anticommutative property of a ∧ b = − b ∧ a .
b b
a a ∧ b = −b∧ a
Figure 4.2: Bivector Defines an Oriented Area (via right hand rule)
discovering that a geometric product is the sum of the inner and outer products. The
geometric product can be generalized to any number of dimensions because the inner product
is a grade reducing operation and the outer product is a grade increasing operation. The
following equations define the geometric product for unit length vectors {a, b} with the
42
a b = −ba = aib + a ∧ b geometric product is inner (dot) plus outer (wedge) products (4.3)
aib = cosθ inner product scalar is maximal when unit vectors a and b are collinear (4.4)
a ∧ b = i sin θ outer product bivector is max when a and b are perpendicular; i = −1 (4.5)
Likewise, once the geometric product is defined, the inner and outer products can be
rewritten as the symmetric and anti-symmetric sum (or difference) as in eqns (4.6) and (4.7).
1
ai b = b i a = (a b + b a ) symmetric sum forms the scalar inner product (4.6)
2
1
a ∧ b = −b ∧ a = (ab − ba) anti-symmetric difference forms the bivector outer product (4.7)
2
Precedence rules exist for inner, outer, and geometric products when parentheses are omitted.
Inner and outer products should always be performed before an adjacent geometric product.
Most uses of geometric (or Clifford) algebra Gn use its vector properties for expressing
where the basis vectors formally defining the space are important but not the primary
concern. The present research focuses primarily on the definition and formal properties of
discrete high-dimensional spaces generated by orthonormal (i.e. unit length and mutually
perpendicular) vectors. For the basis vectors, the inner product is always zero. Under these
43
conditions, the geometric and outer products are identical (a b = a ∧ b) so the wedge
The following properties 1 exist for a plane defined by orthonormal basis vectors span{a, b}.
Due to the geometric product, this basis set can also generate the bivector a ∧ b = a b , whose
orientation is orthogonal to both vectors a and b (and equivalent to cross product in 3D).
Including the scalars {0, ±1} , this forms the geometric algebra G2 which is closed over
addition and multiplication and forms a four-dimensional finite algebra. G2 defines the
graded elements {〈 A〉 0 ,〈 A〉 1 ,〈 A〉 2 }: the scalars 〈 A〉 0 = {0, ±1} , two vectors 〈 A〉 1 = {a ,b} and
one bivector 〈 A〉 2 = {a b} . The two vectors form the odd grade set 〈 A〉 + = 〈 A〉 1 , whereas the
even grade includes the scalar and bivector elements 〈 A〉 − = 〈A 〉 0 + 〈 A〉 2 , resulting in the set
The highest-grade element in this group is called the pseudoscalar (denoted as I) and for
some grades its square is equal to –1 (see eqn 4.9). This pseudoscalar has geometric roots, is
defined for arbitrary grade Gn and for G2-3 has the properties of the unit imaginary (i 2 = –1).
1
Actually in GA a 2 = ±1 but the signature for this dissertation is Sig = (n,0)
44
The order of multiplication is significant because of GA’s anticommutative properties.
Multiplying a vector times a bivector can be performed from the left or right sides. Left
multiplication rotates a vector 90° clockwise in the bivector plane and right multiplication
(used in this paper) rotates a vector 90° counterclockwise. Due to this property, any bivector
a I = a (a b) = (a a) b = b similarly b I = b (a b) = – a b b = – a (b b) = – a (4.10)
The definitions in section 4.3.2 can be expanded for larger basis sets. For the orthonormal
basis set containing n basis vectors {a, b, c, d, …}, the same methodology applies. The n
orthonormal vectors generate the geometric algebra of Gn where the elements in the algebra
are the scalars 〈 A〉 0 , the vectors 〈 A〉1 , all unique vector product pairs of bivectors 〈 A〉 2 , all
unique vector product trios of trivectors 〈 A〉 3 , etc. until the unique n-vector pseudoscalar
〈 A〉 n is reached. For any Gn the pseudoscalar I is always of grade n. The sum of any
45
combination of the n-vectors A = 〈 A〉 0 + 〈 A〉 1 + ... + 〈 A〉 n is a valid member of Gn and is
identified as a multivector.
The geometric product of a vector with a higher grade n- vector works for Gn , as illustrated
using a vector a, a bivector B and arbitrary grade n-vectors Aj and Bk, but a general product
a ∧ B is a 3-vector a ∧ Bk = aB k k+1
A j ∧ B k = A j Bk j+k
product is reserved for smallest and largest grade elements. For arbitrary bivectors A and B,
1
the expression A ∧ B = ( AB − BA ) is the commutator because it vanishes if A and B
2
commute.
trivectors. Reversion does not affect scalars, vectors, or 4-vectors, which means they are self-
46
4.3.4 Number of Elements in a Geometric Algebra
The total number of unique graded elements in any Gn is N = 2n . The number of elements of
each grade can be quickly found by using Pascal’s triangle shown in Figure 4.4 because each
row n is a binomial expansion that sums to N. Each entry is the sum of the two numbers
above it C(n, m) = C(n–1, m–1) + C(n–1, m) in the triangle, and also represents the number
of unique ways for n tokens taken m at a time n . Since the sum is a power of 2 (and
m
n
n
Row = n Col = m 1 + ∑ = N = 2n
m =1 m
0 1 =1
1 1 1 =2
2 1 2 1 =4
3 1 3 3 1 =8
4 1 4 6 4 1 = 16
5 1 5 10 10 5 1 = 32
6 1 6 15 20 15 6 1 = 64
For a vector space of size n the first slanted column (left side of triangle) represents the
scalars 〈 A〉 0 . The second column is the number of vectors in set 〈 A〉1 (in bold and =n),
followed by the number of bivectors in set 〈 A〉 2 , etc for each 〈 A〉 m until the pseudoscalar
exponentially. This very large state space will be shown to be identical to the linear state
47
space requirements for quantum mechanics and matches the Boolean decode developed in
Quaternions were invented by William Hamilton to solve the problem of arbitrary rotations
vector convention of bold font to distinguish from the Pauli matrices introduced later).
The set of n-vectors generated from the basis of E 3 forms the geometric algebra G 3 . The
odd-grade elements G 3− = {σ1, σ2 , σ3 , σ1 σ2 σ3} consist of the original three 1-vectors and the
trivector (or pseudoscalar I ) while the scalar and three bivectors (or spinors) constitute the
The elements of G 3+ define a linear space of four dimensions that is a finite algebra closed
under multiplication and addition. This subset is called the even subalgebra of G 3 . In G 3
and G 3+ a bivector times a bivector always returns either another bivector or a value of –1.
Alternatively, the bivectors can be written as a product of the pseudoscalar and a vector
the GA work presented here, is that by convention, every vector and expression in GA would
be placed in a standard sort order by applying the right hand rule uniformly, resulting in the
48
opposite sign for term j' = − j = σ1σ3 and consequently ij' = − k, j'k = − i and ik = j . That
quaternions are equivalent to the even subalgebra of G 3 is why four dimensions are required
The last topic regarding the even subalgebra is the choice of bivectors as the primary basis
for E 3 . In a three-dimensional space E 3 , the three basis vectors {x, y, z} also define three
orthogonal planes. Each one of the bivectors defining these planes has an orientation that
points into the unit box and is the mathematical basis of Gibbs’s vector cross product (only
works in three dimensions and see [16] for details). These bivectors geometrically constitute
a dual for each basis vector (x ~ y z, y ~ –x z, and z ~ x y) as shown in Figure 4.5. This is
xy
yz
x
-xz
49
Another more pragmatic reason for choosing bivectors over vectors deals with the
The choice of a bivector basis allows the writing of terms in geometric product expressions
in any order without needing to keep track of the inversions, which is very useful during
blind algebraic substitutions. Substitutions must be used exceedingly cautiously because, for
example, equation 4.12 only works if the dimensions do not intersect or aiB = 0 .
Many of the examples illustrated so far describe the algebraic details of computing the
geometric product. The algebraic rules for computing the inner product are not much more
difficult, but the literature descriptions seem complex and confusing. The only cases
introduced so far is the inner product of two orthonormal vectors G 2 = span{a, b}, such that
aib = 0 means orthogonal and aia = b ib = 1 means self collinear and of unit length. The
next paragraphs describe the other cases of inner products between n-vectors, assuming the
The definition of the inner product x iY for vector x and bivector Y = (y ∧ z ) is:
x iY = Y i x = x i(y ∧ z ) = (x iy ) ∧ z − (x iz ) ∧ y (4.13)
50
where x, y, and z are place holder variables for actual vector names. Notice that for G 2 only
with either x = a or x = b . This means only one of the terms of the sum is non-zero since
either aia = 1 and aib = 0 or bia = 0 and bib = 1 . Knowing this important inner product
simplification for orthonormal vectors is very useful as the grade of the n-vector increases.
w iZ = Z iw = w i(x ∧ Y ) = ( w i x) ∧ Y − x ∧ ( w iY ) (4.14)
where w, x, y, and z are again place holder variables for actual vector names. This result
depends recursively on the previous bivector inner product so the substitutions can continue.
w iZ = ( w i x) ∧ Y − x ∧ ((w iy ) ∧ z − (w iz) ∧ y ))
(4.15)
= (w ix) ∧ y ∧ z − (w iy ) ∧ x ∧ z + ( w iz) ∧ x ∧ y
This result has a very specific pattern (minus sign is due to moving the chosen vector to the
beginning of the n-vector) where the initial vector w forms a dot product with each vector in
the n-vector, but only one dot product will be non- zero. Again by using actual vectors for
G 3 = span{a, b, c} only three vectors exist, so with x = a, y = b, and z = c then the result is:
with either w=a, w=b, or w=c. This again means only one term in the sum will be non-zero
and the same procedure can be applied to an n-vector Z of any grade. The literature always
writes this expansion as a large sum, but for orthogonal vectors, only one term where
( w i x) = 1 will remain, which occurs if and only if w = x . If vector w is not one of the
51
The next step shows how to compute the inner product of an m-vector, say X = ( v ∧ w ) , and
an n-vector say Y = ( x ∧ y ∧ z ) where v, w, x, y, and z are vector place holders and m < n.
This result simply reduces the grade of Y for each common dimension from the right end of
X (while dealing with signs from anticommutative swaps in Y), else is XiY = 0 for vectors
in X not found in Y. The only remaining step is to illustrate how to compute the inner
product of two multivectors. Given n- vectors W, X, Y, and Z the inner (and outer) produc t
( W + X ) i(Y + Z) = ( Wi Y) + (W i Z) + ( X i Y) + (X iZ )
(4.18)
( W + X ) ∧ (Y + Z) = ( W ∧ Y ) + ( W ∧ Z) + ( X ∧ Y ) + ( X ∧ Z)
When the inner products are zero (means orthogonal), then the outer product is equivalent to
the geometric product, and thus raises the grade of all product pairs. Note, the definitions in
the section apply only when all the vectors are orthonormal, but always applies for qubits!!
The best way to form a concrete understanding for the inner and outer products is to give
some specific examples. Table 4.2 shows all combinations for multivectors X and Y for
In Table 4.2 the inner and outer product are never both zero. The geometric product is simply
the sum of the corresponding cell from both inner and outer product tables. The same
operators are populated for G 3 as shown in Table 4.3. Notice the G 3 cases where the inner
and outer product are both zero and geometric product is not because A B ≠ Ai B + A ∧ B .
52
Table 4.2: Comparison of outer and inner products for G 2
Y Y
X ∧Y X iY
+1 a b ab +1 a b ab
+1 +1 a b ab +1 0 0 0 0
a a 0 ab 0 a 0 +1 0 b
X X
b b –a b 0 0 b 0 0 +1 –a
ab ab 0 0 0 ab 0 b –a –1
Y
X ∧Y
+1 a b c ab ac bc abc
+1 +1 a b c ab ac bc abc
a a 0 ab ac 0 0 abc 0
b b –a b 0 bc 0 –a b c 0 0
c c –a c –b c 0 abc 0 0 0
X
ab ab 0 0 abc 0 01 01 0
ac ac 0 –a b c 0 01 0 01 0
bc bc abc 0 0 01 01 0 0
a bc abc 0 0 0 0 0 0 0
Y
X iY
+1 a b c ab ac bc abc
+1 0 0 0 0 0 0 0 0
a 0 +1 0 0 b c 0 bc
b 0 0 +1 0 –a 0 c –a c
c 0 0 0 +1 0 –a –b ab
X
ab 0 b –a 0 –1 0 0 –c
ac 0 c 0 –a 0 –1 0 b
bc 0 0 c –b 0 0 –1 –a
a bc 0 bc –a c ab –c b –a +1
Please remember these results are only valid for orthonormal vector sets. Also all of the
results quoted in the dissertation depend on the geometric product properties, but do no t
always stipulate if the result is due to inner product or outer product features. So in general
1
A B ≠ Ai B + A ∧ B when A is not a vector because ( ab)(bc) = ac yet (ab)i (bc ) = (ab) ∧ (bc ) = 0
53
the outer or inner product will only be specifically called out when required, otherwise one
can assume the geometric product is being used by equations and tools.
Using the GA framework so far established, this section develops how to express all of the
complete. The result has an unusual XOR- like symmetry for both multiplication and
addition. Subsequently, several tools are developed to automate the anticommutative and
The approach for implementing Boolean logic in geometric algebra requires the mapping of
binary values to scalars in the algebra. Using Manthey’s conventions, the only scalar values
available are the discrete value set 〈 A〉 0 = {–1, 0, +1}. Table 4.4 shows the usual
multiplication and addition tables for all the combinations of two input vectors for these
values. To maintain the group closure properties, the addition table is implemented as
modulo 3, in that {–1, 0, +1} is isomorphic to {0, 1, 2}, but this will prove to have no effect
on the results presented in this work. The highlighted cells are the non- zero input conditions.
+ 0 1 –1 * 0 1 –1
0 0 1 –1 0 0 0 0
1 1 –1 0 1 0 1 –1
–1 –1 0 1 –1 0 –1 1
54
Manthey has previously shown that “0” has the special meaning of “cannot occur.” This
insight (which will be supported later) is that a “0” as an input will neither occur nor have an
effect. Therefore, the value “0” will be excluded as a possible input value and the two
Boolean logic values {True, False} will be mapped to the symmetric values {+1, –1}
respectively. This mapping can be simplified and displayed as the binary set {+, –} by
removing the redundant integer 1. Table 4.5 contains the results rewritten using only these
symmetric mapping conventions, plus short descriptive phrases for each behavior. Notice the
off-diagonal symmetry for both the multiplication and addition logic tables. Due to this
symmetry, vector division is the same as multiplication, or a/b = a b, just as addition and
subtraction are identical for the Galois Fields GF(2). Subtraction is discussed in more detail
+ + – * + –
+ – 0 + + –
– 0 + – – +
If same then invert If same then +
If different then cancel If different then –
Assuming two input vectors 〈 A〉 1 = {a, b}, the multiplication (*) table is equivalent to the
logic XNOR (or even parity) operation and the addition (+) table is a combination of NAND
and NOR logic. Table 4.6 illustrates the logic reasoning for these operations, suggesting this
mapping is universal because it includes the equivalent primitives of logic NOT, logic OR,
55
and logic AND. This means it should be possible to map all logic operators into arithmetic
later.
Based on this initial reasoning, several automatic tools were created to demonstrate that GA
can express any logic operation; these tools are described in the following subsections. The
final result of the derivation is summarized in Table 4.7. Even though the inputs are restricted
to {+, –}, GA is still three-valued, so an output can be either +, –, or 0. The main convention
will be to assign the value “+” to the logic value “True.” With those conventions, the middle
column expresses the conventional mapping of assigning the value “–” to “False.”
Alternatively, the right column maps the “Non-True” = “False” value to “0” and later this
will be shown to be very useful when additive ly combining individual decode states.
56
The only immediately obvious expressions in Table 4.7 are those for NOT and XOR, yet the
other expressions have a form similar to those using XOR-based Galois Fields. The complex
and unintuitive GA logic mapping is best handled by the tools and methodology described in
Section 4.4.2. Once this framework is in place, the summary results shown in Table 4.7 are
easily comprehendible.
4.4.2 GA Evaluator
The sneak preview of the results presented in Section 4.4.1 is unintuitive due to the XOR- like
behaviors, and compounded by the anticommutative properties of GA. Therefore, a 400- line
Perl program (called ga.pl) was written and works for Sun’s UNIX and the Linux systems.
This utility assumes that all vectors are orthonormal and simplifies expressions containing
vector sums (or the product-of-sums) into a standardized sum-of-products format. This final
expression can be displayed, or alternatively a table is produced for all combinations of {+,–}
over the input vector set. This evaluation table gives a bird’s eye view of the equations and
the values they produce. Sample outputs from ga.pl are shown in Figure 4.6 while Appendix
B contains the complete source code with user documentation. The ga.pl tool was invaluable
The examples shown in Figure 4.6 validate the tool implementatio n of GA multiplication and
addition tables, which are very nearly opposite to the Galois Field logic mappings for GF(2).
The key to understanding these tables is to realize that the vertical bars ( | ) separate the table
into three major columns containing: (1) the input enumerations, (2) the input, simplified to
sum-of-products, and (3) the final sum’s output respectively. Extra spaces were manually
inserted for these examples only to align the product columns under the appropriate product
57
term. All terms in equations and products are sorted into an alphanumeric order. Any sorting
order works as long as it is applied consistently and corresponds to a handedness for the
coordinate system. Products in expressions are listed in order from lowest to highest grade.
ga.pl zeros "a + b" ç zeros flag prints all table rows
Input equation is a + b ç a plus b
INPUTS a b | + a + b | OUTPUT ç output = sum of a and b
****************************************************************
ROW 00: - - | - - | +
ROW 01: - + | - + | 0
ROW 02: + - | + - | 0
ROW 03: + + | + + | -
****************************************************************
Row counts for outputs of ZERO=2, PLUS=1, MINUS=1 for TOTAL=4 rows.
58
ga.pl "(b0 + b1)(a0 + a1)" ç product of sums (no table)
Input equation is (b0 + b1)(a0 + a1)
- a0 b0 - a0 b1 - a1 b0 - a1 b1 ç standardized form and order imposed
Figure 4.7: Example Products and Table Controls for ga.pl Tool
Another major facility is the ability to accept products-of-sums and expand them to the sum-
of-products under the GA’s anticommutative and simplification rules. These examples are
shown in Figure 4.7. All products require parentheses and internal spaces within products to
ensure correct parsing. Toggling the sign due to each swap while sorting vectors inside
products is naturally accomplished using an instrumented bubble sort. When adjacent vector
names match, they are simplified out of the product since a2 = 1. The spinor product (a +
results. Command line arguments control whether: (1) only the equation result is returned (no
parameter), (2) the full table is displayed (“zero”), or (3) zero-valued output rows are
excluded (“table”). The feature for suppressing zero-valued rows in the printout will be very
useful later since the number of zero-valued states is a large percentage of the overall states.
59
4.4.3 Universal Logic Decode in GA
The unintuitive XOR- like nature of the GA truth tables makes it difficult to design a specific
develop a method of defining GA logic expressions with specific output values for specified
table rows, which will be used by the table generation tool described in the Section 4.4.4. .
Input equation is a + b + a b
INPUTS: a b | + a + b + a b | OUTPUT
****************************************************************
ROW 00: - - | - - + | -
ROW 01: - + | - + - | -
ROW 02: + - | + - - | -
ROW 03: + + | + + + | 0 ç AND-like DECODE of ROW “++”
****************************************************************
Row counts for outputs of ZERO=1, PLUS=0, MINUS=3 for TOTAL=4 rows.
In Galois Fields, the logic inclusive OR equation is “a + b + a b.” Entering this equation into
the table evaluator tool produced the result shown in Figure 4.8. The result is meaningful
because the indicated row is that specified by logic AND. Next, the result is converted to
standard logic AND by adding “+1” to the output values to produce the result in Figure 4.9.
This expression specifies “True” for one row out of four when both inputs are “True”, thus
selecting or “decoding” row 310 (base ten) (or row 112 in base two). Notice that the table row
numbers from the ga.pl tool are always printed in base ten.
60
By multiplying by “–1” the output is inverted, producing the logic NAND operator, because
False = “–” is returned for the output only on row 3. This result is displayed in Figure 4.10.
Further experiments using the ga.pl tool revealed the logic OR and logic NOR expressions
shown in Figure 4.11. Notice the similarity of the algebraic form ( ±a ±b ± a b ) for these
logic expressions (logic AND, logic NAND, logic OR, and logic NOR).
INPUTS: a b | + a + b - a b | OUTPUT
****************************************************************
ROW 00: - - | - - - | 0 *NOTE: mod 3 sums to 0
ROW 01: - + | - + + | + ç DECODES LOGIC “OR” ROWS
ROW 02: + - | + - + | + ç DECODES LOGIC “OR” ROWS
ROW 03: + + | + + - | + ç DECODES LOGIC “OR” ROWS
****************************************************************
INPUTS: a b | - a - b + a b | OUTPUT
****************************************************************
ROW 00: - - | + + + | 0 *NOTE: mod 3 sums to 0
ROW 01: - + | + - - | - ç DECODES LOGIC “NOR” ROWS
ROW 02: + - | - + - | - ç DECODES LOGIC “NOR” ROWS
ROW 03: + + | - - + | - ç DECODES LOGIC “NOR” ROWS
****************************************************************
These results are novel and all expressions in the summary of logic operations for G2 = span
{a, b} in Table 4.8 have a similar form that is indicative of the XOR-like symmetry first seen
in the Galois Field expressions in Section 3.5. The similarity of the algebraic form between
61
logic AND/NAND and logic OR/NOR has its roots in information theoretic principles
because both equations subdivide the four overall states into one preferred or “decoded” state
with three other remaining states (or vice versa). This symmetry indicates the logic mapping
is not AND-dominant (as in Galois Fields) and supports the original assertion that the “add”
operator symmetrically contains both NAND- like and NOR- like logic properties.
Taking a similar approach for three vectors, G3 = span {a, b, c} produces the logic AND
result in Figure 4.12. To individually select a single row, every unique element of every rank
in the group must be included. An in-depth review of the row output choices {+, –, 0} will
62
ga.pl zero "(a + b + c + a b + a c + b c + a b c)"
Input expression is (+ a + b + c + a b + a c + b c + a b c)
INPUTS: a b c | + a + b + c + a b + a c + b c + a b c | OUTPUT
******************************************************************
ROW 00: - - - | - - - + + + - | -
ROW 01: - - + | - - + + - - + | -
ROW 02: - + - | - + - - + - + | -
ROW 03: - + + | - + + - - + - | -
******************************************************************
ROW 04: + - - | + - - - - + + | -
ROW 05: + - + | + - + - + - - | -
ROW 06: + + - | + + - + - - - | -
ROW 07: + + + | + + + + + + + | + ç DECODES LOGIC “AND”
******************************************************************
Row counts for outputs of ZERO=0, PLUS=1, MINUS=7 for TOTAL=8 rows.
If the traditional Boolean values {True, False} are mapped to {+, –}, then the table represents
the three-input logic AND behavior. As Figure 4.13 illustrates, when +1 is added to any
equation producing only values {+, –}, then the mappings change to {–, 0} with
corresponding gate inversion (ANDèNAND). The point is that the choice of mappings for
{True, False} is arbitrary yet self-consistent and the choice depends on the context where the
equation is to be used.
63
Following the same process used for the two- input operators, Table 4.9 summarizes the
equations for the three-input logic expressions using {+, –} values, followed in the next line
with {+, 0} version. The invert gates (not shown) are an inversion of each primary equation.
Further investigation into vector spaces Gn , where n ∈ {4-10} also produced AND/NAND
expressions analogous to the forms found for the 2-3 input vector cases. Expressions for all
the combinations of a small vector set were initially entered manually and validated using the
ga.pl tool. This combination set can be generated for vectors {a, b, c, …} by expanding the
expression (-1)n (1 + a)(1 + b)(1 + c) … which creates the sum of all terms, with appropriate
signs. Since the number of unique terms grows as N=2n , it was clear that creating a tool to
automate the generation all the combinations of a vector set would be useful!
The “GA And Generator” Tool (called gandg.pl) produces the logic AND expression for a
list of input vectors as an expansion of (-1)n (1 + a)(1 + b)(1 + c). For an even number of
input vectors, the signs are all “+” and, when n is odd, the signs are all “–.” Using UNIX
pipes to route the output from gandg.pl (see Appendix C) into the ga.pl tool produces the
64
results in Figure 4.14. The results constitute a proof-by-example of the AND-expressions for
all vector sets up through ten inputs. Only the summary line is shown for the large vector sets
and even though not shown, they all successfully selected (or decoded) only the last row.
Notice in Figure 4.14 that, since the intermediate product results have all the same sign, it is
possible to construct a proof for creating the AND gate for any number of vectors as follows.
For n orthonormal vectors in Gn , the AND operator decodes to the numerically sorted last
row (0 thru N–1 = 2n –1) of the evaluation table, when all the input values are True = “+” and
all the other rows produce a zero output. The reason for choosing the {+, 0} mapping for
{True, False} will be clear in Section 4.4.4 when various decoded rows are added together.
gandg.pl "a,b,c,d" | ga.pl table ç pipe into ga.pl showing non-zero rows
INPUTS: a b c d | + 1 + a + b + c + d + a b + a c + … + a b c d | OUTPUT
*************************************************************************
ROW 15: + + + + | + + + + + + + + + + + + + + + + | +
*************************************************************************
Row counts for outputs of ZERO=15, PLUS=1, MINUS=0 for TOTAL=16 rows.
gandg.pl "a,b,c,d,e" | ga.pl table ç gandg.pl inverts all signs when n=odd
INPUTS: a b c d e | - 1 - a - b - c - d - e - a b - … - a b c d e | OUTPUT
**************************************************************************
ROW 31: + + + + + | - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | +
**************************************************************************
Row counts for outputs of ZERO=31, PLUS=1, MINUS=0 for TOTAL=32 rows.
Figure 4.14: Validation of logic AND for up to ten vectors using {+, 0}
65
Since the AND operator selects 1 out of N states, this maximum selectivity requires the
maximum number of distinguishing terms, which is the complete binomial expansion for all
combinations of the input vector set of every rank (as defined by Pascal’s Triangle). Since
N=2n has only even factors, N is therefore not divisible by 3, which means that the modulo 3
sum of N signs (all + or all –) will always give a non-zero result (i.e. N mod 3 ≠ 0). With
similar reasoning, if N is divisible by 4 ( G even where n is even), then all +s always add to
“+.” Likewise if N is not divisible by 4 ( G odd when n is odd) all –s always add to “+.”
Therefore, “+” will always be the value output for the last decoded row when all the products
The last comment for this proof explains why every n-product for the last row is either all “+”
or all “–.” The GA product operation is equivalent to XNOR, which produces a “+” when
two inputs are the same. When last row (N-1) is decoded (all input vectors have value “+”),
then every product of every rank must produce a “+.” Therefore, only the sign in front of
each product determines the final sign of that product term. It is therefore evident that logic
AND can be expressed in this way for any number of input vectors, based on the algorithm
used by the gandg.pl tool, which creates the complete combination set and assigns “+” and
“–” signs correctly to all terms respectively for Geven and Godd . It is also evident that the
n
AND decode equation for the last row of grade n has the form ( −1) n ∑ A i , which is
i =0
equivalent to the fully expanded product of (–1)n (1 + a)(1 + b)(1 + c) … for every vector.
Likewise, selecting row zero can always be expressed as (–1)n (1 – a)(1 – b)(1 – c)… etc.
66
Extending this reasoning, any row can be selectively obtained by inverting the input vector in
every product term equivalent to the binary “0”s in the row number (base two) as Figure 4.15
demonstrates. The selected row always has the same sign for every product of the final sum
and represents a rotation of the hypercube based on the orientation of vector-row reference
frame. Inverting an entire equation for any row inverts the final output to produce a “–.”
Therefore any specific row Rk can be selected using the equations (–1)n (1 ± a)(1 ± b)…,
where the signs select the row number. This row-decode technique (and the gandg.pl tool)
will used in the Section 4.4.4 to enable the construction of GA expressions for arbitrarily
complex logic tables. The table output from ga.pl tool can itself be compactly represented as
a vector, where each row output Rk is the value in the vector [R0 , R1 , R2 , R3, …] and this vector
The final step in creating equations that define arbitrary logic expressions is to prove that
each row Rk = (–1)n (1 ± a)(1 ± b)… is linearly independent of the other rows due to the
choice of having the undecoded rows sum to zero. Therefore adding (or subtracting) any
number of rows will combine linearly to produce the final expression. The row decode
process discussed in Section 4.4.3, is used in Figure 4.16 to illustrate the results of adding
and subtracting two rows. Since each row contains every product combination (though with
differing signs) the sum simply flips signs or cancels for the common n-vectors.
Input equation is (1 - a + b - a b) + (1 + a + b + a b)
INPUTS: a b | - 1 - b | OUTPUT
****************************************************************
ROW 01: - + | - - | + ç Contribution of ROW 01 (base 2)
ROW 03: + + | - - | + ç Contribution of ROW 11 (base 2)
****************************************************************
Row counts for outputs of ZERO=2, PLUS=2, MINUS=0 for TOTAL=4 rows.
Input equation is (1 - a + b - a b) + (- 1 - a - b - a b)
INPUTS: a b | + a + a b | OUTPUT
****************************************************************
ROW 01: - + | - - | + ç Contribution of ROW 01 (base 2)
ROW 03: + + | + + | - ç Contribution of ROW 11 (base 2)
****************************************************************
Row counts for outputs of ZERO=2, PLUS=1, MINUS=1 for TOTAL=4 rows.
Figure 4.16: Addition and Subtraction of ROW 1 and ROW 3 for vectors in G2
The row decoding and summation techniques are built into a GA-Generator (called gag.pl)
tool that utilizes the AND generation tool and then routes the results through the ga.pl. The
tool inputs are an orthonormal vector list followed by the row number list (including signs)
or the Rk vector notation. See Appendix D for source code of gag.pl tool.
68
The gag.pl tool automatically creates and routes individual row equations into the ga.pl
simplification tool. The summation process identifies like terms and adds them together
using modulo 3 arithmetic rules, which either adjusts the signs or causes terms to cancel
formally. This formal cancellation of opposite terms causes the resulting equation always to
gag.pl "a,b" "+0" zero ç for vectors {a, b} generate a "+" in row 0
INPUTS: a b | + 1 - a - b + a b | OUTPUT ç and print table all rows
****************************************************************
ROW 00: - - | + + + + | +
ROW 01: - + | + + - - | 0
ROW 02: + - | + - + - | 0
ROW 03: + + | + - - + | 0
****************************************************************
Row counts for outputs of ZERO=3, PLUS=1, MINUS=0 for TOTAL=4 rows.
gag.pl "a,b" "+0,3" zero ç for {a, b} generate a "+" in rows 0 and 3
INPUTS: a b | - 1 - a b | OUTPUT ç and print table with all rows
****************************************************************
ROW 00: - - | - - | + ç row decode is (1-a)(1-b)= + 1 - a - b + a b
ROW 01: - + | - + | 0
ROW 02: + - | - + | 0
ROW 03: + + | - - | + ç row decode is (1+a)(1+b)= + 1 + a + b + a b
****************************************************************
Row counts for outputs of ZERO=2, PLUS=2, MINUS=0 for TOTAL=4 rows.
There is exactly one equation in the sum-of-products format for each specific logic table
because every row equation is a unique combination of (1 ± a)(1 ± b)…, so any specific sum
will also be unique. No other formal logic simplification rules are required besides the rules
outlined here. This contrasts with traditional Boolean logic equations, which have a variety
69
4.5 GA Expression Solver Tool
The last important tool is the gasolve.pl utility that iteratively solves an equation identity by
substituting every possible operator combination into that equation and printing only those
combinations matching the outcome goal. The number of combinations grows extremely fast,
since the number of possible product terms is N=2n and varying the coefficient sign {–,0,+}
for each term is equivalent to a ternary count with 3N combinations. Therefore, G0 has three
Increasing the vector space dimensionality by one squares the number of operator
combinations that must be searched. Due to the number of operators and the execution speed,
the gasolve.pl tool can currently prove exhaustively identities up to G4 , which is the size of
two qubits. Faster implementations are possible, but such searching is not an efficient way to
explore large spaces. Nonetheless, this tool proved invaluable for discovering that solutions
exist for some unintuitive identities. See the source code for gasolve.pl in Appendix E.
The arguments to the tool are gasolve.pl “<vector list>” “<main with X>” “<goal with X>,”
where the equation combinations are substituted for the capital “X” in both the main or goal
equations. This tool’s usefulness is illustrated in Figure 4.18. The case X = 0 is skipped, so
the total count is 3N–1. The first two examples demonstrate this tool’s ability to search for the
multiplicative inverse of several multivectors. The third example illustrates that row decode
70
operators (1±a) and (1±b) have two sequential applications that are identical to two
concurrent ones. The last example shows that multiple applications of specific operators for
X * X = X ∧ X = X are the same as one, which are known as the idempotent operators.
because all Boolean projection operators Pk are idempotent [35]. Idempotent operators also
have a unique square root that must be their inverse, which is similar to the property ±12 =+1.
71
The idempotent properties are inherent in the row decode equations R0-3 = (–1)2 (1±a)(1±b)
because, as will be shown, all their factors (–1 ∓ a) and (–1 ∓ b) are also idempotent.
The eight combinations of Pk = (–1±a±b±a b) in the third example in Figure 4.18 cannot be
derived using the four combinations of the standard product order –(1±a)(1±b). The other
four combinations come from the reversed product order combinations –(1±b)(1±a). This
order swapping converts to the complement of the decoded row and switches from the
linearly independent row mapping of {+, 0} to the traditional Boolean logic mapping {+, –}.
Table 4.10: Product terms (1±a)(1±b) and (1±b)(1±a) show phase combinations for G2
Standard Product Order R0-3 = (1±a)(1±b) Reverse Product Order R4-7 = (1±b)(1±a)
Input expression is (1 - a)(1 - b) Input expression is (1 - b)(1 - a)
INPUTS: a b | + 1 - a - b + a b | OUT INPUTS: a b | + 1 - a - b - a b | OUT
************************************* *************************************
ROW 00: - - | + + + + | + ROW 00: - - | + + + - | -
ROW 01: - + | + + - - | 0 ROW 01: - + | + + - + | -
ROW 02: + - | + - + - | 0 ROW 02: + - | + - + + | -
ROW 03: + + | + - - + | 0 ROW 03: + + | + - - - | +
************************************* *************************************
Input expression is (1 - a)(1 + b) Input expression is (1 + b)(1 - a)
INPUTS: a b | + 1 - a + b - a b | OUT INPUTS: a b | + 1 - a + b + a b | OUT
************************************* *************************************
ROW 00: - - | + + - - | 0 ROW 00: - - | + + - + | -
ROW 01: - + | + + + + | + ROW 01: - + | + + + - | -
ROW 02: + - | + - - + | 0 ROW 02: + - | + - - - | +
ROW 03: + + | + - + - | 0 ROW 03: + + | + - + + | -
************************************* *************************************
Input expression is (1 + a)(1 - b) Input expression is (1 - b)(1 + a)
INPUTS: a b | + 1 + a - b - a b | OUT INPUTS: a b | + 1 + a - b + a b | OUT
************************************* *************************************
ROW 00: - - | + - + - | 0 ROW 00: - - | + - + + | -
ROW 01: - + | + - - + | 0 ROW 01: - + | + - - - | +
ROW 02: + - | + + + + | + ROW 02: + - | + + + - | -
ROW 03: + + | + + - - | 0 ROW 03: + + | + + - + | -
************************************* *************************************
Input expression is (1 + a)(1 + b) Input expression is (1 + b)(1 + a)
INPUTS: a b | + 1 + a + b + a b | OUT INPUTS: a b | + 1 + a + b - a b | OUT
*************************************** *************************************
ROW 00: - - | + - - + | 0 ROW 00: - - | + - - - | +
ROW 01: - + | + - + - | 0 ROW 01: - + | + - + + | -
ROW 02: + - | + + - - | 0 ROW 02: + - | + + - + | -
ROW 03: + + | + + + + | + ROW 03: + + | + + + - | -
************************************* *************************************
72
The relationships for the row decode operators Rk shown in Table 4.10 were only discovered
using the gasolve.pl tool. Many other operator relationships have been discovered and such
proof when n is small. The idempotent operators are important because they will later relate
the row decode states Rk to the eigenvectors and projection operators for the system.
Cartesian distance is the traditional metric for the distance between two points in a space.
This distance definition relies on the scalar coefficient differences for N=2n n-vectors. The
first step in comparing two points is simply taking the coefficient difference between each
matching n-vector dimension using the differences in Table 4.11. The max difference is ±1
because the only scalars are {–1, 0, +1}. Identical scalars produce a zero difference.
b
Difference
a–b –1 0 +1
–1 0 –1 +1
a 0 +1 0 –1
+1 –1 +1 0
The most effective way to visualize the alignment of matching dimension coefficients is first
to introduce a ternary number labeling notation for Gn expressions in the standardized sort
order. The convention adopted here for full Gn equations is to place the least significant
grade to the left and the most significant to the right (i.e. c0 1+ c1 a + c2 b + c3 a b). Represent
73
only the scalar coefficients ci ∈ {–, 0, +} for each term as an ordered set of ternary- valued
numbers {c 3 c2 c1 c0}, with the least significant value on the right and higher significance to
the left. This compact set notation aligns the coefficients for matching dimensions and
removes redundant dimension labeling information not required for distance computation.
and c1 = +1; and +1 + a = {+ +} where c0 = +1 and c1 = +1. Also shown in the extreme right
column of Table 4.12 are the corresponding table vector notation [R0 R1 ], which is a dual
representation for the algebraic set notation of {c1 c0 } for any Gn . Don’t get confused!
The Cartesian distance between any two multivectors is now computed as simply the square
N −1
∑ ( diff ( c ))
2
root of the sums of the coefficient differences squared: i . The square nullifies
i= 0
all sign differences because ( ±1) = +1 , so the Cartesian distance is simply the square root of
2
74
the number of differing coefficient terms. The maximum distance in Gn is n + 1 , for any
equation without zero-valued coefficients ( ci ≠ 0) , and its complement. The additive inverse
represents the maximum distance for any expression containing the same terms. Distances
less than the maximum can be thought of as a phase difference. The set labeling shorthand
for algebraic expressions and the dual table vector notation are used in many later examples.
Idempotent operators for G2 were first mentioned in Section 4.5 and are identified as the
projection operators Pk where Pk = –Rk. Idempotent operators are important for making
decode operator and vice versa. It is also well known that idempotent projection operators are
mathematically related to eigenvectors and eigenvalues [35]. This section will identify these
relationships for geometric algebra and also introduce the underlying topological meaning.
Each projection operator Pk in GA represents the logic-NAND of every input vector in some
specific state, and thereby functions as a logic decoding operator. Therefore, they are also
equivalent to the computational basis states (see more in Section 5.5). An important question
is how to find the orthogonal basis states in GA that correspond to the eigenvectors for those
projectors? Chris Doran [9] states in a discussion about the geometric algebra equivalent of
orthonormal Pauli matrices, that the following properties must be true for an orthonormal
frame of eigenvectors {e k } using G2 = span{a0, a1} . First, the eigenvectors must square to
unity ( e k ) = 1 , which are easily found using the gasolve.pl tool in Figure 4.19.
2
75
gasolve.pl "a0,a1" "(X)(X)" "(1)"
Found Match for X = - 1 in (X)(X) = + 1
Found Match for X = + 1 in (X)(X) = + 1
Found Match for X = - a0 in (X)(X) = + 1
Found Match for X = + a0 in (X)(X) = + 1
Found Match for X = - a1 in (X)(X) = + 1
Found Match for X = + a1 in (X)(X) = + 1
Found Match for X = - a0 - a1 - a0 a1 in (X)(X) = + 1
Found Match for X = + a0 - a1 - a0 a1 in (X)(X) = + 1
Found Match for X = - a0 + a1 - a0 a1 in (X)(X) = + 1
Found Match for X = + a0 + a1 - a0 a1 in (X)(X) = + 1
Found Match for X = - a0 - a1 + a0 a1 in (X)(X) = + 1
Found Match for X = + a0 - a1 + a0 a1 in (X)(X) = + 1
Found Match for X = - a0 + a1 + a0 a1 in (X)(X) = + 1
Found Match for X = + a0 + a1 + a0 a1 in (X)(X) = + 1
Attempted 80 with 14 found
are e k (1 + e k ) = (1 + ek ) , which are found using gasolve.pl tool in Figure 4.20. Notice that the
76
This result in Figure 4.20 is consistent with Figure 4.19 because the eigenvectors e k =
(±a0±a1±a0 a1) are actually multivectors Ek, where Rk = (+1 + Ek) = (+1±a0±a1±a0 a1) and
Figure 4.21: Major diagonals form eigenvectors E0-3 on left and duals E7-4 on right for G2
Now that the eigenmultivectors Ek = (±a0±a1±a0 a1) have been identified in multiple ways,
the following geometric interpretation provides the topological meaning. In Figure 4.21, the
Ek = (±a0±a1±a0 a1) are the four major cube diagonals (pointing to the eight corners)
formed by all sums of the elements {a0, a1, a0 a1}. Four of these solutions match the “–”
decode equations of P0–3 = – (1 + Ek) = (–1)(1±a0)(1±a1) and represent the projection matrix
matching “+” row decodes Rk = (1 + Ek) = –Pk = (1±a0)(1±a1) are R0 = [+000], R1 = [0+00],
R2 = [00+0], and R3 = [000+]. The partial completeness properties are demonstrated by the
77
remaining four eigenvectors are the major diagonals pointing to the opposite corners and
and R4 = [+ + + –], which can all be written as linear combinations of the more primitive P0-3
P0 + P1 + P2 + P3 + P4 + P5 + P6 + P7 = +1 and R0 + R1 + R2 + R3 + R4 + R5 + R6 + R7 = –1.
[7]. These results are summarized in Table 4.13 using the row-decode vector notation.
These two primary and dual basis sets (identified by corners) form dual non-overlapping
tetrahedrons overlaid inside the 3D cube, where the dual(Pk) = P7-k and the dual( Rk) = R7-k.
The tetrahedrons shown in Figure 4.22 are geometrically interesting because they represent
four equally spaced points, which define six equal- length lines formed by pairs of diagonals
on the opposite six faces of the cube. As will be shown geometrically, the row-decode Rk and
projection operators Pk represent oriented planes which form the four unique sides of the two
78
Figure 4.22: Sides of dual tetrahedrons form P0-3 on left and duals P7-4 on right for G2
The primary tetrahedron related to P0-3 contains the corner (– a0 – a1 – a0 a1). The dual
tetrahedron related to P7-4 is formed by the major axis pointing to the opposite corners and
contains the corner (+ a0 + a1 + a0 a1). See Table 4.14 for a summary of the geometric
elements with Cartesian length 2 for sides between any two tetrahedron corners.
Table 4.14: Eigenvectors EK are major axes that form Dual Tetrahedrons in G2
79
The equations for the major axes represent an oriented line with Cartesian distance 3
passing thru the [0000] center, pointing toward ( → ) the corner and pointing away from the
complement of that corner. Likewise, the diagonals for each side represent a line length of
2 pointing at ( → ) the same corners. Although line orientations are arbitrary, Figure 4.22
uses three line segments pointing away from corner 1 while the other three lines are joined
head-to-tail- to-head to form a plane whose right-hand orientation points toward corner 1.
The side multivectors in Table 4.14 are multiplied in pairs to form bivectors or oriented
planes, which represent the projection and row-decode operators. The remaining
comb inations produce five duplicates of P0-3 and R0-3 and twelve additional combinations are
variations of P7-4 and R7-4 . Other vector orientations define the same planes but for different
combinations and orientations of vectors. Multiplying the sides in opposite order effectively
inverts the orientation of the sides which is equivalent to taking the orientation of the same
side in the dual tetrahedron. This can be succinctly expressed as: if Rk = (Side1)(Side2), then
the order R7-k = (Side2)(Side1) and likewise, if Pk = (Side1)(Side2), then P7-k = (Side2)(Side1),
where Side2 and Side1 are multivectors. These relationships are illustrated in the Table 4.15.
80
So, geometrically, the row-decode and projection operators represent oriented planes which
form the four sides of the two tetrahedrons, each of which possesses two orientations. These
planes are oriented at 45° angles off the three separate axes, because the tetrahedron sides are
The multivector eigenvectors Ek require additional comment. Even though all the other
properties appear to be true for the Ek eigenvectors, due to the topology of the tetrahedrons, it
is clear that the Ek are only pair wise E0 i E3 = E1i E2 = 0 orthogonal (see axis shading in
Figure 4.21). The four major diagonals of a cube cannot be orthogonal to each other because
a cube is spanned by only three axes. Additionally, these diagonals are perpendicular to the
tetrahedron sides, which intersect at an angle less than 90° to form the tetrahedron. So even
though the overall size of the space is N = 4, the eigenvectors only occupy a space of N–1 =
3. By computing the inner product between all pairs of projection operators we find
Pj i Pk ≠ 0 except for P0 i P3 = P1 iP2 = 0 . Also the three main axes of the cube are not
Another interesting point is that the eigenvectors Ek are effectively out-of-phase notch filters
where the projection and row-decode operators match each notch. This is related to the
and implies that the eigenvectors form the Fourier basis, as well as the computational basis.
Given eigenvectors Ek and projectors Pk, then any symmetric operator S can be written as
the sum S = ∑ λk Pk , where λk ∈{−,0, +} are the eigenvalues of the eigenvector Ek. As can
k
81
already be seen, this is the form for any expression in G2 denoted as [ −λ0 −λ1 −λ2 −λ3 ]
Using the row-decode vector notation and standard sort order to illustrate the spectral
properties of Ek in G2 , the left- most vector acts like a low frequency pattern and each vector
Eigenvectors and eigenvalues were explored here because they are related to quantum
measurement, the Boolean decode of row states, and may be required to design arbitrary
operators for Gn . This analysis also appears to be relevant for larger Gn because the row-
decode primitives Rk are all product combinations of small idempotent operators. This
det(X)=0, then the expression X is defined as singular and the multiplicative inverse 1/X is
undefined because computing 1/X uses the determinant in the denominator (i.e. 1/det(X)) as a
volume scaling factor. Using the gasolve.pl tool for vector x, several cases of the form X =
(±1±x) have been discovered where 1/X is not defined, which implies det(±1±x) must be 0.
82
Another fact that will be shown later is that none of the operators Pk and Rk have defined
multiplicative inverses, which mathematically means their determinants must also be zero. In
general for Gn , det(Pj)det(Pk) = det(Pj Pk), which means det(Pj Pk) = 0 if the determinant of
any of its factors is zero. So even without defining how to analytically compute the
determinant, this implies that the Pk and Rk for all larger spaces must also have det(Pj Pk) = 0
Conversely, the non-singular cases are defined for det(X) ≠ 0, which means that X −1 = 1 X
exists and the operator is reversible. Since the only scalar values defined for Gn are {–1, 0,
+1}, all non-singular multivectors X are unitary because they have the property det( X ) = 1
(Exercise 6.5.2 on page 309 in [7]). This property of unitary operators is actually derived
shown that all non-singular expressions in Gn are unitary even though the operators X * and
X T have not been defined. These operators are namely unnecessary in Gn because the
complex conjugate is related to complex numbers and the transpose is defined only for
matrices. Unitary operators are Hermitian if they have the property X = ( X * ) T , which is true
The singular cases were found by searching with gasolve.pl, but it is also possible to compute
83
matrix (i x j) with entries α ij = ai i b j which is equivalent to the inner product expression
det( α ij ) = det( ai ib j ) = (a n ∧ ... ∧ a1 )i(b1 ∧ ... ∧ b n ) . This expression can be expanded out into
the equivalent Laplace expansion of the inner product, but this has the same computational
The foregoing analysis results are both novel and quite remarkable. With the help of some
custom tools, it has been shown that any Gn=2 can represent any Boolean logic as linear
expressions using only addition and multiplication. The symmetric three-valued choice of {–,
0, +} allows a separate undefined state, independent of the two Boolean logic values, which
is semantically similar to the undriven state from tristate logic. The extra “0” state enables
the linear independence of decode states and is illustrated in the Karnaugh map in Table 4.16.
Table 4.16: Linear Independence of Decode States in Karnaugh Map for G2 = span{a, b}
–b +b
row decode 002 = A– – = row decode 012 = A– + =
–a
(1 – a)(1 – b) = [+000] (1 – a)(1 + b) = [0+00]
row decode 102 = A+ – = row decode 112 = A+ + =
+a
(1 + a)(1 – b) = [00+0] (1 + a)(1 + b) = [000+]
In traditional Karnaugh maps where values {+, –} are assigned to {1, 0}, the logic inclusive
OR combines terms in a linearly independent fashion, which is evident when engineers use
“+” to denote logic OR. Likewise, when using states {–, 0, +}, with the meaning of state “0”
84
being “cannot occur,” individual row/states of a decode table are similarly linearly
independent, but the AND decode expression (–1)2 (1±a)(1±b) for each cell is more complex
The ability to express reversible logic operators in a finite linear space using addition and
multiplication operators does not come for free. In a vector space Gn , when n is large, the
total number of elements required for maximum selectivity (a single row) grows as N=2n and
the number of operator combinations grows as 3N. Even though these (N-n-1) linearly
independent higher-rank dimensions exist separately from the n input vectors, they are all
would disrupt any consistency. These ideas are synonymous with the idealized simultaneity
principles of co-occurrence and with the concept of quantum- gravity-as-entropy from black
linear space unless embedded into a higher dimensional space. With the above reasoning,
building classical computers with GA-based logic is not practical because of the large circuit
resources implied. Fortunately, such expanded linear spaces are exactly what are required for
85
CHAPTER 5
Much of the research in geometric algebra entails mapping known mathematical properties
into its domain; the same approach is taken here. A qubit state is traditionally defined in a
Hilbert space as the sum of two complex numbers (H2 ) represented in Dirac’s ket notation
represents a four-dimensiona l, real- valued space. The best-explored two- level quantum
system is the spin-½ particle that contains the two basis states: spin-up (using the notation
contains two bit states that can occur simultaneously (denoted as orthonormal basis vectors
{a0, a1} generating G2 ). That is, a concrete computational bit is now viewed as potentially
having simultaneously values of both logic states “0” and “1.” Co-occurrence and G2
principles dictate this can be expressed very simply as the sum of the two independent state
vectors of G 2− .
86
This deceptively simple expression is extremely meaningful. It is evident, for example, that a
vector set in G2 generates (or spans) a linear space with dimension N = 22 = 4 and contains
the elements {±1, a0, a1, a0 a1}. The size of this space exactly matches the number of
dimensions in H2 . As Figure 5.1 shows, the next step explores the meaning of the sign in
The result segregates the outputs into two groups where either (1) both states have the same
value or (2) both states are opposite. To study the situation with only one state ON at a time
(where one state is + and other is –), Figure 5.2 shows the state difference (+ a0 – a1). Notice
how both phases can be expressed as a pair wise difference P0 − P3 and P1 − P2 , but
remember from end of section 4.7 that these sets are pair wise orthogonal: P0 i P3 = P1 iP2 = 0 .
87
Using the co-occurrence interpretation, Figure 5.1 and Figure 5.2 suggest that two separate
modes exist, each excluding the other’s valid states. Using the {True, False} → {+, –}
mapping, then +a0 means “state a0 is ON” and –a0 means “state a0 is NOT ON.” Therefore,
we will use the anti-symmetric sum (state difference or opposite signs) to represent the two
classical states, and the symmetric sum (both same sign) to represent the superposition states
from quantum mechanics. Table 5.1 summarizes this interpretation of these bimodal results,
and these two modes are generally called the two phases of the qubit. Notice how addition is
The topological meaning of the multivectors in the 4D space will be explored in Section 5.5.
Both algebras use values {–1, 0, +1} but with slightly different interpretations. The GA
qubits with real- valued GA vectors, than the complex- valued Hilbert space coefficients using
88
5.2 Pseudoscalar is Spinor Operator
The states G 2− = {a0, a1} define both a plane and the pseudoscalar SA = (a0 a1), which acts
like a spinor on that plane. The spinor works independently on each vector in a sum and
Table 5.2 summarizes the right-handed application of the spinor on every vector and qubit
state. The primary conclusion from Table 5.2 is that the spinor action switches between the
classical and superposition phases. This action is identical to the quantum Hadamard gate.
Start Phase Qubit State Each times spinor Final State Final Phase
+ a0 – a1 +a0 (a0 a1) = +a1 + a0 + a1
Classical Superposed
– a0 + a1 –a0 (a0 a1) = –a1 – a0 – a1
+ a0 + a1 +a1 (a0 a1) = –a0 – a0 + a1
Superposed Classical
– a0 – a1 –a1 (a0 a1) = +a0 + a0 – a1
The Hadamard transform is a crucial gate in quantum computing because it is used to convert
a known classical state (usually 0 ) into a superposition state. This is often the first step in a
quantum computation. The best way to visualize how the Hadamard (or spinor) transform
affects the qubit states is to place the states on a plane diagram such as the one shown in
Figure 5.3. Since the right- handed spinor rotates any state counter-clockwise by 90°, it also
rotates any sum of states by that amount. A spinor rotation moves a qubit state by 90° to the
next counter-clockwise corner of the plane, thereby alternately swapping between classical
and superposition phases. The two ellipses indicate the 180° rotation produced by inversion.
89
Figure 5.3: Illustration of Qubit States for 90° and 180° Rotations
inversion and reinforces the reason why the pseudoscalar I is equivalent to the unit imaginary
( )
2
SA = i = − 1 = NOT [8], since SA SA = −1 = –1. The spinor is identical to the
Hadamard transform in G 2− because the representation contains all the grade-1 vectors A 1
while the pseudoscalar is grade-2 A 2 , so their product always returns a grade-1 result:
The three Pauli spin matrices {σ1 ,σ 2 ,σ 3 } are traditionally important in any treatment of
quantum mechanics because, for H 2 , every 2X2 Hermitian matrix (containing only off-
diagonal elements) can be expressed as a linear combination of the Pauli spin matrices and
the unit matrix us ing the following matrix equation (not in GA). The matrix equations (5.2)
90
a b 1 1 1 1
b* = ( a + d )1 + (b + b* )σ 1 + i( b −b* )σ 2 + (a − d )σ 3
d 2 2 2 2
(5.2)
Where 1 = 1 0 , σ 1 = 0 1 , σ 2 = 0 −i , σ 3 = 1
0
0 1 1 0 i 0 0 −1
operator and can be expanded as Pauli matrices. Likewise, any possible unitary evolution in
a quantum state due to noise can also be characterized using Pauli matrices [7].
The inspiration to use the interpretive labels for the various kinds of noise was the key to
mapping the Pauli matrices into GA as follows. The three kinds of noise: bit flip, phase flip,
and simultaneously both bit and phase flips, are illustrated wit h examples in the three cases
1) Bit flip error: σ 1 causes the overall states to flip flop, which is the action of inversion.
The GA inversion operator has the same meaning as σ 1 (also used in control- not gate in H2 )
2) Phase flip error: σ 3 causes a single state (a1) to flip sign, which is the action of a spinor.
91
3) Both bit and phase flip error: σ 2 includes both bit and phase flip errors simultaneously,
which is the co-occurrence of the preceeding two operators. The shared cases are
This result is unexpected because the sum of + a0 and – a0 cancels, producing only a single
vector, instead of the expected complicated state as found in H2 . The meaning of this result
is addressed in the next section, on alternative basis sets. We can nevertheless conclude with
the strong and positive result that the GA representation of a single qubit contains equivalent
Up to this point in the discussion, the qubit representation uses the so-called standard basis
states, written as the sum of vectors of G 2− . Mathematically speaking, basis vectors are hard
to grasp unless they are embedded in a geometric context. Simply stated, basis vectors define
an intrinsic orientation or reference frame from which the internal states may be observed
In H2 , the default standard basis of spin- up 0 and spin-down 1 get their names because
using the right hand rule, then the direction the thumb points (up or down) determines the
label. Using the Hadamard Transform, the standard basis states can be reoriented
92
( H 0 = 0 ' and H 1 = 1' ) into the dual basis (also Hadamard or Fourier basis) shown
in equation (5.6) and vice versa ( H 0 ' = 0 and H 1' = 1 see Figure 5.4). The H2
standard and dual bases are identical to the classical and superposition definitions in our
qubit representation.
1 1
0 ' =1 2 0 + 1 = 1 2 , 1' = 1 2 0 − 1 = 1 2 (5.6)
1 −1
Using this approach in our GA qubit representation, the classical states could be labeled left-
diagonal and the superposition states labeled right-diagonal, which are equivale nt to the
standard and dual bases respectively (cf. Figure 5.4). However, there are three different
versions of the Hadamard transform for the various bases in H2 , but not for GA. A circular
which are simply defined for GA in Table 5.3 using the even grade plane (±1±a0 a1).
Relying on the geometric roots of G2 , it is easy to comprehend all of these bases for a qubit.
This understanding becomes apparent when a qubit state (only odd grade terms G 2− ) is
multiplied by (–1 + a0 a1) containing only even grade terms G 2+ . Table 5.3 examines all the
possibilities of grade changes due to various operators of the same grade, which thus defines
the basis states. A meaningful label for each basis is provided in the top row of the table.
The key to this table is that the odd grade vectors G 2− = {a0, a1} define a plane and also
implicitly define the even grade plane G 2+ = {±1, a0 a1}. In G 2− , the vertical/horizontal or
Pauli bases are on-axis while the left-diagonal basis (standard) and right-diagonal basis
93
(dual) define the 45° off-axis encodings. Likewise in G 2+ , the direct basis forms the on-axis
encoding, while the 45° off-axis is the circular basis. The direct basis result is either an
invariant (constant ±1) or a spinor which seems similar to an actual measurement but is
reversible and this will be used later in the Toffoli gate derivation. Any basis is equivalent to
any other, since any choice is reversible to the starting basis by multiplying by the
rotating thru all four states, reveals that an even grade spinor always acts as a Hadamard
transform. Even grade inversion also works for any Gn , therefore the Pauli spin operators all
function as before. Making a real measurement depends on what basis state the system is in,
which means a given state is defined inside a particular basis. Mixed grade bases (such as
+a0 + a0 a1) are NOT viable basis choices because the states are NOT reversible since they
contain a singular factor 1+a1. Also, the trine basis operators of the form X = (1±a?±a0 a1)
are solutions to the equality (X)3 = 1 so are 120° apart and are invertible because X –1 = X 2 .
94
As the discussion of the product of multiple qubits will reveal, the choice of (± a0 ± a1) as
the representation of qubits was fortunate, but also one might argue, in favor of it as the
obvious approach in GA. Note that the Vertical/Horizontal basis encoding is also shown as a
way of encoding both noise states (i.e. a0 and a1 in Eq (5.5) using the Pauli spin operator.
Figure 5.4: On-axis and Off-axis Bases for G 2− on left and G 2+ on right
Now we will shift gears and discuss the result of using the irreversible projection operators
Pk, which define the computational basis. The standard and computational bases are identical
but XOR- like in G2 . The corresponding AND-like decode of states in G2 is identical to the
row-decode formulas, and represent linearly independent states of the smallest topological
features. Table 5.4 shows all the computational basis transformations starting from the
standard and dual states. If the multiplicative order of the operators is swapped, then the dual
of this table is created where all stand-alone terms of ( ±1 ± a1) are replaced with ( ±1 ± a0 ) .
95
Table 5.4: Computational Basis Measurement (A)(1 ± a0)(1 ± a1) for G2
A– = – a0 – a1 – a0 (– 1 + a1) a0 (+ 1 + a1) + 1 + a1 = I − – 1 + a1 = I +
Several new ideas are introduced in the Table 5.4 that are important for computational basis
measurement s or transformations for any Gn . The primary idea is that the results I ±
in the
table represent a class of sparse invariant operators where the invariant identity state I +
=
(–1 ± a1) contains only state values {+, 0} and the invariant inversion state (+1 ± a1) = I −
contains only state values {–, 0} as shown in the Table 5.5. The A Rk results represent the
answers, where the qubit state is changed to the end state, which is a many-to-one mapping.
96
For any grade m- vector X, all multivector states of the form (±1 ±X) = I ±
are invariant
because the addition operator with ±1 selects the matching values. These single qubit
invariant states are identical to properties of the invariant s found for the Bell and magic
operators for two qubits. Table 5.5 also shows how the sum of the two phases equals either
The next idea is that the products (1 ± a0)(1 ± a1) are non-reversible because they introduce
a loss of state information due to the many-to-one mapping. Because the Rk are singular the
qubit is forced to the corresponding end state. Also, the odd grade operators are not
commutative, so applying them causes a phase change; a1 (1 + a0)(1 + a1)=(1 – a0)(1 + a1).
Additionally no multiplicative inverse exists for (1 ± a0) or (1 ± a1) which is verified with
gasolve.pl tool, so the previous state cannot be restored using an invertible operator.
No operators exist to undo any of the products of the computational basis Rk. Searching for
other operators produce the same result. So although (A+ )(1 + a0)(1 + a1) = (–1 – a1) is
always true, a solution X does not exist for either (–1 – a1)(X) = A+ or (X)(–1 – a1) = A+.
97
The computational basis operators perform an irreversible measurement, because they
destroy qubit information due to the many-to-one mapping, but also seen as breaking the co-
As a result, even though the answer mapping is one-to-one, it is irreversible because the lost
phase information is irrecoverable. Once the measurement has been made, then the initial
Table 5.6 gives two examples of the broken phase symmetry. This same scenario appears in
the Bell operator for two qubits, where the loss of information is also exactly a phase change.
A qutrit state is traditionally defined in a Hilbert space as the sum of three complex numbers
98
represents eight dimensions (due to Hermitian generators of SU(3)) and represents spin-1
Just as for the qubit, the analogous mapping for qutrit A is the co-occurrence of three vectors
scalar dimension A 0 = {±1,0}, three vectors A 1 = {a0, a1, a2}, three bivectors A 2 =
{a0 a1, a0 a2, a1 a2}, and one pseudoscalar A 3 = I = {a0 a1 a2}. Qutrits are not
It is possible to define the states of an arbitrary d-dimensional Hilbert system Hd using the
corresponding 1-vector d-set in geometric algebra with N=2d equivalent real dimensions. The
name for such an Hd system is a “qudit.” The primary way of building a large qudit quantum
system is however to use quantum registers containing d qubits rather than one d-qudit.
A qubit defines a spinor that is identical to the rigid right-handed spinning top in
Figure 5.5. The two 1-vectors define the plane of rotation and the orthogonal pseudoscalar
defines the axis of rotation, thus forming a 3D structure. The n-vectors are all orthonormal so
99
Figure 5.5: Spinor in Spin-down, spin- up, and superposition states (from IBM)
dilation in a plane defined by some bivector {e 1 e2 }. The general rotation of a vector “a”
through an angle θ (in radians) to a new vector a ' is achieved by the dual-sided product:
where R is called a rotor, defined as the sum of a scalar and a bivector using the equations:
where the reverse R% and scalars {α , β } are dependent on ½ the angle θ . This overall angle
θ is derived from two half-angle reflections in the plane. The formula requires think ing
about rotations taking place in a plane rather than around an axis, and works for any grade
between sine, cosine, and exponential, if a unit bivector B̂ is defined by equation (5.11)
Bˆ = e1 ∧ e 2 sin(θ ) , so Bˆ 2 = −1 , (5.11)
then the rotor components can alternatively be expressed as the familiar exponentials:
ˆ 2) and R% = exp( Bθ
R = exp( − Bθ ˆ 2) (5.12)
100
The sum of a scalar and scaled bivector represents a generalized rotor (equivalent to an angle
and a bivector plane). It is well known from qubit measurement theory that even though a
qubit has three non-scalar dimensions (with n=2 for N=2n -1) with many possible states, only
one classical bit of information can be extracted per qubit. The internal phase causes the
other states to be ind istinguishable from each other as was demonstrated by the alternate
basis sets earlier in this chapter, where only one basis set can be active per qubit (which
The two classical bit-states are topologically equivalent to a particular qubit state, and its
inversion, for any choice of basis. All quantum gates reversibly move states around the state
space by using arbitrary-phase rotors to align the qubit top inside the three-dimensional
Euclidean space E3 defined by orthogonal spatial dimensions {x, y, z}. Phase gates in
quantum computing are namely nothing but rotors for arbitrary angles. The quantum
computing approach is to align the basis (the axis of the top) along some spatial axis, leaving
the remaining phase angles as the computational resource. A Hadamard gate is simply a
single sided spinor with a preset angle of θ = 90°, and can also be expressed as a generalized
double-sided rotor. Measurement is simply the choice of selecting the “computational basis”
and applying it as an irreversible operator Rk, which returns the answer as a sparse invariant
or random ±1 value. This is not to be confused with the reversible “direct basis ”, which re-
encodes the qubit a constant ±1 or spinor. For example, A1 A0 = +1 and A1 A1 = –1, but A1 A+
= SA, yet are reversible. Also see Table 7.5 for many example s of reversible basis transforms.
This concludes the chapter on single qubit. Quantum registers will be discussed next.
101
CHAPTER 6
Quantum registers enable the combining of q qubits to form larger Hilbert spaces, defined by
2 2 2 2
states are {002 , 012 , 102 , 112 } and the unitarity constraint α 00 + α 01 + α 10 + α 11 = 1 .
For a general quantum register containing q qubits with basis B = { i | i ∈ 0 ≤ i < 2 q} and
2q −1 2 q −1
Compared to the complexity of the above definitions, the equivalent G 2q definition simply
assumes several multivector qubits {A, B, C, …}, each containing the respective orthonormal
vector states {a0,a1}, {b0,b1}, {c0,c1}, etc. All the q qubit co-occurrences interact using the
geometric product. This notation formally defines the quantum geometric algebra Qq =G2q .
102
For a quantum register Q2 with q = 2 qubits, this product of sums definition produces a
corresponding sum of products expansion, which is identical to the tensor product definition.
The initial qubit representation as a multivector A = (± a0 ± a1) is fortuitous because the goal
of generating the tensor product ⊗ operator to expand the linear space for quantum
registers Qq is automatically achieved using the geometric (or outer) product. By choosing
geometric product A B naturally and obviously replaces the tensor product operator
ψ = ψ A ⊗ ψ B . All qubits in this example are in the “+” superposition state and the GA
103
Any quantum register in Qq defines a product A B C … of the q 2-co-occurrences {A, B, C,
…}. When this product is expanded into the sum of products, each product combines one
state from each qubit to form a total of 2q q-vectors. These q- vectors are semantically
identical to the 2q basis vectors in H 2q in that they represent the binary enumerations of all
the unique vector products. The grade-2q vector for Qq is the pseudoscalar. The grade-q
vectors always represent the unique middle column in even rows of Pascal’s triangle since 2q
is always even. Any quantum register Qq contains n = 2q orthogonal vectors and N = 22q =
4q possible states. As Figure 6.2 and Figure 6.3 illustrate, the last line of each table output
104
ga.pl table "(a0 + a1)(b1 + b0)(c0 + c1)(d0 + d1)(e0 + e1)" ç 5 qubits
Input expression is (a0 + a1)(b1 + b0)(c0 + c1)(d0 + d1)(e0 + e1)
INPUTS: a0 a1 b0 b1 c0 c1 d0 d1 e0 e1 | + a0 b0 c0 d0 e0 + <SNIP> |OUTPUT
****************************************************************
ROW 0000: - - - - - - - - - - | - ... 30 ... - | +
<SNIP>
ROW 1023: + + + + + + + + + + | + ... 30 ... + | -
****************************************************************
Row counts for outs of ZERO=992, PLUS=16, MINUS=16 for TOTAL=1024 rows.
ga.pl table "(a0 + a1)(b1 + b0)(c0 + c1)(d0 + d1)(e0 + e1)(f0 + f1)"ç6 qubits
*****************************************************************
ROW 0000: - - - - - - - - - - - - | + + ... 60 ... + + | +
<SNIP>
ROW 4095: + + + + + + + + + + + + | + + ... 60 ... + + | +
*****************************************************************
Row counts for outs of ZERO=4032,PLUS=32, MINUS=32 for TOTAL=4096 rows.
If the qubit state for each pair {a0,a1} etc. is analyzed in Figure 6.2 and Figure 6.3, the only
decoded non- zero states are the superposition states {A+, A– , B+, B– }. This is easy to
comprehend because the two zero-valued states per qubit (from compact left-side product of
sums format) should persist in the corresponding right-side expanded sum of product
equation format. For any row states in a multivector where A = 0, then it always follows that
A B C = 0. Therefore, this zero-valued state propagation must persist for any quantum
register Qq .
The number of null states for Qq grows as 4q –2q because the overall state space grows
exponentially as N = 22q = 4q while the number of non- zero states grows slower as 2q . After
only 16 qubits, the valid states are less than 0.01% of the overall state space. Figure 6.4 and
the discussion that follows provide the intuition and proof for how such a large number of
zero-valued states can persist and be consistently represented in the full sum of products
format. This proof is dependent on addition cancellation properties that produce zero values.
105
6.2 Propagation of Null States
All the intermediate product terms from the previous tables produce the same sign (either all
+ or all –) for each non-zero state. These states occur whether an individual qubit is in the
classical or superposition phase, because in either phase half the states are non-zero. Using
the same reasoning used by the AND decode proof in section 4.4.3, the number of
intermediate product terms in the final sum for Q2 is 22 . This result contains only even
factors, so a zero- value output can only be produced by a GA sum from an equal number of
“+” and “–” terms because 2 qmod 3 ≠ 0 . Therefore, any zero-valued output can only be
produced by pair-wise cancellation. The visual confirmation of these states for Q2 can be
106
6.3 Pauli Spin and Cross-Qubit Singlets
All qubit interactions Qq generated using the product A B C … produce the sum of products,
where each product term is called a singlet. As demonstrated in Section 5.5, applying the
maximal Pauli spin operator PX = (–1 + x0 x1) to some qubit X = (±x0 ±x1) was equivalent
to switching from the diagonal basis to the vertical/horizontal basis. A singlet can therefore
be created simply by applying the maximal Pauli spin PX to every qubit in a quantum register
Qq followed by the application of the appropriate spinor and sign to choose ±x0 or ±x1.
Since the Pauli operators commute, applying the corresponding Pauli operator PX in any
This means that each cross-qubit entanglement singlet due to PX operator can be thought of
as qubits expressed in the alternate Pauli basis. Consequently, the sum of singlets produced
by the product A B is simply the co-occurrence of two out-of-phase qubit states, e.g. {A0 , A– }
or {A1 , A+}, which are represented in the Pauli basis as (A0 PA + A– PA) = (–a0 –a1) and (A1 PA
+ A+PA) = (a1 + a0) respectively. This dual interpretation is somewhat different from the
meaning of these basis states in H4 because the computational singlets are not generated
using the Pauli operator. This dual interpretation is useful in proofs presented later.
One additional insight about cross-qubit singlets is quite telling when two Pauli spin
expressions (–1 + x0 x1) are thought of as a combined operator PA PB. This operator
represents all possible combinations of the spinors (even grade) and always commutes:
107
6.4 Sequential and Concurrent Application of Spinor Operators
Since quantum registers are expressed as the interaction of two (or more) qubits, formed by
single qubit convention requires performing operator multiplication on the right side. This
same rule will be applied to quantum registers. For example, in equation (6.5) two qubits are
each multiplied by their respective Hadamard transform. Since bivectors always commute,
multiplication order is unimportant for spinors. Consequently all Pauli operators commute.
The product of the qubit pseudoscalars forms a grade-2q vector and hence the master
pseudoscalar I2 = (a0 a1)(b0 b1) for Q2 . Applying IQ, the overall state changes one
Hadamard operator at a time, thereby sequentially placing all the qub its into superposition:
This prompts the question: Can all the qubits be placed in superposition states simultaneously
rather than sequentially? This is possible to express if the Hadamard operators are applied
108
Figure 6.5 offers several unexpected results. First, two of the four tensor product terms {a0
b1, a0 b1} cancel due to the summation of opposite signs. Second, the only valid states (non-
zero) occur when exactly one qubit is in superposition (highlighted in yellow) and all other
qubit states are classical. This situation works for larger Qn , as validated using the ga.pl tool
for Q3 , Q4 , Q5 , Q6 and Q7 (see partial results in Figure 6.6). Based on this partial
analysis, the same symmetric result is expected to work for any Qq but no proof is outlined
The concurrent Hadamard transform is unusual because every valid state has exactly one
qubit in superposition, with all the other qubits in the classical phase. Also, the operator
doubles the starting number of non-zero row states from four to eight, creating a less
constrained system. It is interesting to note this state pattern naturally arises from
concurrency and symmetry in GA and can be expressed using just the a subset of the
109
complete tensor expansion, in which all are q-vectors of the same rank. The literature does
not succinctly identify this operator but the next sections demonstrate its relationship to the
Bell states. These superposition states are not separable and this will be discussed in detail in
The most interesting result from the above concurrent Hadamard transform applies only to
Q2, where the result (– a0 b0 + a1 b1) contains each input vector exactly once. The form of
this result (sum of two bivectors) closely matches one of the Bell states 000 + 11
0 (less the
sign), which is maximally entangled and not separable. The Bell states are the important
states that represent an “ebit” (for EPR-bit), which allows two remotely located EPR encoded
qubits to remain non- locally connected thru entanglement. Most likely a similar Bell state
exists for pairs of photons using two qutrits. This discussion of Bell states continues in
Section 6.7.
±
0
{0'0' , 00'1' , 01'0' , 01'1' } , four Bell states Φ and Ψ ± are also defined as
the Bell bases except that one of the normalizing constants change slightly to β = i 2.
This suggests that the Bell and magic states are topologically related. The remainder of this
110
section will define the Bell and magic states for Qq , the operators to enter these bases, and
The following notation will be used to facilitate the derivations used in this section. For qubit
multivectors A (and likewise for B), the individual odd grade qubit states are again denoted as
{A0 = (a0 – a1), A1 = (– a0 + a1), A+ = (+ a0 + a1), A– = (– a0 – a1)}. The related even grade
expressions are the pseudoscalar (spinor) I A = SA = (a0 a1) and the max Pauli spin term PA =
(–1 + SA) = (–1 + a0 a1). The max pseudoscalar is I2 = IA IB = SA SB. The cross-qubit spinors
{S00 = (a0 b0), S01 = (a0 b1), S10 = (a1 b0), S11 = (a1 b1)} also represent entangled bivectors
and are alternatively written as {E00 , E01 , E10 , E11 }. Using this shorthand notation, the
The four cyclic Bell state multivectors for Q2 {B0 = – S00 + S11 , B1 = S01 + S10 , B2 = S00 –
S11 , B3 = – S01 – S10 } can be defined using the recursive operator B(i+1)mod4 = B i (SA + SB).
The expanded form of these compact equations has been verified using the ga.pl tool.
The concurrent Hadamard transform converts the standard basis for A0 B0 into the Bell states
111
Hadamard operator for Q1 because an alternate phase state Ψ + is first achieved, and thence
The magic state multivectors {M0 = S01 – S10 , M1 = – S00 – S11 , M2 = – S01 + S10 , M3 =
S00 + S11 } can also be generated using the recursive operator M(i+1)mod4 =Mi (SA – SB)
starting from the initial state M0 = A0 B0 (SA – SB) but also from M0 =M3 (SA – SB).
Mathematically, the operators B = (SA + SB) and M = (SA – SB) are both a basis and phase
converter, plus a generator for four states (two states and their complements).
In order for an operator squared to produce the complement, it must represent the same
relationship is illustrated in Figure 6.7 and represents the table vector output notation of (1 –
112
This result displays the valid states for (1 – SA SB) and highlights the fact that all valid output
states possess the same “–” value. This operator equation represents I - , an invariant
inversion operator, but not a constant scalar value. Likewise, using the vector notation, its
inverted operator (–1 + SA SB) = [0++0+00+ +00+0++0] generates only eight “+” output
states and represents an invariant identity operator I + . Both invariants contain encoded
phase information due to the ir component spinors, because the opposite phase version of I ±
also exists. As previously seen, Pauli spins and all n-vectors X of the multivector form I ±
=
(±1±X) possess table outputs of the same sign for all states because the GA sum containing a
constant value of ±1 acts like a comb filter for the matching half of the product parity states.
Any state X in Q2 experiences a bimodal phase switch between two mutually exclusive sets
contains the inverted output states, thereby defining a single co-exclusion. The eight valid
state rows in Φ + have different row numbers from the eight valid row states of Ψ + , so the
bimodal operator switches between these two phase sets while using only eight non- zero
operator states.
The proof for these two phase equations for any Qq is based on the concept that a recursive
operator can evolve either (1) the system state from an initial starting state, or (2) itself since
(S A + S B ) = (1 − S AS B ) = I - so I
2 -
idempotent operator. Likewise, is its own invariant
113
multiplicative inverse operator. In other words, the invariant I -
squared produces the
unitary operator I - I - = (1 − S ASB )(1 − S AS B ) = ( −1+ S ASB ) = I + , but does not produce a
constant +1 value. These relationships are most likely true due to the fact the four- vector
validation reveals that, due to the tensor product, the intermediate phase states are simply all
the combinations of the pseudoscalars taken two at a time (all 4-vectors). This insight
starting state of multivector X because the second application of the even grade commuting
spinor to any n-vector in X cancels the first spinor while leaving a minus sign SJ SJ = –1.
Therefore for any X in Qq , the concurrent Hadamard squared produces the complement –X.
Conversely, the pseudoscalar product does not represent a Bell operator because
( S AS BS C ...) = − ( S AS B SC ...) and ( S AS BS C ...) = ( S AS B SC ...) are only true for Qq for some
3 5
grades q ∈ {1,3,4,7,8,...} . This concludes the proof that the concurrent Hadamard transform
is a recursive operator for any Qq , and can also be used as the generator for Bell states.
Table 6.1 summarizes the definitions of the Bell and magic basis states along with the other
114
written as a vector [α β µ υ ] . Table 6.1 is organized slightly differently from the usual
tables for H4 because the column numbers, represented as a 2-bit Grey code, reflect the
phase and inversion distinctions. The vector notation using spinors applies only to this table.
Table 6.1: Summary of Basis States using spinor singlets {S00 , S01 , S10 , S11 } for Q2
Basis Basis State 002 Basis State 012 Basis 112 = –002 Basis 102 = –012
Standard A0 B0 = [+ – – +] A0 B1 = [– + + –] A1 B1 = A0 B0 A1 B0 = A0 B1
Dual A– B– = [+ + + +] A– B+ = [– – – –] A+ B+ = A– B– A+ B– = A– B+
A0 B0 P= [0 0 0 +] A0 B1 P= [0 0 0 –] A1 B1 P = A0 B0 P A1 B0 P = A0 B1 P
Bell B0 = [– 0 0 +] B1 = [0 + + 0] B2 = [+ 0 0 –] B3 = [0 – – 0]
Magic M0 = [0 + – 0] M1 = [– 0 0 –] M2 = [0 – + 0] M3 = [+ 0 0 +]
+ + − −
H4 basis 00 or Φ 01 or Ψ 11 or Φ 10 or Ψ
Moreover, the standard and dual bases are co-occurrences of all singlets and produce
indistinguishable basis pairs because an inversion of either qubit produces the same overall
result. The inseparable Bell and magic states each encode a distinct co-exclusion. The Bell
and magic states are topologically similar but do not overlap because they differ by a phase
angle, which is proven in the next section. The Q2 Pauli states have isolated singlet terms
similar to the H4 standard basis. The computational basis cannot be expressed here becaus e,
115
The application of the Bell/magic operators loses phase information upon entering the
Bell/magic states, making the Bell/magic operators irreversible. This information loss strands
the Q2 system state in the entangled states. This fundamental definition of the Bell states is
related to phase loss and will be quantitatively explored in the Section 6.7.
The Bell state operator B = (SA + SB) gives an ordered cycle B0 → B1 → B2 → B3 → B0 . Another
recursive operator PA PB = (–1 + SA)(–1 + SB) generates the reverse cyclic order
discovered invariant identity operator I + . So the ring direction is reversible but the phase
loss is not. Also –PA PB produces the normal cyclic order, so is similar to B (denoted as ~).
Definition of the – S00 + S01 + S00 – S01 + S01 – S00 – S01 + S00
Bell and magic States + S11 + S10 – S11 – S10 – S10 – S11 + S10 + S11
Recursive operator A0 B0 B0 B1 B2 B3 M0 M1 M2 M3
→ → →
B = (SA + SB) B0 B1 B2 B3 B0 → 0 0 0 0
←B ←B ←B ←B
–B = (– SA – SB) B3 3 0 1 2 0 0 0 0
M = (+ SA – SB) M0 0 0 0 0 M1 → M2 → M3 → M0 →
–M = (– SA + SB) M3 0 0 0 0 ←
M3 ←
M0 ←
M1 ←
M2
–PA PB ~B –S11 B1 → B2 → B3 → B0 → =M0 =M1 =M2 =M3
←B ←B ←B ←B
PA PB ~ –B S11 3 0 1 2 M2x0 M3x1 M0x2 M1x3
(–1 – SA) PB ~ M –S01 B2x0 B3x1 B0x2 B1x3 M1 → M2 → M3 → M0 →
PA (–1 – SB) ~ –M –S10 B2x0 B3x1 B0x2 B1x3 ←
M3 ←
M0 ←
M1 ←
M2
(PA)-1 (PB)-1 ~ B S00 B1 → B2 → B3 → B0 → M2x0 M3x1 M0x2 M1x3
←B ←B ←B ←B
– (PA)-1 (PB)-1 ~ –B –S00 3 0 1 2 =M0 =M1 =M2 =M3
116
The magic state order M3 → M2 → M1 → M0 → M3 also has a reverse order recursive
operator PA (–1 – SB) whose product with the magic basis operator M = (SA – SB) forms the
rows are out of phase when compared to (–1 + SA SB). These “reverse” operators do not force
entry into the Bell or magic states. A summary of the Bell and magic operators is provided
in Table 6.2.
It is not clear from the literature how any of these recursive operators can be expressed using
the “ket” notation in H4 , nor is it immediately obvious that half of these states are in fact
complements of the others. Incidentally, taking an operator F to the nth power in Hn is the
same as the nth tensor product, which defines the tensor power operator, denoted as F ⊗n
. Of
course, these specialized tensor product and tensor power operators are not needed in Qq .
The Bell basis B0 = – S00 + S11 and magic basis M3 = S00 + S11 in Q2 are identical except
for a sign change, which suggests a phase difference. The exact form of this phase change
can be derived starting with M3 = (+ a0 b0 + a1 b1). The approach for this proof uses the
fact that for any multivector A using mod 3 addition, A + A = –A, or conversely – A – A = +A:
M3 = (a0 b0 + a1 b1)
è (– a0 b0 + a1 b1 – a0 b0)
è (– a0 b0 + a1 b1) – (a0 b0) (6.8)
è (a0 – a1)(b0 – b1)(a0 a1 + b0 b1) – (a0 b0)
è A0 B0 (SA + SB) – S00 = B0 – S00 but also M3 = B2 (S01 + S10 ) = –B0 (S01 + S10 )
117
This result reveals a co-occurrence within M i, in which a cross-qubit spinor Sij = Eij is
equivalent to a phase change (cf. Section 6.6). This derivation is confirmed in Figure 6.8
using the ga.pl tool, where the highlighted rows show the valid states with multiple
superposition phases. State transitions can therefore be expressed either as concurrent phase
This co-occurrence with a phase spinor is an important concept and will be used in section
6.8 to prove that the Bell and magic states represent an irretrievable loss of phase information
caused by the ir application. This loss of information due to applying B and M is important
because it formally shows why the Bell/magic states are entangled and inseparable.
Any basis (except the computational) can be entered and reversibly exited in Q1 because, for
every multiplicative basis operator, there exists a multiplicative inverse, thus reversing the
process and exiting the state back to the starting state. All n-vectors are their own
118
multiplicative inverse (with appropriate sign change). Unfortunately, a multiplicative inverse
does not exist for all multivectors (sums of arbitrary rank n-vectors). This lack of operator
reversibility strongly suggests that some loss of information must therefore impact the system
state. This section proves that entering any of the Bell or magic states causes a loss of phase
information, and details exactly how these irreversible recursive operators irretrievably throw
This claim will be substantiated by showing exactly what phase information is discarded by
the recursive operators and then by demonstrating that the recursive operators are irreversible
because no multiplicative inverse exists. Finally, the reason the operators discard information
will be directly related to the action of the multiplicative operator in canceling some states.
While searching for the reversibility of the Bell operator, the missing phase information was
Next apply the concurrent Hadamard or Bell operator to produce the Bell state:
So the ideal reversible solution would be the inverse operator (SA + SB)-1 such that:
Using trial and error, the closest value for (SA + SB) -1 is either (–1 + SA) or (–1 + SB):
B2 (–1 + SA) = B2 (–1 + SB) = (– S00 + S01 + S10 + S11) = (A+ B+) – S00 (6.12)
119
The result is exactly a phase difference away from a desired return state. This exact
multiplicative solution exists only if (SA + SB) -1 exists. It is suspected that 1/(SA + SB) does
not exist but an exhaustive proof confirms it in the next subsection. In addition, the known
invariant inversion operator (1 – SA SB) reverses the state iteration direction without exiting.
The Bell states would be reversibly exited if a solution existed for X = (SA + SB) -1 such that
(SA + SB)(X) = 1. The gasolve.pl tool exhaustively tested all 43,046,720 possibilities in a five-
day run for solutions to (a0 a1 + b0 b1)(X) = 1 but found none, so (SA + SB) -1 does not exist
in Q2 . This is also proved again below using the Cancellation Principle of Multiplication.
The recursive operator erases information because some operator states multiplicatively
cancel to 0 (nilpotent). This is shown using the following equations and Pauli substitutions:
Now substitute, combine pairs, and remove the common highlighted A0 B0 to produce:
Use the ga.pl tool to simplify PA PB (1 + SA SB) = (–1 – SA SB) and combine terms:
120
Earlier we found the concurrent Hadamard operator squared is (1 – SA SB) = (SA + SB)2 , so:
Now apply the Cancellation Principle of Multiplication for multivectors (p 38 in [16]), which
states: if Y X = Z X then Y = Z if and only if 1/X exists. So for X = Y = B and Z = –PA PB:
So Y = Z only if (–1 – SA SB) = 0. Since (–1 – SA SB) is always non-zero, this contradiction
means that (SA + SB)-1 does not exist. The overall equality is true because (SA+SB)(–1 –SA SB)
= 0 . So even though the equality B B = –PA PB B is true, the imputed equality B ?= –PA PB
is never true. This means two (–1 – SA SB) of the four terms from the multivector –PA PB “do
not occur” since they are multiplicatively masked by the operator B = (SA + SB). Also the
inverse of the expression –(PAPB)-1 = –(1+SA)(1+SB) exists and does not exit the Bell states
either. Table 6.3 shows the table output for the three important states.
Complete Operator –PA PB Masking Operator (SA + SB) Filtered States (–1 – SA SB)
a0 a1 b0 b1| -1 + a0 a1 + a0 a1 b0 b1| a0 a1 b0 b1|
+ b0 b1 - a0 a1 b0 b1|OUT a0 a1 + b0 b1|OUT -1 - a0 a1 b0 b1|OUT
************************* ************************* *************************
ROW 00 - - - - |- + + -|0 ROW 00: - - - - | + + | - ROW 00: - - - - | - - | +
ROW 03 - - + + |- + + -|0 ROW 03: - - + + | + + | - ROW 03: - - + + | - - | +
************************* ************************* *************************
ROW 05 - + - + |- - - -|- ROW 05: - + - + | - - | + ROW 05: - + - + | - - | +
ROW 06 - + + - |- - - -|- ROW 06: - + + - | - - | + ROW 06: - + + - | - - | +
************************* ************************* *************************
ROW 09 + - - + |- - - -|- ROW 09: + - - + | - - | + ROW 09: + - - + | - - | +
ROW 10 + - + - |- - - -|- ROW 10: + - + - | - - | + ROW 10: + - + - | - - | +
************************* ************************* *************************
ROW 12 - - - - |- + + -|0 ROW 12: + + - - | + + | - ROW 12: + + - - | - - | +
ROW 15 - - + + |- + + -|0 ROW 15: + + + + | + + | - ROW 15: + + + + | - - | +
************************* ************************* *************************
-1 + a0 a1 + b0 b1 - a0 a1 b0 b1 = (a0 a1 + b0 b1)+ (-1 - a0 a1 b0 b1)
121
Since (–1 – SA SB) is a factor of Mi, therefore Mi B = 0. Similarly the multivector (1– SA SB)
is a factor of Bi, therefore Bi M = 0, which means half the states in equation 6.13 are erased
using either the B or M operators. Also, if the system is in a Bell state, multiplying by the
magic operator B0-3 (SA – SB) = 0, or vice versa M0-3 (SA + SB) = 0, always produces zero.
Figure 6.9 Summary of Bell and magic states using Pauli basis singlets
In summary, many significant results have been uncovered for the alternate bases of Q2 . The
interpretation of co-occurrence and co-exclusion has added great insight to this process, and
the natural spinor representation in geometric algebra has allowed simple proofs of
previously unexplored topics. The Bell and magic bases are fundamentally different from the
standard and dua l bases because more distinct states are maintained in their concurrent
relationships, due to a loss of phase information to enter those states. Therefore, the Bell and
magic states are entangled and not separable because no multiplicative inverse operator exists
to exit those states. Mathematically speaking, this is equivalent to the H4 tensor product
122
definition of separability but gives more insight into the irreversible nature of the Bell and
magic states. The recursive B and M operators exclude some operator states, thus
irreversibly losing phase information compared to the unentangled standard and dual bases.
123
CHAPTER 7
The primary operators or gates that exist for a single qubit are the Hadamard, Inverter, and
Phase gates, plus their additive combinations that define the Pauli operators. These gates
have previously been defined but are summarized again in Table 7.1. In addition, basis
change operators (and their multiplicative combinations) exist, including the measurement
and computational operators. For qubit A with Q1 = span {a0, a1}, the co-occurrence is A =
(±a0 ±a1), spinor S A = (a0 a1), spinor reversion S% A = (a1 a0) = (–a0 a1), the multivector
124
A total of 81 = 34 possible multivectors exist in Q1 and they represent both operators and
states. One of those states is zero and of the 80 (even) remaining states, 40 are additive
inverses of the other 40 and have the same properties, so they are excluded. Many of the 40
operators have already been defined, but for completeness all are summarized in Table 7.2.
125
The most interesting results are the operators where no multiplicative inverse exists. Those
same states also have interesting properties for their squares, where some have the nilpotent
property X 2 = 0 ; some operators are idempotent because they have no additional effect
when applying them more than once X 2 = X = X ; while others are indistinguishable
restrict designing operators for specific purposes. Probably the most interesting are the
multivector states { A0 , A− } and their additive inverses { A1, A+ } which have the property
X 2 = −1 or ( X )( − X ) = 1 , which means the standard and dual basis states have identical
The Rk computational bases were previously shown to be linearly independent of each other
and this signifies something important from an operator perspective. Since each row decode
126
Under these conditions, all addition and n- vector multiplication operators can be simply
swaps must be dealt with separately. These vectors are equivalent to matrix diagonals (since
Using the above basis definitions, all vector operators can be simply implemented pair-wise
due to anti-commutative reordering, the vector (highlighted) must be first inverted. Table 7.4
illustrates that this symbolic algebra is equivalent to matrix operations on diagonal elements
Invert Anti- A−− A−+ A+− A++ = A−− + A−+ + A+− + A++
Example Operators
Commutative?
+1 no + [+ + + +] = +1 or identity matrix
–1 no – [+ + + +] = [– – – –] = –1
+ a0 no [– – + +]
– a0 no – [– – + +] = [+ + – –]
+ a1 no [– + – +]
– a1 no – [– + – +] = [+ – + –]
A0 = + a0 – a1 no [– – + +] + [+ – + –] = [0 + – 0]
A1 = – a0 + a1 no [+ + – –] + [– + – +] = [0 – + 0]
A+ = + a0 + a1 no [– – + +] + [– + – +] = [+ 0 0 –]
A– = – a0 – a1 no [+ + – –] + [+ – + –] = [– 0 0 +]
SA = + a0 a1 no [– – + +] gp [– + – +] = [+ – – +]
a0 SA = a1 no [– – + +] gp [+ – – +] = [– + – +]
a1 SA = – a0 INVERT [– + – +] gp (–[+ – – +]) = [+ + – –]
SA SA = – 1 INVERT [+ – – +] gp (–[+ – – +]) = [– – – –]
(1+a0)(1+a1) = no [0 0 – –] gp [0 – 0 –] = [0 0 0 +] =
=1 +a0 +a1 +a0 a1 no = +1 + [– + – +] + [– + – +] + [+ – – +]
(1+a1)(1+a0) = no (1+[– + – +])(1+[+ + – –]) = [+ – – –] =
=1 +a0 +a1 –a0 a1 INVERT = +1 + [– + – +] + [– + – +] – [+ – – +]
127
As demonstrated by the last example in Table 7.4, all multivector products must be
distributed first to guarantee the inversion happens only to the most specific n-vector.
Therefore in this vector notation, multiplication must have precedence over addition due to
some algebraic information (or can alternatively maintain the sorting order by using the
relative frequency information of input vectors), so that the matrices demonstrate the
computational basis properties. This compact table output form has been used in this
dissertation since Chapter Four and can be generated instead of a full table by choosing the
option “ga.pl vector <equation>.” Vector addition works in all spaces but gp only in Q1.
The final detail to point out about the computational bases is that there are twice as many
output values compared to Hilbert spaces for each qubit because the computational bases are
not segregated into separate sets for classical and superposition states, but they are pair wise
orthogonal R0 i R3 = R1 iR2 = 0 . Also, even though the computational bases are not reversible
operators, appropriate sums can produce invertible and reversible solutions. These bases are
simply the most primitive topological feature of the algebra and have the most precise
coverage compared to either the input vector set or n- vector product singlets. Since the
computational bases are the same as table row outputs, they could be used as an efficient
Besides the ability to place qubits into superposition, the next most important aspect of
quantum computing is to find the answer residing in the qubit state via a measurement.
Quantum measurement has traditionally been confusing and misunderstood, due in part to the
128
concurrent nature of superposition states, but also due to the unintuitive representation of
basis states using complex numbers. Since the qubit representation Q1 in geometric algebra
simplifies these concepts, the topic of measurement can be addressed more intuitively.
Measurement is confusing because the internal qubit axes are completely independent of the
orientation within our normal 3D E3 space, which is especially hard to visualize for high-
dimensional entangled spaces. The mapping process into the E3 space therefore represents a
projection (or shadow) into the lower dimensional space. For the orthogonal Q1 vectors, the
two angles {φ ,θ } for projecting state A into E3 are imposed by the major spin axis
orientation φ and a phase gate angle θ , but only when the measurement is made from an
apparatus located inside E3 and oriented using {φ ,θ } . The result of a measurement is the
answer (+1 or –1 each with some probability) plus the qubit changing to the end state due to
For simplicity sake, let’s disallow arbitrary phase and limit the qubit state to the discrete
basis previously discussed. Measurement is nothing more than asking if the qubit currently
occupies one of the two states of a particular basis. For example, when the qubit occupies
exactly either A0 or A1 and a measurement asks if the qubit “Occupies the spin- up state?”, the
answer will be either “yes” or “no” respectively, with 100% probability. Asking the basis
question assumes that the qubit basis is known so that the orientation is aligned with the
measurement apparatus orientation. This is why it is crucial to know or maintain (by design)
129
If the qubit occupies a state in another basis, then some random result will occur with exactly
a 1 2 = 50% probability. These probabilities are the ratio of the number of states of each sign
in the vector notation, which are generally 0%, 50% or 100%. Measuring a spinor state SA =
[+ – – +] will always produce a 50/50% random value. For Q1 the equivalent probability
amplitudes are simply the square root of the probability: 1 2 = ±1 2 . Introducing some
arbitrary phase angle due to phase gate operation will create other probability values.
As illustrated in Table 7.5, many state and operator products generate constants or spinors.
The important difference is these examples are all reversible so do not constitute a
measurement, even though they are useful. A measurement only occurs using a singular
operator as originally shown in Table 5.4, which produces an answer, but also side-effects
the qubit end state to change to the state matching the que stion. So for singular operator Rk =
(1±a0)(1±a1) the matching end state is ±a0±a1. The only “constant” answers are due to
±
sparse invariants I and not the constants ±1, which are really valid reversible states.
130
The four computational basis operators Pk = (–1)(1 ± a0)(1 ± a1) and the row-decode
irreversible because a multiplicative inverse does not exist for (1 ± a0) and (1 ± a1). This
reversibility and therefore not identical to the quantum definition for unitary transforms
The gate and measurement operators for systems with two or more qubits are identical to the
single qubit scenario, except that anticommutative rules must be applied to products of odd
grade multivectors. The major similarity occurs when applying an operator to the separable
standard and dual bases, a process that is identical to applying them to each of the individual
qubits and represents two distinct co-exclusions. Another major difference is that the product
of two idempotent operators from two qubits forms an expanded cyclic definition of an
states masks multiple indistinguishable pairs of states, but two classical bits’ worth of
information can still be extracted. Conversely, the entangled Bell and magic basis states
contain a loss of one bit’s worth of phase information. As a result, these basis states no
longer represent two separable co-exclusions, but rather only one entangled classical bit’s
worth of information. It is impossible to exit Bell/magic states without erasing the entangled
state, since no multiplicative inverse exists. This argument makes it clear why the answer and
the end states are distinct due to a measurement because the answer is not a valid qubit state
and Bell states can be exited by forcibly resetting the coupled states.
131
7.2.1 Control-Not Gate for Q 2
An important gate for two qubits is the conditional inversion behavior called the control-not
gate. The key to defining the operator for the control- not gate is to realize that imposing a
condition on the system state effectively reorients the state to the even grade direct basis.
The direct basis is different from taking a measurement since it is reversible. The new system
state must mathematically reflect the new imposed perspective by unconditionally applying
Remember, the control-not conditionally inverts the data qubit when the control qub it is
True. For the derivation, first start with two interacting qubits in classical states A0 B0 and
place them both in the Pauli basis A0 B0 PA PB = a1 b1. Remember that for qubit A, the Pauli
basis transforms respectively the two classical states {A1 , A0 } into ±a1 and the superposition
states {A+, A– } into ±a0. Assign the role of “control” to qubit A and the role of “data” to
qubit B. As Table 7.6 demonstrates, the CNOT behavior conditionally inverts qubit B only
for the bottom two rows of the table, where the qubit state a1 = +1. This final output equation
for the desired CNOT AB output is synthesized using the gag.pl tool or, in this case, simply by
inspection.
132
The desired operator is X such that (a1 b1)(X) = – b1 is simply the vector X = +a1, because
(a1 b1)(+a1) = – (a1 a1 b1) = – b1. The right side of Table 7.6 applies this operator to the
four possible cases where qubit A is both in the classical phase {a1 b0, a1 b1} (top two rows)
and in the superposition phase {a0 b0, a0 b1} (bottom two rows). The operator +a1
conditionally inverts qubit B state when A is classical = 1, thereby represent ing the CNOT
Multiplying state A by the odd grade vector operator (a1) converts the state to the direct basis
{±1, ±SA} which effectively orients the state from the perspective of +a1 = +1. Since this
right multiplication vector operator is of odd grade, an extra non-commutative inversion may
be implemented, which must be accounted for! When the control bit is not in a classical state,
the resulting trivector (– a0 a1 bx) encodes this fact. If the roles of the two qubits are
This analysis used the Pauli basis, but the conditionalize operator can also be converted to
work in the standard basis by inverting the Pauli basis operator (PA)-1 (a1) = (1 + SA) a1 = (a0
– a1) = A0 , which is an odd grade state A0 in the standard basis. Using the ga.pl tool to
validate all combinations of the standard and dual basis states shown in Table 7.7, the
converted operator CNOT AB = (a0 – a1) = A0 = [0 + – 0] works as expected for the control in
The right- most column of Table 7.7 shows the cases when control A is in superposition states
133
but unintuitive. Since (CNOT)2 = –1, then B and M also act like CNOT because operators
B 2 = I - and M 2 = I - also invert half of the row states for each application.
Figure 7.1: Full Matrix Decode of CNOT AB gate output for Q2 = {A, B}
134
The CNOT operator appears to have all the required properties even though the algebraic
form looks much different from the matrix format used in H4. Therefore, to frame this
control- not gate in a similar fashion to H4, it is necessary to recast the derivation using the
computational basis projectors. It helps that the solution is already in hand. Fortunately,
Table 7.7 is fully expanded in Figure 7.1 into a matrix containing the vector notation for each
Obviously this matrix possesses significant redundancy: if the key rows 5, 6, 9 and 10 (which
define the classical cases for Q2) are isolated, the result appears in Table 7.8. This same
result can also be obtained analytically by using the facts that 1/A0 = A1 and 1/B0 = B1 . For
example, the specific equation A1 B1 CNOT AB = (+1)(B0 ) can be solved for the operator
CNOT AB = B0 A0 B0 = A1 B0 B0 = A0 and the other cases are shown in Table 7.8. Notice that
the product of (+1) represents qubit A in the reversible direct basis state of (+1).
Table 7.8: Row by Row Operator Solutions for CNOT for Q2 = {A, B}
This result shows that independent of starting state, the CNOT operator is always the same
expression. The above procedure has not been formalized for arbitrary multivectors X, where
different individual starting states require different equation solutions to produce the desired
135
result. The complex conjuga te operator is the simplest example that cannot be written as an
An inversion operator is always a 180° phase shift and a Hadamard gate is half that phase
amount. Since the control- not gate exists, perhaps a control- Hadamard gate also exists whose
square is the control- not operator. The gasolve.pl tool immediately found two operator co-
occurrences: CHADAB = (–1 + A0 ) and inverse (1 + A1 ) (see Figure 7.2) whose squares are (–1
+ A0 )2 = A0 = CNOT AB and the 4th power is the inverter (–1 + A0 )4 = A02 = –1.
operators appear to concurrently change to the direct basis and perform an inversion as seen
in Figure 7.2.
These relationships suggest the CNOT operator has a 90° phase relationship to the
unconditional inverter, and the control- Hadamard gate a 45° phase relationship. A similar
45° relationship exists between the Pauli spin and the Hadamard operators because (±PA) 2 =
SA and (±PA) 4 = (SA) 2 = –1. This helps explains why the Pauli spin rotates the diagonal bases
136
by 45° from the off-diagonal to vertical/horizontal axis. The CHAD also exists for B and M
has at least eight other square roots, each of which contains a scalar, five bivectors, and a 4-
The entangled Bell or magic basis Bi or Mi can be utilized as operator states equivalent to
the direct basis. Since every Bell and magic state has the state pair complements in the same
basis, selecting the right basis should produce the equivalent of the direct basis in Q1. If the
otherwise the outcome results in concurrent spinor expression (±SA ± SB), which when
137
7.2.3 Two qubit measurement
Measurement for the separable standard and dual bases are the same as for individual qubits,
which assumes known basis for each qubit. Measurement works the same with Rk operators.
Just as for one qubit, an individual row can be selected for Q2 by taking each separate qubit
operator RA0 = (1 – a0)(1 – a1) =[+000] and RB0 = (1 – b0)(1 – b1) =[+000] and forming their
geometric product RA0 RB0 = RAB0 = (1 – a0)(1 – a1)(1 – b0)(1 – b1) = [+0000000 00000000].
Likewise, the various projection operators Pk are formed by the relationship Pk = – Rk and are
irreversible. Since all terms of form (1 ± x) have no multiplicative inverse, this means that
det(1 ± x) = 0. This also means that, for any Qq, since det(X)det(Y) = det(XY) = 0 then also
The scaling of Pk and Rk for any number of qubits works the same as for one qubit, except
that the product of individual idempotent operators (–1) RAk RBk = PABk does not produce a
larger idempotent term PABk because of non-commutativity. For example, the projector
equation PAB0 = (–1)(1 – a0)(1 – a1)(1 – b0)(1 – b1) = [–0000000 00000000] but that
expression squared PAB0 PAB0 = [–0+0+0+0 00000000] ≠ PAB0 but instead (PAB0 )4 =[–0000000
00000000]. Likewise, for RABC0 = (RABC0 )6 = [+0000000 0…0 0…0 0…0 0…0 0…0 0…0
00000000] and RABCD0 = (RABCD0 )8 = [+0000000 00000000 and thirty more of 00000000].
The conclusion of this result is that geometric products of idempotent operators produce new
cyclic operators that have idempotent- like properties that return back to themselves when
(X)n = X, except with a higher power where n = 2q, instead of always n = 2. This is related to
138
the fact that the overall size of the space grows exponentially larger, resulting in more
degrees of internal freedom. Also depending on the size of n, notice that sometimes (±1)2 =
+1 and other times (±1)2 = –1. This proposed expanded cyclic definition of idempotency is
interesting because these products still maintain the other important properties of logic AND
into large spaces, are still idempotent even though their values are effectively spread
throughout the space due to the effect of don’t cares for other unused inputs.
The problem with the projection operators Pk not being exactly idempotent is that the
corresponding Ek are not exactly eigenvectors for Q2. Many other solutions were found
while using gasolve.pl to look for eigenvectors Ek where (Ek)2 = 1. Even though the Pk = –Rk
00000000]. Due to larger phase space, it is easy to show (Ek)6 = +1. Also the Rk produce
valid measurement answers even for Bell states. For example, A0 B0 B = B0 = R1 –R2 +R4 –R7
–R8 +R11 –R13 +R14 . Measuring valid states in B0 produce invariant answers B0 R1 = R7 + R13
and B0 R2 = P4 + P14 , but invalid states produce random answers B0 R0 =P6 + R12 .
139
7.3 Three-Qubit Operators
All operators for separable states for one and two qubits apply as well to three or more
qubits. The four phase derivatives of the concurrent Hadamard operator for three spinors
form the equivalent of the Bell and magic basis (SA ± SB ± SC) plus two additional sets.
Additionally, the Fredkin and Toffoli gates (from Section 3.4) can finally be attempted, using
the same design procedure developed for the control- not gate.
The same procedure used to define the control- not gate was applied to the Toffoli gate. The
3. Invert the last two bits to create the desired end state
4. Solve for the operator to transition from the start state to the end state:
140
****************************************************************
ROW 00: - - | - - + - | +
ROW 01: - + | - - - + | +
ROW 02: + - | - + + + | -
ROW 03: + + | - + - - | +
****************************************************************
Row counts for outputs of ZERO=0, PLUS=3, MINUS=1 for TOTAL=4 rows.
Unfortunately, the result produced by using this process does not appear to be correct
because the operator it found happens to be idempotent, which means multiple applications
of it produce no net effect. Translating this operator back into the standard basis still leaves
nothing more than Pauli inverse operator behavior for multiple applications. Consequently,
this design approach will not work for idempotent operators. Moreover, the search space is
too large with q=3 or n=6 to search the entire space using the gasolve.pl tool, as occurred for
two qubits.
Another approach utilized the Pauli basis to shrink the search space to the size of n = 3,
looking at only the classical cases and then searching that space for operators where X2 = +1.
Those solutions would be equivalent to eigenvectors for qutrits and possible candidates for
equation gasolve.pl "a1 b1 c1" "(X)(X)" "1" produced 92 possibilities out of 6560, many of
which had already been found for a single qubit. The only new ones include all the vector
and sign combinations of two basic forms (±a1 b1 ±a1 c1) = ±a1(±b1 ±c1) and sum of the
operators indicates they do not represent a Fredkin (or Toffoli) gates because the operator (a1
isolates the important case when b1 and c1 are different but does not conditionalize it.
141
The another attempt assumes A = (± a0 ± a1) then (A)2 = –1 and (A)-1 = –A. So the Toffoli
operator multivector T must satisfy the equation A1 B1 C1 T = (+1)(+1)C0 because both control
qubits are rotated to direct basis and the data qubit inverts, while other cases are the identity.
To solve for T for each term, left multiply both sides by 1/X1 = X0 then simplify C1 C1 = –1
If the four classical decode cases {–A1 B1 , –A1 B0 , –A0 B1 , A0 B0 } are each solved for T, then
These simultaneous solutions could be represented in matrices, but the operator must be
applied conditionally to the isolated solutions, which means that the states must be
discernible from each other. This conditional application of operators is a fo rmal problem
for implementing arbitrary logic in quantum systems, and may be related to not finding an
operator that unconditionally performs the Toffoli operation. This is another case where
conditional operators may be required to implement a particular operator and this particular
The final attempt succeeded by remembering the Toffoli operator is called the control-
control- not. The approach is to concurrently take the control- not operator from two different
control bits for register A B C then CNOT AC = A1 and CNOT BC = B0 . The co-occurrence is
TOF AB = CNOT AC + CNOT BC = –a0 + a1 + b0 – b1 and this is already looking good because
A0 B0 C0 TOF AB = a0 c0 – a0 c1 – a1 c0 + a1 c1 + b0 c0 – b0 c1 – b1 c0 + b1 c1 =
142
The states for A0 B0 C0 TOF AB are analyzed in Table 7.10 and this produces the result that for
the four states when qubits A and B are both classical, the output orientation is the same as
qubit C for control states A0 and B0 and is inversion of qubit C for control states A1 and B1 !
The Fredkin gate design (from Section 3.4) was also attempted, but a problem occurred.
goal is to swap the state of qubits B and C when qubit A has an active low value. This is
shown in Figure 7.3 as rows 0-3, but only rows 1-2 are classically detectible.
143
Figure 7.3 illustrates the problem: independent of the states of B and C, the output state
cannot distinguish between rows 01 and 02. This condition exists because the only
observable change due to this gate requires that the data qubits have opposite values and then
both are simultaneously and conditionally inverted. These two simultaneous inversions are
equivalent to multiplying the overall system state by (–1)(–1) = +1. Therefore, this results in
no net effect to the overall system state product except that the control qubit is constrained. A
Fredkin gate solution F is A0 B0 C1 F = (+1) B1 C0 , but the product of the two states is
current time no Fredkin operator has been designed using Q3 due to the unresolved problem
of general operator design or due to two outputs. This solution space is too large to search.
and their relationships to Ek = Rk –1 continue to work for Q3 but (Ek)80 = +1. For example,
The Bell/magic operators and basis have previously been shown to work for any Qq. For
three qubits, the four equivalent concurrent Hadamard operators are (a0 a1 ± b0 b1 ± c0 c1).
Recursively applying them from a starting state A0 B0 C0 produces four separate sets of
144
positive/negative co-exclusion states as seen in Figure 7.4, using the vector output mode of
the ga.pl tool. It is now becoming very clear why the vector notation was adopted early.
Each set of states acts like a single co-exclusion which represents only one classical bit for
the three entangled qubits, thereby indicating that two bits are erased. These higher order
Bell/magic states for Qq are generated using concurrent Hadamard gates just as with the two
qubit Bell/magic states. Remember these states also act as the direct basis operators.
145
7.3.5 Three-qubit measurement
The same Rk and Pk rules as two qubits apply for three or more qubits. Also (Ek)80 = +1.
The following sequence of steps is shown for using a Toffoli gate computation in Q3 . All of
the steps use an algebraic notation and have been validated using the ga.pl tool.
1. Force the qubits to a known classical states by making a measurement, thereby erasing all
3. Apply the Toffoli operator to constrain the valid states A B C0 TOF AB => P21 + R22 + R41
invariant: A B C0 TOF AB P21 => R9 + R11 + R17 + R19 + R25 + R27 + R41 + R43 => I + and
other case A B C0 TOF AB P42 => P20 + P22 + P36 + P38 + P24 + P44 + P46 + P52 + P56 =>I –.
Other projection operators return random values due to a mixture of Pk and Rk values.
The original goal of this dissertation was to include a description of quantum algorithms that
Fourier Transform (QFT) used by Shor’s algorithm. Unfortunately, the reality of the schedule
did not permit this. The basic ground work for qubits, ebits, entanglement, Fourier basis,
concurrency and measurement have however been developed, which should enable this work
146
CHAPTER 8
Many novel contributions from several different topic areas resulted from this effort. The
following accomplishments are related exclusively to geometric algebra and logic tools.
vectors in linear algebras such as Galois Field- GF(2) and geometric algebra Gn using
only the values {–1, 0 ,+1} and addition and multiplication operators. These algebraic
• Adopted and validated the interpretation of addition as concur rency (or co-
where the value of “0” is assigned the special meaning of “does not occur.”
• Demonstrated that the linear matrix operators formed by only the input state vectors
are not closed for all Boolean logic operators unless the size of the vector space is
increased to include all product combinations of the input vector set as additional
147
linearly independent degrees of freedom. This set of N=2n elements can be generated
n −1
as the sum of n orthonormal input vectors ei using ∏ (1 + e ) .
i
i= 0
• Demonstrated that the N=2n binary combinations of the input vector set for Gn
represent linearly independent states and are equivalent to the grids of a logic decode
Karnaugh map. Any particular linearly independent decode state can be expressed as
n −1
the form ∏ (−1)(1 ± e ) . Additive combinations hereof produce the final multivector
i
i =0
state. These linearly independent states represent the idempotent projectors Pk for G2
= Pk .
• Demonstrated that (Pk )-1 does not exist, which indicates that det(Pk ) = 0 even though
the exact analytical form for the determinant of a multivector was not derived.
• Demonstrated for G2 that the eigenmultivectors Ek = (±a0±a1±a0 a1) are simply the
directed major diagonals of a cube of length N − 1 which form the equally spaced
corners of dual tetrahedrons. The faces of these tetrahedrons represent the projection
∑ k
Rk = −1 . For any Gn then Rk = –Pk and Ek = Rk – 1. Showed that (Ek)2 = 1.
• Demonstrated that the total number of unique multivectors for Gn is 3N, which is the
ternary count enumerations {0, –, +} over the N=2n independent n-vector terms.
148
• Demonstrated that any state/operator S in Gn can be expressed using values λk as the
λ0
matrix diagonals λ1 written as a vector [ λ0 λ1 ... λk ] or alternatively
...
λk
eigenmultivectors.
• Demonstrated in G2 that for operators W ∈{+, gp} the following relationships hold:
can also be represented in this fashion but multiplication of multivectors must have
correctly.
• Demonstrated that geometric algebra rules and the above principles can be refined
into tools that enable the design of state and operator behaviors. The tools ga.pl,
gag.pl, gandg.pl and gasolve.pl were created and validated for this effort. The output
vectors [ R0 R1 R 2 ...] can be generated for any equation using the ga.pl tool.
The next accomplishments are related to both geometric algebra and one qubit. These results
• Demonstrated that a qubit can be expressed as the concurrent sum of two orthonormal
vectors {a0, a1} for G2 . This multivector A = ( ±a0 ± a1) represents a co-occurrence
149
and defines a quantum geometric algebra for one qubit Q1 = G2 = H2 . There are 81
possible states or operators for Q1 and they were all examined in detail.
• Demonstrated that the standard basis containing two classical states is represented as
A0/1 = ( ±a0 ∓ a1) and the dual basis with two alternate phase superposition states as
A+ /− = ( ±a0 ± a1) . The spinor SA = (a0 a1) (also Hadamard operator or pseudoscalar
IA) switches between the two mutually exclusive phases while the inversion operator
flips between states within the same phase. The spinor SA is equivalent to S A = −1
since ( S A ) = −1 , or S A = NOT .
2
• Demonstrated that the reversible basis operators for Q1 starting from the standard
basis are: the Dual basis operator SA, the Pauli basis operator (–1 + SA), the circular
basis operators a0 or a1, and the measurement operators A0/1 or A+ / − . All of the
reversible basis states map either to all even or to all odd grade planes. The non-
50/50 percent random values. Some operators also result in sparse invariant values
+
signified by I (equivalent to sparse +1) and I - (equivalent to sparse –1) such that
150
• Demonstrated that twelve non-constant idempotent operators (where X 2 = X) exist for
+
each of which has one of the other four I operators as a factor. The inverses (or
+ +
addition, the invariant inversion operators I 0 = (1±a0), I 1 = (1±a1) both have the
Other results are related to both quantum geometric algebra and two qubits Q2 .
• Demonstrated that multiple qubits can be expressed as the product of single qubits
G4 = H4. There are 43,046,721 possible states or operators for Q2 and several
important identities were found by exhaustively searching with gasolve.pl (in less
than five days). The Qn algebra may be related to Symplectic Clifford algebras.
• Demonstrated that the geometric product for Qq replaces the tensor product ⊗ of
product combinations.
( A)( − A) = 1 or A−1 = − A . For vectors where 1/x = x then with a b x = c using left
151
• Exhaustively demonstrated that the concurrent Hadamard operator (SA + SB) does not
have a multiplicative inverse, rendering it irreversible and states that can never be
exited. Recursively applying this operator generates the four Bell states B i so that the
concurrent Hadamard operator defines the Bell operator B = (SA + SB). Applying the
• Demonstrated that recursively applying the operator (SA – SB) cyclically generates the
four magic states M i so the concurrent Hadamard difference defines the magic
• Demonstrated that Bell and magic states each represent only one co-exclusion, rather
than two, due to the erasure of one bit of information. Also ( B ) 2 = I - and alternate
defined: B = B 2 + B = I − + B and M = M 2 + M = I − + M .
• Demonstrated that the Bell and magic operators erase state information due to
which means these states “cannot occur” in the result. These operators are idempotent
regarding erasure.
• Demonstrated that Bell and magic operators can act as their own measurement
operators, producing results that represent the sparse invariant constant values I ± .
• Demonstrated that the control- Hadamard operator has definition CHADAB = (–1 + A0 )
= (–1 + a0 – a1) and control- not is CNOT AB = A0 = (a0 – a1) with properties
152
(CHADAB)2 = CNOT AB and (CNOT)2 = –1. The B and M represent the control-
Hadamard operators for Bell/magic states.
• Demonstrated that the idempotent operators Pk for Q1 where (Pk)2 = Pk, when
multiplied together for Qq=2 form cyclic operators where (Pk)2q = Pk. Also showed for
Other results are related to quantum geometric algebra and three or more qubits.
in the quantum register, n is the number of orthonormal vectors, and N=2n is the size
of overall generated vector space. There are (43046721)4 = 3.4 x 1030 possible states
phase encodings equivalent to the Q2 Bell and magic states, with (q–1)2 variations
for Qq. It still must be proven that these states do not have multiplicative inverses.
• Proved that the concurrent Hadamard transform (SA + SB + SC + … + SZ) has the
property (SA + SB + SC + … + SZ)2 = I - for any number of qubits q. The only valid
states are those with a single qubit in the superposition state with all other qubit states
in classical phases.
• Showed the Toffoli operator T is equivalent to the concurrent control- not and T 2 = 1
• Was unable to design the Fredkin operators in Q3 , which may require use of an inner
product, a space larger than Q3 , or some other general linear operator mechanism.
153
These reversible gates are primarily concerned with implementing classical logic
• Demonstrated that the idempotent operators Pk for Q1 where (Pk)2 = Pk, when
multiplied together for Qq=3,4 form cyclic operators (Rk)2q = Rk where Rk = –Pk. Also
showed for Qq=3 that (Ek)80 = 1 but did not find the eigenvector power for Qq=4 .
8.2 Conclusions
This dissertation focused primarily on the representation of, and tools for, a quantum
occurrence and co-exclusion perspective to this novel symmetric representation of qubits led
to a consistent and meaningful interpretation when deriving new states and operators. All the
relevant quantum computing concepts related to a qubit were described using these new
geometric algebra definitions and framework. The new tools helped to deal automatically
with the complexities of geometric algebra and enabled the automatic simplification and
mathematical properties defining quantum computing were derived using the above
infrastructure, and without using the traditional, unintuitive, complex-valued, matrix notation
of Hilbert spaces. It appears that Q1 does faithfully represent the state, operators, properties,
154
The behavior of multiple qubits was also explored and the geometric product was shown to
be equivalent to the tensor product, thereby defining the quantum geometric algebra Qq as a
quantum register of size q qubits. An ebit formed by entangling any number of qubits was
simply derived using the recursive concurrent Hadamard operator and produced the
appropriate Bell and magic states. In spite of the growth of the size of the Qq, the tools were
able to perform some computations for >10 qubits and exha ustively prove some properties
for two qubits. All of the well known operators for one and two qubits were derived.
The definition of a quantum geometric algebra for representing qubits and ebits, along with
the corresponding prototyping tools, is obviously just the beginning. Many of the remaining
mathematical holes in the formal definition in Q q need to be explored (by more formally
probability densities, to name just a few. Also the next generation of tools could give more
155
APPENDIX A
Fredkin gate is a universal reversible gate with three inputs [c b a] and three outputs [C B A]
written as basis vectors using values {0,1}. When the control line c = 1 the other two inputs
simply pass through to the corresponding output, so A = a and B = b. When the control line c
= 0, then the two inputs cross to the other output, so A = b and B = a. The control line C
always just passes through, so C = c. This gate is reversible where inputs and outputs can be
swapped. Below is the Fredkin Gate truth table and gate symbol.
A Fredkin gate is universal and can emulate any logic gates using the following rules.
156
Matrix representation of Fredkin Gate using Galois Fields
Finally enough groundwork is in place to write the definitions of a reversible gate using a
matrix notation. This paper uses the mathematical notion where square braces represent
vectors and matrices. Below is the derivation of matrix notation for a Fredkin gate. The
When the cont rol line c = 1, then the transformation is just the identity matrix as below:
1 0 0
[C B A] = [c b a ] * 0 1 0 (A.1)
0 0 1
When the control line c = 0, then the transformation is the "a" swap "b" matrix as below:
1 0 0
[C B A] = [c b a ] * 0 0 1 (A.2)
0 1 0
Combining these two results produces the following operator written as a conditional result.
Notice how even at this early stage, the conditional terms based on "c" inside the matrix
1 0 0
[C B A] = [c b a ] * 0 c ! c (A.3)
0 ! c c
Now remove the constant columns and rows due to C = c and rewrite to get:
157
1 0 0 1
[B A] = [b a ] * c * + !c * (A.4)
0 1 1 0
1 0 0 1 0 1
[B A] = [b a ]* c * + c* + 1* (A.5)
0 1 1 0 1 0
1 1 0 1
[B A] = [b a ] * c * + 1 0 (A.6)
1 1
Then multiply completely out to show the final formula in linear matrix notation:
1 1 0 1
[B A] = [bc ac ] * + [b a] * (where bc = b c = b * c) (A.7)
1 1 1 0
Notice how the original input basis dimensions of "a" and "b" have increased to include some
new input basis terms formed by their product with input term “c”. Combining this entire
basis set into a single basis vector produces the following matrix operation for the two
1 1
1 1
[B A] = [bc ac b a ]* (A.8)
0 1
1 0
Now by including the original term C = c the final matrix notation is produced with all the
additional basis terms, which are each products of some combinations of the original input
basis terms.
158
0 1 1
0 1 1
[C B A] = [bc ac c b a] * 1 0 0 (A.9)
0 0 1
0 1 0
These additional terms are required in order to express Fredkin gates in a linear matrix
format using GF(2). As will be shown later in general all input terms and all product
combinations of input basis (plus the number 1) are required to be included in the new basis
set for expressing any Boolean equation as reversible universal gates (such as Fredkin or
Toffoli gates) in matrix notation. This similar result will resurface again later using
The individual output terms from equation (A.9) can be written out using Galois field
notation:
A=bc+ac+b
B=bc+ac+a (A.10)
C=c
Now the usual Boolean logic operations can be double checked using the symmetrical
equations (A.10). The following result shows for primitive Boolean expressions that the
increase in number of dimension can be proportional to number of logic “AND” plus number
of logic “OR” terms in the overall equation. Both the individual equations and matrix format
159
For NOT gate where b = 1 and a = 0 are substituted into equations (A.10) then:
This result shows that logic "AND" and logic "OR" both depend on the equivalent local
product of "a b" as an addition basis vector to represent arbitrary Boolean equations in linear
matrix format. This property is related to the property of reversibility, since "AND" and
160
"OR" throw away information about the inputs unless additional bits are carried through to
other outputs of the computation. These new basis terms required for matrix format, are truly
linearly independent terms for these operators, otherwise the overall result would not be
It turns out the "a b" product term is just another way to look at the conditional cont rol
variable "c" in equation (A.1). This is understandable in vector terms if the AND gate case is
analyzed in equations (A.12). The "a b" product term is required to make the four input states
be independent of the other states {0, a, b}. This is true because the "a b" product is
dependent on both inputs a and b, so can not be linearly independent on both simultaneously.
By thinking about this geometrically, then the number of dimensions must be expanded to
161
APPENDIX B
#!/usr/bin/perl
#!/usr/local/bin/perl
#usage: ga.pl <table|zero|vector|inner|outer> <expression>
#Geometric algebra parsing, normalization, products and simplification
#routines supporting non-commutative products where a*a = 1 and a*b=-b*a
#and mod 3 arithmetic with 2=-1
@myargs = @ARGV;
$hush = 0;
$verbose = 0; #for debugging only
$nosimplify = 0;
$evaluate_table = 0;
$printfunction = 0;
$showzeros = 0;
$innerproduct = 0;
$outerproduct = 1; #default is really the geom prod unless next flag set
$term_squared_zero = 0; #test since out prod a^a=0 but a^a^b is still = b
$term_squared=1; #controls if a*a=1 (default) or a*a=-1 (using minus flag)
$time_basis = ""; # indicate time=token variable
%dimnames = ();
%all_terms = ();
$use_all_terms;
$right_hand_rule = 0; #don't set this unless experimentation
$first_term = "";
$last_term = "";
162
} elsif ($arg =~ /function/i) {
$evaluate_table = "ON";
$printfunction = "ON";
print "ENABLED parameters: table and show function\n" if $verbose;
shift @myargs;
next;
} elsif ($arg =~ /zero/i) {
$evaluate_table = "ON";
$showzeros = "ON";
print "ENABLED parameters: table and show zeros\n" if $verbose;
shift @myargs;
next;
} elsif ($arg =~ /vector/i) {
$evaluate_table = "ON";
$vector_result = "ON";
print "ENABLED parameters: zeros & show vector result\n" if $verbose;
shift @myargs;
next;
} elsif ($arg =~ /quiet/i) {
$hush = "ON";
print "ENABLED parameter: quiet\n" if $verbose;
shift @myargs;
next;
} elsif ($arg =~ /left/i) {
$right_hand_rule = 0;
print "DISABLED parameter: right\n" if $verbose;
shift @myargs;
next;
} elsif ($arg =~ /right/i) {
$right_hand_rule = 1;
print "ENABLED parameter: right\n" if $verbose;
shift @myargs;
next;
} elsif ($arg =~ /minus/i) {
$term_squared = -1;
print "ENABLED parameter: minus\n" if $verbose;
shift @myargs;
next;
} elsif ($arg =~ /all/i) {
$use_all_terms = 1;
print "ENABLED parameter: all\n" if $verbose;
shift @myargs;
next;
} elsif ($arg =~ /outer/i) {
$term_squared_zero = 1; #force computation of standalone outer product
$outerproduct = 1;
$innerproduct = 0; print "ENABLED parameter: outer\n" if $verbose;
shift @myargs;
next;
} elsif ($arg =~ /inner/i) {
$outerproduct = 0;
$innerproduct = 1;
print "ENABLED parameter: inner\n" if $verbose;
shift @myargs;
next;
} elsif ($arg =~ /geom/i) {
$term_squared_zero = 1; #forces GP as sum of real inner & outer prod
163
$outerproduct = 1;
$innerproduct = 1;
print "ENABLED parameter: geometric\n" if $verbose;
shift @myargs;
next;
} elsif (($value) = ($arg =~ /time=(.+)/i)) {
$time_basis = $value;
print "ENABLED parameter: time=$value\n";
shift @myargs;
next;
} else {
last;
}
}
if (scalar @myargs == 0) {
#print "Please type in expression:\n";
$inputerm = <STDIN>; #if no args passed then read from standard input
chomp $inputerm;
@myargs = ($inputerm);
#print "FOUND =$inputerm=\n";
}
print "Input expression is ", join(" + ", @myargs), "\n" unless $hush;
#all args are simplified and then summed together
while ($eqn = shift @myargs) {
@prod_terms = &parse_products($eqn);
if (scalar @prod_terms > 1) {
$results = &tensor_products(@prod_terms);
#print "Tensor Product of $eqn is:\n $results\n";
} else {
$results = join(" ", &simply_equ(&parse_equ($prod_terms[0])));
#print "Eqn \"$prod_terms[0]\" in normalized form is:\n $results\n";
}
print "$results\n" unless $evaluate_table || $sum_resultsp;
if ($sum_resultsp) {
$sum_results .= " " . $results;
} else {
&evaluate_table($results);
}
}
#then simply sum of separate partial results and print final results
if ($sum_resultsp) {
$combined = join(" ", &simply_equ(&parse_equ($sum_results)));
print "$combined\n" unless $evaluate_table;
164
&evaluate_table($combined);
}
sub all_terms {
my ($string) = @_;
my ($term);
$string =~ s/\+/ /g;
$string =~ s/\-/ /g;
$string =~ s/\(/ /g;
$string =~ s/\)/ /g;
$string =~ s/^ +//g;
$string =~ s/ +$//g;
foreach $term (grep { /\D/ } split(/ +/, $string)) {
$all_terms{$term} = "INPUT";
}
}
sub parse_equ { #first split up terms, then normalize and sort
my($equstring) = @_;
my(@rawterms, @terms);
$equstring =~ s/^ +//;
$equstring =~ s/ +$//;
#add ":" before + or - to aid in splitting and force space after
$equstring =~ s/([+-])/\:$1 /g;
$equstring =~ s/ +/ /g; #remove redundant spaces
(@rawterms) = split /:/, $equstring;
#remove empty term caused by leading + or –
shift(@rawterms) unless $rawterms[0];
(@rawterms) = map { &normalize_token_order($_) } @rawterms;
#sort terms based on # of terms & then alphabetic sort while ignoring sign
return &sort_terms(@rawterms);
}
165
my(@producterms) = @_;
#print "here are product terms =", join("==", @producterms), "=\n";
my($lastresult) = shift @producterms;
my(@resulterms, $eqnstring);
while ($eqnstring = shift @producterms) {
(@resulterms) = &product_combinations ($lastresult, $eqnstring);
$lastresult = join(" ", @resulterms);
}
return $lastresult
}
166
return &simply_equ(&parse_equ($bigresult));
#return &parse_equ($bigresult);
}
sub dot_product {
my($sign, $vector, @tokens) = @_;
my($swaps) = 0;
my($token, @scanned);
#print "Dot product of \"$sign\" \"$vector\" for \"@tokens\"\n";
#if scalar (or empty) then result is 0
return ("STOP", $sign) if ($vector eq "1");
while ($token = shift @tokens) {
if ($vector eq $token) {
$flipsign = &oddp($swaps) ? "-" : "+";
$sign = &sign_product($sign, $flipsign);
return ("", $sign, @scanned, @tokens); #exclude this token
}
$swaps = $swaps + 1;
push(@scanned, $token);
}
return ("STOP", $sign); #else not found so result is 0
}
sub sign_product {
my($sign1, $sign2) = @_;
my($newsign) = "+";
if (($sign1 eq "-") || ($sign2 eq "-")) {
$newsign = "-" unless ($sign1 eq $sign2);
}
return $newsign;
}
sub simply_equ { #this implements mod 3 arithmetic where 2 => -1;
my(@terms) = @_;
if ($nosimplify) {
return &sort_terms(@terms);
} else {
my($term, $count, @tokens, $tokens, $final_count);
my(@final_result, %sameterms);
foreach $term (@terms){
($count, @tokens) = &number_and_terms($term);
map { $dimnames{$_} = "YES" } @tokens;
$tokens = join " ", @tokens;
#print "Processing term =$term= into $count and $tokens\n";
$sameterms{$tokens} = $sameterms{$tokens} + $count; #incr or decr
}
foreach $term (keys %sameterms){
$final_count = $sameterms{$term} % 3;
if ($final_count) {
push(@final_result,(($final_count == 1) ? "+" : "-") . " " . $term);
}
}
return (0) unless @final_result;
return &sort_terms(@final_result);
}
}
167
sub evaluate_table {
my($equation) = @_;
#only non-numeric variable names
my(@dnames) = sort { $a cmp $b} (grep { /\D/ } keys %dimnames);
if((! $hush) && $evaluate_table) {
print "Using all INPUT KEYS of: ", join " ", (sort keys %all_terms),
"\n" if ($use_all_terms || ! @dnames);
}
#use all terms from input expression if constant output expression.
@dnames = sort keys %all_terms if ($use_all_terms || ! @dnames);
my($dcount) = scalar @dnames;
my($maxcount) = 2 ** $dcount;
my($diterate, @sum_terms, $nonzero_rows, $plus_rows);
#print "FOUND unique terms @dnames from =",join("=",keys %dimnames),"=\n";
if ($evaluate_table && $dcount) {
#disables right hand rule fixup for parse_equ, since already done
#$right_hand_rule = 0;
@sum_terms = &build_exp($equation, @dnames);
if ($vector_result) {
print "[";
} else {
print "Logic table with $maxcount entries with columns INPUTS ",
"| PRODUCTS | OUTPUT\n" if $verbose;
print "INPUTS: @dnames | @sum_terms | OUTPUT\n";
$entries_printed = 1; #controls row divider printing
}
while ($maxcount > $diterate ) {
#print "ROW ", $diterate || "0", "\n";
if ($value = &evaluate_row($diterate, $dcount)) {
$nonzero_rows++;
$plus_rows++ if ($value eq "+");
}
$diterate++;
}
if ($vector_result) {
print "]\n";
} else {
print "$stars\n" if $entries_printed;
print "Row counts for outputs of ZERO=", $maxcount - $nonzero_rows,
", PLUS=", $plus_rows || "0",
", MINUS=", ($nonzero_rows - $plus_rows) || "0",
" for TOTAL=$maxcount rows.\n\n\n" if $nonzero_rows;
}
}
}
sub evaluate_row {
my($rowcount, $width) = @_;
my($original) = $rowcount || "0";
my($result, @signs, @inputs);
@inputs = &binary_explode($rowcount, $width); #returns values of 0,1,2
@signs = &sign_conversion(@inputs);
($result,@products) = map {&sign_conversion($_)} &evaluate_exp(@inputs);
if ($vector_result) {
my($spacer) = "";
if ($rowcount) {$spacer = " " if ($rowcount % 8) == 0;}
168
print "$spacer$result";
return $result;
}
if (($original % 4) == 0) { #print dividers every four entries
print "$stars\n" if $entries_printed;
$entries_printed = 0; #reset count if just printed divider.
}
$original = "0$original" if $original < 10;
if ($showzeros || ($result ne 0)) {
print "ROW $original: @signs | @products | $result\n";
$entries_printed++; #increment enables printing of trailing divider
}
return $result;
}
sub build_exp { #build custom func on the fly for &evaluate_exp using eval
my($equation, @dnames) = @_;
my(@sum_terms);
@sum_terms = &parse_equ($equation);
#only non-numeric variable names
$inputnames = join(",", map { "\$" . $_ } @dnames);
$prodexpression = join(",", map { &build_prodterm($_) } @sum_terms);
$function = <<EOFUNCTION;
sub evaluate_exp {
my ($inputnames) = \@_;
my (\@products) = ($prodexpression);
return (&cadd(\@products), \@products);
}
EOFUNCTION
print "BUILDING function:\n$function" if $printfunction;
eval $function; ##redefine the evaluation function using eval
return @sum_terms;
}
sub build_prodterm {
my($arg) = @_;
my($sign, @terms, @vars);
($sign, @terms) = &sign_and_terms($arg);
#if non-numeric then create var, else leave as number
@vars = map { /\D/ ? ("\$" . $_) : $_ } @terms;
return "&cmult(\"$sign\"," . join(",", @vars ) . ")";
}
169
foreach $term (@mterms) {
print "WARNING: cmult passed $term\n" if $term < 0 || $term > 3;
$result = ($result * $term) % 3; #mod three multiplication
}
if ($msign eq "-") {
$result=($result == 1)? 2 : 1; #invert swaps between values 1 and 2=-1
}
#print "TRACE product of $msign $first @mterms gives $result\n";
return $result;
}
#mod 3 addition used by evaluate_table and evaluate_row and evaluate_exp
sub cadd {
my(@addterms) = @_;
my($result);
my($term);
foreach $term (@addterms) {
print "WARNING: cadd passed $term\n" if $term < 0 || $term > 3;
$result = ($result + $term) % 3; #mod three addition
}
#print "TRACE add of @addterms gives $result\n";
return $result;
}
#converts +1 => + and 2 => - and leaves others alone for debug
sub sign_conversion {
my(@terms) = @_;
return map {if ($_ == 1){ "+" } elsif ($_ == 2) { "-" } else {$_ }}
@terms;
}
sub binary_explode {
my($integer, $width) = @_;
my(@results);
while ($width) {
#values 0 and 1 converted to -1=2 and 1
unshift (@results,($integer & 1) || 2);
$integer = $integer >> 1;
$width--;
}
return @results;
}
sub sort_terms {
my(@terms) = @_;
if ($nosimplify) {
return @terms;
} else { #fewest number of product terms as first sort criteria
return sort { ($a =~ s/ / /g) <=> ($b =~ s/ / /g) ||
#then alphabetically next criteria
(substr($a,2) cmp substr($b,2)) ||
#then sign as last criteria
(substr($a,0,1) cmp substr($b,0,1))
} @terms;
}
}
sub normalize_token_order {
my($tokenstring) = @_;
170
my($sign, @tokens, @results);
($sign, @tokens) = &number_and_terms($tokenstring);
my($count) = scalar(@tokens) - 1; #upper offset into array (zero based)
my($upper, $this, $next, $result, %termcount);
#print "Count = $count for @tokens\n";
if ($count) {
#this is a bubble sort to guarantee adjacent swaps for non-assoc
foreach $upper ($count .. 1) {
foreach $this (0 .. $upper-1) {
$next = $this + 1;
$result = $tokens[$this] cmp $tokens[$next];
#print "With sign=$sign comparing $tokens[$this] with ",
# "$tokens[$next] giving result $result";
if ($result == 1){ #then swap 2 values so max is in $tokens[$next]
#print " and toggling sign and values";
my($min) = $tokens[$next];
my($max) = $tokens[$this];
$tokens[$this] = $min;
$tokens[$next] = $max;
if ($sign == 1){$sign = -1} else {$sign = 1}; #and swap sign value
}
#print ".\n";
}
}
}
#after sorting now can safely remove duplicate terms a*a=1
#without sign change (or -1 w/sign adjust)
%termcount = ();
#precount identical tokens & then include one copy for odd counts
grep { $termcount{$_}++; 0} @tokens;
#flip sign due to right hand rule. but not right yet so remove
# if ($right_hand_rule && &oddp($termcount{$first_term}) &&
# &oddp($termcount{$last_term})) {
# #print "Flipping Sign=$sign due to Right hand rule for @tokens\n";
# $sign = $sign * -1;
# }
my ($result_is_zero) = 0;
if ($term_squared_zero) {
@results = grep { $result_is_zero = 1 if $termcount{$_} > 1;
$termcount{$_} == 1 } @tokens;
return 0 if $result_is_zero && (0 == scalar @results);
if ($sign == 1) { $sign = "+" } else { $sign = "-" };
return "@sign @results";
} else {
@results =
grep { my($odd) = &oddp($termcount{$_});
$sign = &signadj($sign,$_,$termcount{$_});
$termcount{$_} = 0;
$odd}
@tokens;
@results = (1) unless @results;
if ($sign == 1) { $sign = "+" } else { $sign = "-" };
return "$sign @results";
}
}
171
my($oldsign, $token, $count) = @_;
my($local_term_squared) = $term_squared;
if ($time_basis) {
if ($time_basis eq $token) {
#then set as time like according to Univ Cambridge GA tutorial
$local_term_squared = 1;
} else {
$local_term_squared = -1; #but set all others as space like
}
}
if ($count == 1) {
#default case when sorting but no dupls removed, so don't touch sign
return $oldsign;
} elsif ($local_term_squared == 1) {
return $oldsign;
} elsif ($local_term_squared == -1) {
#divide count by two and flip sign that number of times
$count = $count >> 1;
while ($count) {
$count--;
$oldsign = $oldsign * -1;
}
return $oldsign;
} else {
die "ERROR: invalid value for term_squared=$local_term_squared\n";
}
}
sub number_and_terms {
my($tokenstring) = @_;
my($sign, @tokens);
($sign, @tokens) = split(/ +/,$tokenstring);
if ($sign eq "+") { $sign = 1;
} elsif ($sign eq "-") { $sign = -1;
} else {unshift (@tokens,$sign); $sign = 1; #if no sign then assume pos
}
return ($sign, @tokens);
}
sub sign_and_terms {
my($tokenstring) = @_;
my($sign, @tokens);
($sign, @tokens) = split(/ +/,$tokenstring);
if (($sign eq "+") || ($sign eq "-")) {
$sign = $sign;
} else {
unshift (@tokens, $sign);
$sign = "+"; #if no sign then assume positive
}
return ($sign, @tokens);
}
#end of file
172
APPENDIX C
This code is relatively short because it depends on shared file permutation.pl, which the
#!/usr/bin/perl
#!/usr/local/bin/perl
require 'permutation.pl';
#end of file
173
APPENDIX D
#!/usr/bin/perl
#!/usr/local/bin/perl
require 'permutation.pl';
$verbose = 0; #set =1 for verbose debug printing
@dimterms = split /[,; ]/, shift @ARGV; #this order is maintained
through out
@revterms = reverse @dimterms;
$dims = scalar @dimterms;
$maxstate = (2 ** $dims) - 1;
$odd_arity = $dims % 2; #based on number of dims;
@andterms = &generate_equ_for_maxstate(@dimterms);
%termhash;
%statequations;
$tablecontrols = "quiet"; #suppresses the input eqn printing (can be huge)
my($laststate) = -1; #used in vector input mode
while (@ARGV) {
$current_states = shift @ARGV;
print "BEFORE $current_states\n" if $verbose;
if ($vectormode = $current_states =~ /\[(.+)\]/) {
$current_states = $1;
die "ERROR: bad chars in vector mode only allow \"+-0 \"\n"
if $current_states =~ /[^+-0 ]/;
$current_states =~ s/([+-0])/$1 /g;#splitup tokens w/vector notation
$current_states =~ s/ / /g; #remove unwanted
$current_states =~ s/ $//g;
174
}
if ($current_states =~ /verbose/) { $verbose = 1; }
#can pass thru table controls here.
if ($current_states =~ /table|zero|vector/) {
$tablecontrols .= " " if $tablecontrols;
$tablecontrols .= $current_states;
next;
}
print "AFTER $current_states \n" if $verbose;
my($assignplus) = 1; #default sign value
@states = split(/[,; ]+/, $current_states);
print "split states ARE [@states]\n" if $verbose;
foreach $state (@states) {
#manage the sign as either seperate token
if ($state eq "+") {
$assignplus = 1;
$state = $laststate + 1;
} elsif ($state eq "-") {
$assignplus = 0;
$state = $laststate + 1;
} elsif ($state eq "0" && $vectormode){#skip state only in vector mode
$laststate = $laststate + 1;
next;
#or manage the sign as part of other number token
} elsif (substr($state,0,1) eq "+") {
$assignplus = 1;
$state = substr($state,1) || ($laststate + 1);
} elsif (substr($state,0,1) eq "-") {
$assignplus = 0;
$state = substr($state,1) || ($laststate + 1);
}
if ($verbose){
print "WARNING: State=$state is not in expected order ",
$laststate + 1, "\n" if $state != ($laststate + 1);
}
$laststate = $state;
die "WARNING: Bad state $_ exceeds max of $maxstate\n"
unless (abs($state) <= $maxstate);
%termhash = &binary_explode_hash($state,@revterms);# always overwrite
$result = join(" ", map { &adjusterm($_, $assignplus) } @andterms);
$statequations{$state} = $result;
print "State $state with sign ", $assignplus?"+":"-",
" has equation $result\n" if $verbose;
}
}
##*************************************************************
##subroutines are below here
#substitutes in for each vector the new sign value based on bin row count.
sub adjusterm {
my ($term, $positive) = @_;
my ($item, $sign, $tokenstring);
175
($sign, $tokenstring) = $term =~ /([+-]) (.+)/;
foreach $item (@dimterms){
if ($termhash{$item} eq "-") {#toggle sign if token in string
$sign = ($sign eq "+") ? "-" : "+" if $tokenstring =~ /$item/;
}
}
#invert one last time if not positive
$sign = ($sign eq "+") ? "-" : "+" unless $positive;
return "$sign $tokenstring";
}
#end of file
176
APPENDIX E
#!/usr/bin/perl
#!/usr/local/bin/perl
require 'permutation.pl';
require 'galib.pl'; #code identical to ga.pl except is imported
$bindir = ".";
$varname = "X"; #use capital X to indicate where to substitute
$initial_state = 0;
if (! ($ARGV[0] =~ /[^-+0]/)) { #if any chars other then +-0 then skip
$initial_state = shift @ARGV;
#print "STARING with state $initial_state\n";
}
177
} else {
@answers = map {&standardize_eqn($_)} @ARGV;
}
$max = $#andterms;
@trinary = map { ($initial_state ? substr($initial_state, $_, 1) : "0")
|| "0"} (0 .. $max);
print "Starting with state ", @trinary, " = ", &fetch_all_terms(), "\n"
if $initial_state;
$totalcount = 0;
$matchcount = 0;
while ($next = &next_eqn_perm()) {
my ($eqncopy) = $eqn;
$totalcount++;
$result = &standardize_eqn($eqncopy,$next);
my (@custom_answers) = @answers;
if ($X_in_answer) {
@custom_answers = map {&standardize_eqn($_,$next)} @answers;
}
#print "Iteration \"$result\" for X = \"$next\" in $eqncopy matching
#@custom_answers\n";
@matches = grep {$_ eq $result} @custom_answers;
if (@matches || 0 == @answers) {
$matchcount++ if @matches;
print "Found Match for X = $next in $eqn = $result\n";
}
if (($totalcount % 100000) == 0) {
print "TRIED $totalcount: ", @trinary,
" = $next and found $matchcount on " . `date`;
}
}
print "Attempted $totalcount with $matchcount found.\n";
##*************************************************************
##subroutines are below here
sub next_eqn_perm {#get the next equation combinations by trinary counting
foreach $index (0 .. $max) { #while in this loop trinary count
my ($tristate) = $trinary[$index];
if ($tristate eq "0") {
$trinary[$index] = "-";
last;
} elsif ($tristate eq "-") {
$trinary[$index] = "+";
last;
} elsif ($tristate eq "+") {
$trinary[$index] = "0"; #this is carry into next bit
# die "Max Carry hit for $totalcount\n" if ($index == $max);
} else {
die "Illegal value found in index=$index\n";
}
}
#then collect all non-zero terms
return join "", map {&fetch_term($_)} (0 .. $#trinary)
}
178
sub fetch_all_terms { #then collect all non-zero terms
return join "", map {&fetch_term($_)} (0 .. $#trinary)
}
sub standardize_eqn {
my($equation, $customize) = @_;
if ($customize) { #customize result each time equation is passed.
$equation =~ s/$varname/$customize/g;
}
# $equation = `$bindir\/ga.pl quiet \"$equation\"`; chomp $equation;
$equation = &ga_evaluate("quiet", $equation);
return $equation;
}
#end of file
179
APPENDIX F
#!/usr/local/bin/perl
#For inputs (a,b,c,etc) produces the equivalent of (1+a)(1+b)(1+c)etc
180
while ($gapindex < $maxgap) {
$term = $theterms[0];
$gather = 1;
while ($gather < $bycount) {
#print "COUNTS are max= $maxgap gap= $gapindex gather= $gather $term\n";
$term .= " " . $theterms[$gapindex + $gather];
$gather++;
}
unshift(@results, $sign . $term);
$gapindex++;
}
shift @theterms; #shorten the iteration list/array
}
#print " produced @results\n";
return reverse @results;
}
}
181
APPENDIX G
This file is a shared version of ga.pl from Appendix B, so only the top level functions are
changed. This file only takes args passed thru function interface, and not thru UNIX pipes.
#!/usr/bin/perl
#!/usr/local/bin/perl
#Geometric algebra parsing, normalization, products and simplification
#routines supporting non-commutative products where a*a = 1 and a*b=-b*a
#and mod 3 arithmetic with 2=-1
#Only the top two functions are intended to be callable by other programs
sub init_ga_globals {
my (@myargs) = @_;
my ($arg);
$hush = 0;
$verbose = 0; #for debugging only
$nosimplify = 0;
$evaluate_table = 0;
$printfunction = 0;
$showzeros = 0;
$outerproduct = 1; #set both for geometric product
$innerproduct = 1;
$term_squared=1; #controls if a*a=1 (default) or a*a=-1 (w/minus flag)
$time_basis = ""; # indicate time=token variable
%dimnames = ();
%all_terms = ();
$right_hand_rule = 0; #don't set this unless experimentation
$first_term = "";
$last_term = "";
while ($arg = $myargs[0]) { #must put all control parameters first
print "DEBUGGING parsing of $arg\n" if $verbose;
if ($arg =~ /simplif/i) {
$nosimplify = "ON";
print "ENABLED parameter: no simplification\n" if $verbose;
shift @myargs;
next;
} elsif ($arg =~ /table/i) {
$evaluate_table = "ON";
print "ENABLED parameter: table\n" if $verbose;
shift @myargs;
next;
} elsif ($arg =~ /function/i) {
$evaluate_table = "ON";
$printfunction = "ON";
182
print "ENABLED parameters: table & show function\n" if $verbose;
shift @myargs;
next;
} elsif ($arg =~ /zero/i) {
$evaluate_table = "ON";
$showzeros = "ON";
print "ENABLED parameters: table and show zeros\n" if $verbose;
shift @myargs;
next;
} elsif ($arg =~ /vector/i) {
$evaluate_table = "ON";
$vector_result = "ON";
print "ENABLED params: zeros & show vector result\n" if $verbose;
shift @myargs;
next;
} elsif ($arg =~ /quiet/i) {
$hush = "ON";
print "ENABLED parameter: quiet\n" if $verbose;
shift @myargs;
next;
} elsif ($arg =~ /left/i) {
$right_hand_rule = 0;
print "DISABLED parameter: right\n" if $verbose;
shift @myargs;
next;
} elsif ($arg =~ /right/i) {
$right_hand_rule = 1;
print "ENABLED parameter: right\n" if $verbose;
shift @myargs;
next;
} elsif ($arg =~ /minus/i) {
$term_squared = -1;
print "ENABLED parameter: minus\n" if $verbose;
shift @myargs;
next;
} elsif ($arg =~ /all/i) {
$use_all_terms = 1;
print "ENABLED parameter: all\n" if $verbose;
shift @myargs;
next;
} elsif ($arg =~ /outer/i) {
$outerproduct = 1;
$innerproduct = 0;
print "ENABLED parameter: outer\n" if $verbose;
shift @myargs;
next;
} elsif ($arg =~ /inner/i) {
$outerproduct = 0;
$innerproduct = 1;
print "ENABLED parameter: inner\n" if $verbose;
shift @myargs;
next;
} elsif ($arg =~ /geom/i) {
$outerproduct = 1;
$innerproduct = 1;
print "ENABLED parameter: geometric\n" if $verbose;
shift @myargs;
183
next;
} elsif (($value) = ($arg =~ /time=(.+)/i)) {
$time_basis = $value;
print "ENABLED parameter: time=$value\n";
shift @myargs;
next;
} else {
return @myargs;
}
}
return @myargs;
}
sub ga_evaluate { ##this is the main routine that all args are passed.
my(@myeqns);
my($eqn);
@myeqns = &init_ga_globals(@_);
$sum_resultsp = scalar(@myeqns) > 1;
$sum_results = "";
print "MYEQNS are @myeqns\n" if $verbose;
#default table input terms if expression simplifies to constant.
map { &all_terms($_) } @myeqns;
if ($right_hand_rule){
foreach $term (&sort_terms(keys %all_terms)) {
$first_term = $term unless $first_term;
$last_term = $term; #leaves last value set in variable
}
}
print "First=$first_term and Last=$last_term\n" if $verbose;
print "Input expression is ", join(" + ", @myeqns), "\n" unless $hush;
#all args are simplified and then summed together
while ($eqn = shift @myeqns) {
@prod_terms = &parse_products($eqn);
if (scalar @prod_terms > 1) {
$results = &tensor_products(@prod_terms);
#print "Tensor Product of $eqn is:\n $results\n";
} else {
$results = join(" ", &simply_equ(&parse_equ($prod_terms[0])));
#print "Eqn \"$prod_terms[0]\" in normalized form is:\n $results\n";
}
return $results unless $evaluate_table || $sum_resultsp;
if ($sum_resultsp) {
$sum_results .= " " . $results;
} else {
&evaluate_table($results); #this is never executed
}
}
#then simply sum of separate partial results and print final results
if ($sum_resultsp) {
$combined = join(" ", &simply_equ(&parse_equ($sum_results)));
return $combined unless $evaluate_table;
&evaluate_table($combined); #this is never executed
}
}
#the remainder of the file is the same as ga.pl starting with definition
#of function all_terms()
1; #return true and also end of file
184
APPENDIX H
Inner product aib : vectors are orthogonal aib = bia = 0 and self collinear aia = bib = 1 .
For any 1- vector x: since x2 = 1, so x = x-1 . For X = (±1±x): X-1 is undefined, so X is singular.
Projectors Pk= –Rk : R0 =C– – =(1–a)(1–b) =[+000], R1 =C–+=[0+00], R2 =C+– =[00+0], R3 =C++=[000+]
Eigenvectors: InG2 , Ek2 = +1, Ek Rk = Rk, Pk2 =Pk, then Ek = (±a±b±a b) = Rk –1, ∑P k = +1
Qubit properties: A0 = –A1 , A+ = –A– and also 1/A0 = –A0 = A1 , 1/A+ = –A+ = A–
Hadamard: A0/1 SA =A±, A±SA =A1/0 . Inverter: ASASA = –A, Pauli: A0/1 PA = ∓ a1 , A±PA =±a0.
185
Quantum register notation and properties: Q q = Gn=2q
Bell Recursive Operator: B = (SA + SB) where B i+1 = B i B for i = {0–3}, B -1 is undefined.
Bell States: B0 =(–S00 +S11 )= Φ + , B2 =(S00 –S11 )= Φ − , B1 =(S01 +S10 )= Ψ + , B3 =(–S01 –S10 )= Ψ −
Magic States: M0 = (S01 – S10 ), M2 = (–S01 + S10 ), M1 = (–S00 – S11 ), M3 = (S00 + S11 )
Vector notation: + 1 = [ + + + + + + + + + + + + + + + + ] , − 1 = [ − − − − − − − − − − − − − − − − ]
Sparse +1: B 4 = I + = [0 + +0 + 00 + + 00 + 0 + + 0] , M 4 = I + = [+ 00 + 0 + +0 0 + +0 + 00 +]
187
REFERENCES
[1] A. Barenco, C.H. Bennett, R. Cleve, D.P. DiVincenzo, N. Margolus, P. Shor, T. Sleator,
J. Smolin and H. Weinfurter. “Elementary gates for quantum computation”. Phys. Rev.
ftp://eve.physics.ox.ac.uk/Archive/Numbered/BBCDMSSW95/paper.ps
[2] J. D. Bekenstein and M. Schiffer. Int. Journal of Mod. Phys. C1, p 355, 1990.
[3] J. Bell. “On the Einstein-Podolsky-Rosen Paradox”. Physics. Vol. 1, pp. 195-200, 1964.
quantum cryptography”. Journal of Cryptology. vol. 5, no. 1, pp. 3-28, 1992. Also see
American. p. 50. October 1992 and online paper "What is Quantum Cryptography".
http://www.qubit.org/intros/crypt.html.
“Teleporting an Unknown Quantum State via Dual Classical and EPR Channels”.
[6] Charles Bennett. “Logical Reversibility of Computation”. IBM Journal of Research and
[7] C. D. Cantrell. Modern Mathematical Methods for Physicists and Engineers. Cambridge
[8] D. Deutsch, A. Ekert. “Machines, Logic and Quantum Physics". Los Alamos e-print
188
[9] C.J.L. Doran. Handouts for course “Physical Applications of Geometric Algebra”. see
[13] Edward Fredkin and Tommaso Toffoli. “Conservative Logic”. International Journal of
Philadelphia, PA. pp. 22-24, May 1996. (New York: ACM 1996) pp. 212-219.
[15] Jozef Gruska. Quantum Computing. McGraw-Hill, 1999. See book information on web
site http://www.mcgraw-hill.co.uk/gruska.
[16] David Hestenes. New Foundations for Classical Mechanics (Second Edition). Kluwer
[18] E. Knill, R. Laflamme, R. Martinez, C.-H. Tseng. “An algorithmic benchmark for
quantum information processing”. Nature. Letters to Editor (23 Mar 2000) vol. 404. pp.
368-370. and news release from LANL about the first seven-qubit quantum computer
189
[19] Rolf Landauer. “Information is Physical”. Proceedings of the Workshop on Physics and
Computation, PhysComp92. IEEE Computer Society Press. Los Alamitos, CA, 1992.
[20] Rolf Landauer. “Information is Physical”. Physics Today. Vol. 44, pp. 23-29, 1991.
[21] J. Lasenby, A.N. Lasenby and C.J.L. Doran. “A unified mathematical language for
physics and engineering in the 21st century”. Phil. Trans. R. Soc. Lond. A 358. pp. 21-
39, 2000.
[23] Michael Manthey. "A Combinatorial Bit Bang Leading to Quaternions ". See paper
March 1988.
[25] Frank Mattern. “Quantum Computing Introduction”. Paper found on his website
http://www.rommel.stw.uni-erlangen.de/~frank/informatik/QuantumComputing.pdf,
[27] Doug Matzke. “Will Physical Scalability Sabotage Performance Gains?”. Computer
[29] Teresa Meng, Sharad Malik (Editors). Asynchronous Circuit Design for VLSI Signal
Processing. 1994.
[30] C. Rorabaugh. Error Coding Cookbook . McGraw Hill. Chapter 2 on Galois Fields, 1996.
190
[31] M. Schiffer. “The interplay between Gravitation and Information Theory”. Proc. of the
1993.
[34] Peter Shor. “Algorithms for Quantum Computation: Discrete Logarithms and
Science. IEEE Computer Society Press. Los Alamitos, CA. page 124, 1994.
from the German by Robert Beyer (Princeton University Press, 1955), pp. 249-254.
[36] John Wheeler. “It From Bit”. Proceedings of the 3rd International Symposium on
191
VITA
Douglas J. Matzke was born in Green Bay, Wisconsin on April 29, 1953. After graduation
from Southwest High School in 1971, he attended the University of Wisconsin in Madison,
Wisconsin. He spent his junior year abroad studying at a private technical college in
Monterrey, Mexico. During his senior year, he was the part time co-chairperson for a Student
teams to enter designs for the Energy Resource Alternatives (ERA) competition. He
January 1976, he started working full time at Texas Instruments in Austin, Texas. While
working full time for the Digital Systems Division at TI, he married and acquired a Masters
moved to TI Dallas and soon joined the central research laboratories where he worked on the
design of the DARPA funded Lisp chip, which won the ISSSCC Best paper award in
February 1987. During the late 1980’s he created a fast compiled-code, reversible, discrete-
time simulation system and language which was built into an integrated CAD system called
DROID. Primarily for his DROID efforts, he was elected to Senior Member of Technical
Staff in 1990. His interests in limits of computation led to grant funding and becoming
chairman of PhysComp92 and PhysComp94 workshops and later a paper in September 1997
in IEEE Computer. Because of his increasing interest in quantum computing, he started his