As fundamental scaling limits start to stifle the evolution of complementary metal–oxide–semiconductor transistor technology, interest in potential alternative computing platforms grows. One such alternative is wave-based computation. In this work, we propose a general string diagrammatic formalism for wave-based computation with phase encoding applicable to a wide range of emerging architectures and technologies, including quantum-dot cellular automata, single-electron circuits, spin torque majority gates, and DNA computing. We demonstrate its applicability for design, analysis, and simplification of Boolean logic circuits using the example of spin-wave circuits.
The workhorse of conventional computing technology—in which information is encoded in electric voltages and computation is performed through the movement of charge—is the complementary metal–oxide–semiconductor (CMOS) transistor. These devices, which can be deployed as switches or amplifiers,1 can be used to realize logic gates that can perform all Boolean operations.2,3
Recent decades have seen progressive improvements in the miniaturization of CMOS4,5 and a corresponding increase in the packing density of transistors in integrated circuits. Finally, however, it has been recognized that Moore's law6 is soon to be outdone by fundamental physical scaling limits.5,7 This observation motivates intense research into potential new, “beyond-CMOS,” computing paradigms in both Boolean and non-Boolean domains.8 One class of alternatives is wave-based computation in which information is encoded in the phase or amplitude of waves, and logical operations are achieved through interference effects.
Proposals for wave-based computation span a wide range of signaling domains, including optics,9–11 neuromorphics,12 and spin waves.5 Some of these offer efficient non-Boolean computation5,24–26 and/or low energy consumption,13,24 parallelism,23 and reversibility.22,30 Moreover, it has recently been demonstrated that classical wave-based devices with phase encoding can be used to perform some quantum computing algorithms.61
Various Boolean logic gates and circuits have been implemented using wave-based technologies, but a general theoretical framework to design and analyze these systems has, thus, far been lacking. Here, we propose such a framework and demonstrate its application with reference to spin-wave, or “magnonic,” circuits.
Magnonics involves the generation, manipulation, and detection of collective excitations of the electronic spin lattice of a magnetic material.14–16,27,47–52 In magnonic logic devices, propagating spin waves (magnon currents) take the place of electron charges as carriers of information.5 Spin waves of gigahertz frequencies can be excited at nanometer wavelengths and propagate with low energy dissipation through magnetic insulators, hinting at the possibility of miniature devices with high clock speeds.24
A number of basic Boolean logic gates have been implemented with spin-wave systems, starting with the experimental demonstration of a NOT gate,20 followed by XNOR and NAND gates.21 Since the NAND gate is a universal gate, the latter result implies that any Boolean logical circuit can be implemented in the magnonic domain. Recently, there have been notable proposals for more complex circuits, such as a half adder,17 a full adder,18 and a 32-bit ripple-carry adder.19
One of the major advantages of wave-based computing, in general, and spin-wave computing, in particular, is its economical implementation of the majority gate.27–29 The simplest majority gate has three Boolean inputs and an output equal to the Boolean value which is in majority at the input. In CMOS-based computing, a combination of AND and OR gates (or many transistors24) is needed to implement a majority gate. In (spin-) wave computing, the majority gate exists as a stand-alone primitive logic gate. Moreover, by controlling one of the inputs to the gate, it is possible to implement an AND gate or an OR gate.
The formalism for wave-based Boolean logic circuits we present here uses string diagrams31–33—a formally rigorous, but visually intuitive syntax that has found use in diverse areas of science and technology.35 Our proposal takes inspiration from certain kinds of spin-wave logic gates, particularly the majority gate, but is fully applicable to any other physical platform amenable to wave-based or majority computation, e.g., quantum-dot cellular automata,55 nanomagnet logic,58 single-electron circuits,59 graphene spin circuits,56 spin torque majority gates,57 molecular scale electronics,54 and DNA computing.53
Any measurable wave characteristic can be used to encode information for wave-based computing. The choice of information encoding is important because it informs the physical structures used to perform computational tasks and also influences robustness.5 For the purpose of this paper, we focus on phase-based encoding because it is highly compositional—we can compose or cascade logic gates to form more complex circuits without recourse to non-wave-based elements.
As an illustration of phase encoding, consider a sinusoidal signal . We define phase to represent the logical bit 0 and to represent the logical bit 1. As an illustration, if we perform a computation where two waves corresponding to bit 1 and one wave corresponding to bit 0 are superimposed, we get , which is a logical 1. Note that we have used the same amplitude A for each wave. If the output has a non-zero amplitude different from A, we normalize it to A before using it as an input to another gate. For practicality, we also choose to avoid situations in which there is total destructive interference, e.g., a superposition of and .
String diagrams are a diagrammatic alternative to symbolic reasoning.31–33,35,36 Visually intuitive yet formally rigorous, they have been applied to scientific and engineering areas as diverse as quantum physics42,43 and computing,36,37 game theory,40,41 control theory,44 electric circuit theory,45,46 machine learning,34 and linguistics.38,39




















