String Diagrams for Quantum Foundations, Computing and Natural Language Processing
Abstract: Applied category theory provides powerful mathematical tools for modelling processes and their composition. Symmetric monoidal categories, which involve series and parallel composition, are particularly well-suited for describing the composition of processes in space and time. Also called process theories, they admit string diagrams, which constitute a visually intuitive, mathematically rigorous, expressive and flexible syntax that is applicable to wide-ranging scientific domains. In this thesis, we employ string diagrams to investigate a selection of topics in the areas of quantum foundations, computing, and natural language processing: (1) We formalise constructor theory as a process theory. In the context of quantum physics, we also demonstrate the conflict between constructor-theoretic principles of locality and composition. Moreover, we argue that if the principle of locality is rejected, categorical quantum mechanics (CQM) can be conceived as a constructor theory of quantum physics. (2) We develop a formalism for wave-based logic circuits with phase encoding. We motivate the formalism using the example of spin-wave circuits, and then demonstrate its utility in design, analysis and optimisation of Boolean logic circuits. (3) We investigate the elimination of inter-language grammatical bureaucracy in the distributional compositional circuits (DisCoCirc) framework. In particular, we develop a hybrid grammar for a restricted fragment of the Urdu language, and show that Urdu text endowed with this hybrid grammar maps surjectively to DisCoCirc text circuits. Furthermore, we show that for the same language fragment, Urdu and English text circuits become the same up to gate-level translation. The aforementioned work supports the view that a process-relational outlook in science is well-supported by applied category-theoretic tools, particularly string diagrams.
Paper Prompts
Sign up for free to create and run prompts on this paper using GPT-5.
Top Community Prompts
Explain it Like I'm 14
What is this paper about?
This thesis is about using pictures (called string diagrams) as a precise, math-based way to think about how things happen and how they fit together. Instead of focusing on static objects, it focuses on processes: little boxes that do something, with wires showing what goes in and what comes out. The author uses this picture-language to study three areas:
- the deep rules behind quantum physics,
- new kinds of computing that use waves,
- and how sentences in languages like English and Urdu can be turned into circuits that capture their grammar and meaning.
The big questions it asks
In simple terms, the thesis explores three questions:
- Can we describe “what can be done” in physics (constructor theory) using the same picture-language that describes processes? And does this agree with how quantum physics actually behaves?
- How can we design and improve computers that compute using waves (like ripples), by drawing and rewriting diagrams instead of doing long equations?
- Can we turn sentences from different languages into the same kind of circuit, so that grammar differences don’t get in the way of meaning?
How the author studies these questions
Think of string diagrams like LEGO for science:
- Boxes are mini-machines (processes) that transform inputs into outputs.
- Wires are the types of things that flow through the machines (like “a qubit,” “a word,” or “a wave”).
- You can connect boxes in series (one after another in time) or in parallel (side by side, at the same time). This mirrors how real systems combine.
Using this toolkit:
- For quantum foundations: the author formalizes constructor theory (a program that classifies which transformations are possible or impossible in principle) inside the process-diagram framework. He also examines a “locality” idea in quantum theory (roughly: only nearby things directly affect each other) using a particular formalism (Deutsch–Hayden descriptors).
- For wave computing: the author models logic gates built from waves, where a 0 or 1 is stored in the wave’s phase (think of the timing of ripples—whether two waves line up or cancel out). He draws circuits as diagrams and uses diagram rules to design, analyze, and optimize them.
- For language: the author uses Distributional Compositional Circuits (DisCoCirc), where words are boxes and grammar is the wiring. He builds a “hybrid grammar” for a piece of Urdu and shows how Urdu and English sentences can be turned into equivalent circuits, meaning the diagram structure captures meaning beyond surface grammar.
If a term feels technical, here’s an everyday anchor:
- Process theory: like a flowchart where steps can be chained or run in parallel.
- String diagram: the flowchart itself, but with strict math meaning.
- Phase encoding: two waves can represent 0 and 1 not by loudness, but by whether their ripples are “in step” or “out of step.”
- Surjective mapping: every circuit you care about comes from at least one sentence (nothing is “missing”).
- Gate-level translation: two circuits have the same shape, but the labels on the boxes (gates) use different language tags.
What the author found and why it matters
Here are the main results, explained plainly:
- Quantum foundations and constructor theory
- Result: The author shows how to treat constructor theory (“which tasks can be done?”) as a process theory drawn with string diagrams. Inside quantum physics, he finds a clash between two constructor-theory ideas: locality (only nearby influences) and composition (you can combine possible tasks into bigger possible tasks). Using the Deutsch–Hayden approach, he demonstrates that insisting on both at once doesn’t fit well with quantum behavior.
- Why it matters: This clarifies how quantum reality is “non-local” in the sense that correlations can’t always be built by strictly local pieces. It also shows that if you relax locality, a well-developed diagrammatic framework called Categorical Quantum Mechanics can serve as a constructor theory for quantum physics. This links two big ideas under one clear, visual umbrella.
- Wave-based computing with phase-encoded logic
- Result: The author creates a full diagram language to design and reason about logic made from waves (e.g., spin-waves in magnetic materials). He uses it to design circuits, predict how they behave, and optimize them (e.g., reduce parts, simplify layouts) using simple diagram rewrites.
- Why it matters: As we explore new hardware (beyond standard electronics), this gives engineers a powerful, visual method to prototype and improve wave computers. It can save effort, cut errors, and point to more efficient designs without heavy algebra.
- Language circuits for English and Urdu
- Result: The author builds a hybrid grammar for a slice of Urdu and shows that every target circuit in this framework is reachable from some Urdu sentence (surjectivity). He then proves that, for the same fragment of language, English and Urdu produce the same circuits up to a relabeling of gates.
- Why it matters: It suggests a path toward meaning-focused, language-independent understanding. If different languages map to the same circuit structures, then machines (or people) can focus on meaning and composition, not on surface grammar differences. This is encouraging for cross-lingual NLP and translation.
What could this change or lead to?
- Unifying viewpoint: Seeing science through processes and diagrams makes complicated ideas more manageable and consistent across fields.
- Quantum tech: Cleaner thinking about what’s truly “local” or “composable” may guide how we design quantum protocols and reason about their limits.
- New hardware: Diagram-first design for wave computers could speed up innovation in spin-wave and photonic technologies, possibly leading to faster or more energy-efficient logic.
- Language technology: If circuits capture meaning beyond grammar, we can build tools that understand multiple languages in a shared, structured way, improving translation and cross-lingual reasoning.
- Education and accessibility: Because the diagrams are both visual and rigorous, they can make advanced topics in quantum physics and computing easier to learn—already shown to help high school students grasp core quantum ideas.
In short, the thesis argues that a process-first, diagram-based approach is a powerful common language for physics, computing, and linguistics—one that can clarify deep questions, streamline design, and bridge across human languages.
Knowledge Gaps
Knowledge gaps, limitations, and open questions
Below is a consolidated list of gaps and open questions that remain unresolved and could guide future research:
- Constructor theory in Rel: formalise substrates, conceivable/possible tasks, and their closure properties beyond Rel, and determine conditions under which “possible tasks” form a sub–symmetric monoidal category (e.g., in FHilb, CPM, stochastic, or probabilistic categories).
- Locality–compositionality conflict: provide a principled resolution strategy (axiom modifications, alternative descriptors, or weakened locality) and derive experimentally testable consequences distinguishing competing principles.
- CQM as constructor theory: specify exact constructor-theoretic axioms satisfied/violated by categorical quantum mechanics, prove soundness/completeness of the identification, and exhibit counterexamples where the mapping fails.
- Explicit constructors: develop a resource-theoretic account of constructors (time, energy, precision, noise, thermodynamic cost), and analyse compositional closure, reversibility, and scalability of tasks under realistic constraints.
- Alternative categorical bases for conceivable tasks: assess limitations of Rel and explore Set, Profunctors, or enriched categories; characterise how the choice impacts task compositionality, locality, and physical interpretability.
- Higher-order processes and indefinite causal order: clarify whether the presented frameworks accommodate process matrices or higher-order morphisms, and how these affect locality, composition, and constructor-theoretic tasks.
- Measurement problem within process theories: give a concrete process-theoretic model reconciling “two dynamical laws” (unitary and measurement) and demonstrate how CQM or CT handles measurement without ad hoc postulates.
- Cups/caps assumptions: relax the self-duality and symmetry of cups/caps and analyse implications for process–state duality, transpose/adjoint/conjugate definitions, and the physical interpretability in the applications.
- Wave logic scope: extend the phase-only encoding formalism to amplitude/phase, multi-frequency, and multipath encodings; derive sound rewrite rules for dispersion, losses, nonlinearity, and material anisotropy.
- Physical validation: provide hardware experiments or high-fidelity simulations on spin-wave platforms validating the diagrammatic optimisations; benchmark against standard electronic design automation (area, latency, energy, robustness).
- Error models for wave logic: formalise compositional error/jitter (phase noise, cross-talk, interference misalignment) within the diagrams and prove correctness guarantees for rewrites under uncertainty (robustness bounds, sensitivity analyses).
- Sequentiality and memory: incorporate fan-out, feedback, latches/memory, and clocking/synchronisation constraints into the wave-based diagrammatic framework; determine design rules preventing unintended interference.
- Rewrite system properties: establish termination, confluence, and completeness of the proposed wave-logic rewrite rules, and quantify optimisation limits (lower bounds on gate count/area/latency under physical constraints).
- Tooling and scalability: specify algorithms and release software for automated diagram rewriting and optimisation in wave logic; evaluate computational complexity and scalability on large circuit instances.
- Scope of Boolean-only treatment: assess applicability to non-Boolean or analog computation (multi-valued logic, neuromorphic wave computing) and define corresponding diagrammatic primitives and correctness criteria.
- DisCoCirc grammar coverage: extend the Urdu hybrid grammar beyond the restricted fragment to include nested subordinate/relative clauses, non-projective dependencies, agreement, case marking, and rich morphology; identify constructions that break surjectivity.
- Empirical evaluation: test English↔Urdu circuit equivalence on real parallel corpora; define metrics for semantic fidelity and circuit invariance, and analyse failure cases (polysemy, idioms, ambiguity, code-switching).
- Semantics preservation: clarify how distributional semantics integrates with gate-level circuit translations, and assess whether equivalence of circuits preserves semantic similarity across languages in practice.
- Cross-linguistic generality: investigate typologically diverse languages (agglutinative, polysynthetic, free word order) to identify necessary and sufficient grammatical conditions for DisCoCirc circuit convergence and language-independence.
- Computational learnability: explore automatic induction of hybrid grammars and circuit mappings from data; quantify sample complexity, noise tolerance, and generalisation across domains and languages.
- Integration across domains: provide unified case studies showing how the process-relational approach yields cross-domain benefits (quantum, wave computing, NLP), and define criteria guiding when diagrammatic vs algebraic methods are preferable.
Practical Applications
Immediate Applications
The following items translate the thesis’s concrete methods and results into deployable uses. Each bullet names the application, indicates sectors, outlines possible tools/products/workflows, and lists key assumptions/dependencies.
- Wave-logic circuit design and optimization workflow (semiconductors, photonics, RF, magnonics)
- What: Use the string-diagram formalism for phase-encoded wave-based logic to design, analyze, and optimize small-to-medium Boolean circuits (e.g., logic primitives, combinational blocks) implemented with interferometric components or spin waves.
- Tools/products: A lightweight EDA plugin or Python notebook library for diagrammatic synthesis and rewrite-based optimization; rule sets (e.g., associativity/phase rules) to reduce component count, path-length mismatch, and phase error; export to device-level simulators.
- Assumptions/dependencies: Accurate mapping from physical device parameters (loss, dispersion, coupling, phase stability) to the diagram semantics; access to fabrication/process design kits; validity of phase-encoding over operating conditions.
- Cross-lingual, grammar-light semantic parsing in constrained domains (software, NLP; education; public-sector digital services)
- What: Apply the hybrid grammar and DisCoCirc mapping to build English–Urdu semantic parsers for restricted sentence fragments, enabling consistent, language-independent text circuits for downstream tasks (e.g., rule-based NLU, intent classification, controlled translation).
- Tools/products: A front-end parser that maps input sentences to DisCoCirc circuits; circuit-level equivalence checks for cross-lingual consistency; educational demos illustrating language-independence of meaning composition.
- Assumptions/dependencies: Coverage limited to the supported fragment; requires curated lexica and category assignments; integration with statistical/LLM components for open-text handling.
- Explainable language technology for low-resource users (software, education, public interest tech)
- What: Provide circuit-level “meaning flow” visualizations for Urdu and English that are isomorphic up to gate labels, aiding explainability in bilingual interfaces (e.g., citizen-service chatbots, educational platforms).
- Tools/products: Viewer for text circuits with synchronized bilingual labeling; QA/intent templates specified once and reused across languages via circuit identity.
- Assumptions/dependencies: Restricted constructions; need UX that makes process diagrams comprehensible to non-experts.
- Foundational modeling of “tasks” for capability analysis (academia; software verification; systems engineering)
- What: Use the process-theoretic formalization of constructor theory (possible vs. conceivable tasks in Rel; sub-SMC of possible tasks) to model capabilities and constraints in complex workflows (e.g., cyber-physical systems, protocol stacks).
- Tools/products: Category-theory modeling notebooks; pattern libraries for composing capabilities and checking closure under composition.
- Assumptions/dependencies: Domain abstraction must preserve relevant causal structure; practitioners comfortable with categorical modeling or supported by domain-specific templates.
- Quantum education and workforce upskilling via Quantum Picturalism (education; workforce development)
- What: Deploy string-diagram-based curricula to teach core quantum concepts and compositional reasoning to pre-university and early undergraduate learners, leveraging empirically validated teaching materials.
- Tools/products: Modular course packs, problem sets, and visual assessment tools; alignment with “Quantum in Pictures” materials.
- Assumptions/dependencies: Instructor familiarity with diagrammatic methods; alignment with local standards; access to visual teaching aids.
- Early-stage guidance for distributed quantum protocol design (software for quantum; telecom)
- What: Use the shown tension between locality and compositionality (Deutsch–Hayden setting) as a design caveat for composing distributed quantum tasks, informing architecture reviews and protocol decomposition.
- Tools/products: Checklist/guidelines embedded in protocol design docs; unit tests that detect composition-induced nonlocal dependencies in toy models.
- Assumptions/dependencies: Conceptual (qualitative) guidance; quantitative impact depends on the chosen formalization in specific stacks.
Long-Term Applications
The items below extrapolate likely trajectories that require additional research, scaling, or engineering before broad deployment.
- Magnonic/spin-wave and interferometric co-processors for ultra-low-power logic (semiconductors, edge AI, IoT)
- What: Hardware accelerators implementing Boolean (and hybrid analog–digital) functions via wave interference, designed/compiled with the thesis’s diagrammatic formalism.
- Tools/products: A full-stack EDA/DSL for wave logic (front-end diagrams → rewrite optimization → layout/sizing → physical simulation); heterogeneous integration with CMOS.
- Assumptions/dependencies: Advances in low-loss materials, phase control, on-chip clocking/synchronization, thermal stability, and reliable I/O; yield-aware layout; design libraries of robust primitives.
- Unified diagrammatic IR and compilers across physical compute fabrics (quantum, photonics, magnonics, classical) (software, EDA)
- What: A string-diagram intermediate representation with backend-specific rewrite systems enabling cross-domain optimization and co-design, including ZX-inspired passes where applicable.
- Tools/products: Multi-target compiler; certified rewrite libraries; integration with existing open-source EDA and quantum compilers.
- Assumptions/dependencies: Community agreement on IR schemas; verified equational theories per platform; vendor participation for backend calibration.
- Language-agnostic, explainable NLU for low-resource languages (software, public sector, education)
- What: Scale DisCoCirc-based circuits to broader grammar coverage and additional languages, enabling stable cross-lingual semantics, transparent reasoning, and sample-efficient learning.
- Tools/products: Hybrid symbolic–neural models where circuit structure constrains neural components; circuit-level data augmentation; interpretable model reports tied to circuit gates.
- Assumptions/dependencies: Expansion beyond the restricted fragment; efficient parsing to circuits at scale; evaluation pipelines and benchmarks for explainability and robustness.
- Compositional verification of quantum network protocols and cryptography (software verification; telecom; security)
- What: Leverage “constructor theory as CQM” to specify, compose, and verify end-to-end tasks in quantum networks (entanglement distribution, delegated computation, composable security), with explicit attention to nonlocal effects in composition.
- Tools/products: Proof assistants for string diagrams; certified libraries for common protocol patterns (teleportation, QKD, error correction).
- Assumptions/dependencies: Mature categorical semantics for target stacks; integration with practical simulators and formal methods; scalability of diagrammatic proofs.
- Standards and policy for transparent AI and inclusive STEM education (policy; standards bodies; education)
- What: Promote diagrammatic, language-independent meaning representations as an optional interoperability layer for explainable AI; adopt diagram-based quantum curricula to broaden participation.
- Tools/products: Draft standards for semantic circuit exchange; curriculum frameworks and teacher training modules.
- Assumptions/dependencies: Stakeholder buy-in; evidence on learning outcomes and model transparency; tooling to ease adoption.
- Domain-specific wave-compute applications in sensing and signal processing (healthcare diagnostics, communications, robotics)
- What: Interferometric logic and filtering blocks for front-end signal processing (e.g., RF pre-processing, compact matched filters, lab-on-chip interferometric decision elements) synthesized via diagrammatic rules.
- Tools/products: Design kits for domain-tailored wave blocks; co-design methodologies with sensors/antennas; embedded controllers interfacing with wave logic.
- Assumptions/dependencies: Reliability of phase-sensitive hardware in target environments (vibration, temperature, biofouling); co-integration with transducers; regulatory approval where applicable.
- Capability-oriented systems engineering using process theories (aerospace, manufacturing, logistics)
- What: Plan and validate complex mission/task compositions by reasoning about “possible tasks” as a compositional subcategory, including reversibility and closure properties.
- Tools/products: Modeling workbenches with categorical backends; libraries of composable task patterns; what-if analysis via relational semantics.
- Assumptions/dependencies: Bridging from abstract categorical models to operational constraints and uncertainty; training and tooling for practitioners.
Across all items, feasibility hinges on the availability of robust rewrite engines for string diagrams, validated physical abstractions (for wave hardware), expanded grammar coverage (for NLP), and community tooling that lowers the barrier to adopting process-theoretic methods.
Glossary
- Adjoint: The vertical reflection of a process; in quantum settings it corresponds to the Hermitian adjoint (dagger). "The adjoint ft of f is given by its vertical reflection"
- Applied category theory: A branch of mathematics using category-theoretic tools to model and reason about processes across domains. "Applied category theory provides powerful mathematical tools for modelling processes and their composition."
- Cap effect: A special two-system effect paired with a cup state, used to express “yanking”/snake equations. "a two-system effect o, called a cap effect"
- Categorical quantum mechanics (CQM): A process-theoretic (categorical) formulation of quantum theory emphasizing compositionality. "Categorical quantum mechanics (CQM) is a process-theoretic framework to represent, char- acterise and reason about quantum processes"
- Coherence theorem: A result ensuring that non-strict monoidal categories behave “as if” strict for practical purposes. "Theorem 2.2.5 (Coherence theorem; Theorem 3.48 in [22])."
- Constructor theory: A framework that characterizes physics in terms of possible/impossible tasks and their composition. "We formalise constructor theory as a process theory."
- Cup state: A special two-system state that, with a cap effect, satisfies yanking/snake equations and enables process-state duality. "A two-system state y is called a cup state"
- Deutsch-Hayden descriptors: Objects used in the Deutsch–Hayden formulation of quantum theory to express locality. "3.3.2. Deutsch-Hayden Descriptors"
- DisCoCirc (Distributional Compositional Circuits): A categorical framework that models grammar and meaning of natural language as circuits. "distributional compositional circuits (DisCoCirc) framework."
- Entanglement: Non-separable correlations between quantum systems that cannot be reduced to properties of subsystems. "Following Schrödinger's observation that entanglement is 'the characteristic trait of quantum mechan- ics' [9],"
- Equivalence (of categories): A notion that two categories are “the same for all practical purposes,” related by an equivalence functor. "Every (symmetric) monoidal category C is equivalent to a strict (symmetric) monoidal category C'."
- Generalised Born rule: The diagrammatic expression for obtaining a scalar by composing a state with an effect. "This is known as the generalised Born rule."
- Interchange law: The compatibility condition between parallel and sequential composition in monoidal categories. "interchange law: (h&i)(f&g) = (hof)&(iog)."
- Isomorphism: A morphism with a two-sided inverse, witnessing that two objects are essentially the same. "The morphism f is then called an isomorphism."
- Isometry: A process U whose adjoint composed on the left yields identity; preserves inner products. "A process U is an isometry if it obeys the left equation only, and is a unitary if it also obeys the right equation:"
- Locality (principle of): The idea that physical properties are determined locally and that influences do not act instantaneously at a distance. "3.3.1. The Principle of Locality"
- Measurement-based quantum computing: A quantum computing model where computation proceeds via adaptive measurements. "measurement-based quantum computing [73, 74]"
- Orthonormal basis (ONB): A set of mutually orthogonal, normalized states that decomposes identities, cups, and caps. "An orthonormal basis (ONB) is a set of states"
- Partial trace: A map that traces out (forgets) part of a composite system, yielding a reduced process or state. "the partial trace is defined as"
- Process-state duality: A bijection between processes and states enabled by cups and caps in compact categories. "This bijective correspondence between processes and states is called the process-state duality."
- Process theory: A collection of systems and processes closed under meaningful composition; categorically, a symmetric monoidal category. "A process theory is defined to consist of:"
- Quantum Picturalism (QP): The diagrammatic approach to quantum theory emphasizing string diagrams and compositionality. "dubbed Quantum Picturalism [43]"
- Rel (category Rel): The category whose objects are sets and morphisms are relations; used to model conceivable tasks. "It takes the theory of conceivable tasks to be Rel,"
- Self-dual: A property where a system is canonically identified with its dual, allowing symmetric cups and caps. "We additionally assume that every system-type is self-dual"
- Snake equations: Identities expressing that a cup-cap pair “straightens” a wire, fundamental to compact closed structure. "These are sometimes called the snake equations."
- Strict monoidal category: A monoidal category where associativity and unit laws hold on-the-nose (as equalities). "A strict monoidal category C consists of:"
- Strict symmetric monoidal category: A strict monoidal category equipped with symmetry (swap) morphisms. "A strict symmetric monoidal category is a strict monoidal category with a swap morphism:"
- String diagrams: 2D graphical syntax for morphisms in (symmetric) monoidal categories capturing compositional structure. "String diagrams are two-dimensional graphical representations of morphisms (processes) in symmetric monoidal categories"
- Surjectively: In a many-to-one mapping sense; every circuit has at least one linguistic preimage. "maps surjectively to DisCoCirc text circuits."
- Swap morphism: The symmetry that exchanges parallel wires in a symmetric monoidal category. "a swap morphism: 0 A, B : A & B -> B & A"
- Symmetric monoidal category: A monoidal category with a natural symmetry that allows swapping the order of tensor factors. "From a category-theoretic perspective, a process theory is a strict symmetric monoidal category."
- Trace: The scalar obtained by closing a matching input-output wire of a process into a loop. "the trace is defined as"
- Transpose: The 180° rotation (via cup and cap) of a process, exchanging inputs and outputs. "The transpose fT of a process f is defined by bending the input and output wires in the opposite directions."
- Unitary: An isometry whose adjoint is also its inverse; preserves and reflects inner products. "and is a unitary if it also obeys the right equation:"
- Yanking equations: The equalities showing that a cup followed by a cap straightens a wire (a form of identity). "are called the yanking equations."
- ZX-calculus: A graphical calculus for quantum processes based on interacting spider nodes (Z and X), used for reasoning and optimization. "2.5. The ZX-calculus"
Collections
Sign up for free to add this paper to one or more collections.