The foregoing description has demonstrated the versatility of string diagrams as a simple and visually intuitive way to represent wave-logic circuits. We shall now discuss their use in the context of logical reasoning.
We take two diagrams to be (operationally) equal if they represent the same logical operation. Now, we shall define diagram substitution/rewrite rules based on this notion of equality.













At this point, it is prudent to ask whether this string diagrammatic formalism is universal, sound, and complete for Boolean algebra. Universality requires that every Boolean algebraic expression can be diagrammatically represented; soundness that every diagrammatic derivation be correct when interpreted as Boolean algebra; and completeness that every valid Boolean algebraic equation can be diagrammatically derived.
Any Boolean algebraic expression consists of Boolean variables connected by ∧, ∨, and operations. We have string diagrammatic formulas for these variables (phase shifts) and operations (logic gates). Taking the ∧ or ∨ of a Boolean expression with another one diagrammatically means nesting the corresponding diagrams in an AND or OR circuit. Taking the of an expression corresponds to composing the circuit with a NOT gate (i.e., a π phase shift). Our string diagrammatic formalism is, therefore, universal by construction.
A comprehensive discussion of soundness and completeness is beyond of the scope of this paper. However, we can provide an outline description by considering the axioms of Boolean algebra:
-
,
-
,
-
,
-
,
-
,
-
,
-
,
-
,
where .
The diagrammatic formalism can be used to design, analyze, and optimize circuits. We shall now present some examples.















Although as a syntax, Boolean algebra is more concise as compared to string diagrams, the latter approach is more amenable to visual intuition which is useful for a circuit designer or analyst.
In summary, we have presented a general string diagrammatic formalism for wave-based logic circuits. Our work comes against the backdrop of a recent surge of interest and success in applying string diagrams to many different branches of science and technology.34,36–46
The formalism is device-independent and hence useful as a visual, intuitive aid to design, optimize, and analyze circuits in different physical platforms that are based on wave-based or majority-logic-based computation. Some such technologies include quantum-dot cellular automata,55 nanomagnet logic,58 single-electron circuits,59 graphene spin circuits,56 spin torque majority gates,57 molecular scale electronics,54 and DNA computing.53
A major advantage of our approach lies in its immediate applicability to spin-wave logic circuits,5,27 in the sense that the components of the circuit diagrams map directly to their physical counterparts. In other words, “what you see is what you get.” The formalism, moreover, provides a theoretical framework for various spin-wave logic implementations such as those in Refs. 20, 21, and 27–29.
In addition, diagrammatic rewrite rules allow graphical simplification of circuits which potentially lend themselves to automation and/or software-based optimization.


Another way to conceive of our formalism is as a diagrammatic alternative to symbolic Boolean algebra. There lies the possibility of a new axiomatization of Boolean algebra where some aspects of traditional axioms are taken care of by the graphical formalism. This line of thought will be the topic of future work.
M.H.W. was supported by Rhodes Trust and Magdalen College, Oxford.
AUTHOR DECLARATIONS
Conflict of Interest
The authors have no conflicts to disclose.
Author Contributions
Muhammad Hamza Waseem: Conceptualization (lead); Investigation (lead); Methodology (supporting); Writing – original draft (lead), Writing – review & editing (equal). Alexy Davison Karenowska: Methodology (lead); Project administration (lead); Supervision (lead); Writing – original draft (supporting); Writing – review & editing (equal).
DATA AVAILABILITY
The data that support the findings of this study are available from the corresponding authors upon reasonable request.