Papers
Topics
Authors
Recent
2000 character limit reached

Quantum Stack Machines Overview

Updated 28 November 2025
  • Quantum Stack Machines are quantum-enhanced multi-stack automata that replace classical stack operations with unitary transformations on Hilbert spaces.
  • They achieve Turing completeness with two stacks and enable probabilistic computation through quantum interference and coherent branching.
  • Their framework integrates coalgebraic and monadic formalisms, connecting automata theory with applications in language recognition and combinatorial sorting.

A quantum stack machine (QSM) is a generalization of classical multi-stack automata in which the stack/control logic is governed by quantum principles, typically formalized by replacing transition relations and stack-update rules with unitary transformations on a finite-dimensional Hilbert space indexed by the control state and machine configuration. QSMs synthesize the higher expressiveness of multi-stack pushdown automata—reaching Turing completeness with two stacks—with the probabilistic amplitudes and coherent branching of quantum automata, providing a natural quantum analog of pushdown machines with potentially enhanced computational features (Qiu, 21 Nov 2025).

1. Formal Definitions and Machine Model

In the most canonical setting, a quantum stack machine with kk stacks is a tuple

(Q,Σ,Γ,Δ,{Ut}tΣΔΓ1,,k(),q0,F)(Q,\Sigma,\Gamma,\Delta,\{U_t\}_{t\in\Sigma\cup\Delta\cup\Gamma_{1,\dots,k}(\updownarrow)}, q_0, F)

where:

  • QQ is a (finite) set of control states.
  • Σ\Sigma is the input alphabet.
  • Γ\Gamma is the stack alphabet (shared or separated per stack).
  • Δ\Delta is a (possibly empty) auxiliary alphabet for tape-like operations.
  • Each UtU_t is a unitary operator over the Hilbert space HQ\mathcal{H}_Q (the state amplitude space), indexed by tt ranging over input/auxiliary symbols and all stack operations on the kk stacks.
  • q0Qq_0\in Q is the initial state; FQF\subseteq Q is the set of accepting states.
  • Γ1,2,,k()\Gamma_{1,2,\dots, k}(\updownarrow) encodes all simultaneous kk-stack push/pop/no-op operations:
    • For each stack i=1i=1 to kk, Γi()={X(i,):XΓ}\Gamma_{i}(\downarrow)=\{X(i,\downarrow): X\in\Gamma\} and Γi()={X(i,):XΓ}\Gamma_{i}(\uparrow)=\{X(i,\uparrow): X\in\Gamma\}.
    • Validity requires that each individual stack trace (the list of \downarrow, \uparrow operations) is balanced (push–pop matched), i.e., never underflows and returns empty at computation end.

A computation on input xΣx\in\Sigma^* is specified via a string

s(ΣΔΓ1,,k())s\in (\Sigma\cup\Delta\cup\Gamma_{1,\dots,k}(\updownarrow))^*

where

  • The projection [s]Σ[s]_\Sigma equals xx.
  • Each projected stack operation is valid as described above.

The acceptance probability is then

Pa(x)=supsSxqFqUsq02P_a(x)=\sup_{s\in S_x}\sum_{q\in F}\left|\langle q | U_s | q_0\rangle\right|^2

where UsU_s denotes the ordered product of the UtU_t operators in ss and SxS_x is the set of all valid interleavings for xx (Qiu, 21 Nov 2025).

2. Classical Stack Machines: From Automata to Turing Equivalence

Classical stack machines are state machines equipped with stack memory(s). The deterministic two-stack model defines machine M=(Q,Σ,Γ,Δ,δ,q0,F)M=(Q,\Sigma,\Gamma,\Delta,\delta, q_0, F) where the transition function

δ:Q×(ΣΔΓ1,2())Q\delta: Q\times (\Sigma\cup\Delta\cup\Gamma_{1,2}(\updownarrow))\to Q

controls state evolution, input consumption, and stack operations.

  • A DFA is a trivial two-stack machine with Γ=\Gamma=\emptyset, i.e., no stacks.
  • A one-stack pushdown automaton (PDA) arises by restricting all stack operations to one stack (B=εB=\varepsilon in Γ1,2()\Gamma_{1,2}(\updownarrow)).
  • Both the classical and so-called "Watrous" models for 1-stack PDAs (PDA-I and PDA-II) recognize the CFLs; every language recognized by a classical PDA can be recognized by a PDA-II and vice versa (Qiu, 21 Nov 2025).

A major result: two-stack machines are Turing-complete. Any Turing machine can be simulated by a two-stack machine in real time (by encoding the left and right of the Turing tape on each stack in reverse/conventional order), and conversely, two-stack machines may be simulated by Turing machines via explicit state encoding (Qiu, 21 Nov 2025, Goncharov et al., 2014).

3. Embedding and Hierarchies: Stack Machines, DFAs, PDAs, and Quantum Extensions

Multi-stack machines uniformly generalize DFAs and PDAs:

Automaton Type Stack Alphabet Γ\Gamma Stacks Used Expressive Power
DFA \emptyset None Regular languages
1-Stack PDA (PDA-II) Nonempty Stack 1 only Context-free languages (CFL)
2-Stack Machine Nonempty Both stacks Recursively enumerable (r.e., Turing)
Quantum Stack Machine (QSM) Nonempty Both/Multiple Quantum generalization; see below

In the quantum case, restricting stack operations and input types yields quantum PDAs (QPDA-II), quantum finite automata (QFA), or full-fledged quantum two-stack machines (Q2SM-II) (Qiu, 21 Nov 2025). The configuration semantics parallels the classical situation, but instead of deterministic/nondeterministic transitions, computation flows are governed by unitary evolution and interference.

QSMs, like classical multi-stack machines, admit a strict hierarchy:

  • One-stack QSMs (quantum pushdown automata) generalize QFAs but are strictly weaker than Q2SM-IIs and quantum Turing machines.
  • Two (or more) stack QSMs are quantum Turing-equivalent, admitting efficient simulation and equivalence with their classical counterparts but potentially leveraging quantum parallelism (Qiu, 21 Nov 2025).

4. Coalgebraic and Monadic Formalizations

The algebraic and coalgebraic framework of Goncharov–Milius–Silva provides a generic abstract setting for stack machines, including quantum extensions (Goncharov et al., 2014). In this formalism:

  • A TT-automaton is a coalgebra m:XB×(TX)Am: X\to B\times (TX)^A for state set XX, output algebra BB, and stack monad TT modeling mm stacks.
  • The mm-stack monad TT is characterized as a subfunctor of the store monad S(X×S)SS\mapsto (X\times S)^S restricted by the locality axioms: transitions do not depend on arbitrarily deep stack content, only a fixed depth kk.
  • For m2m\geq 2, nondeterministic TT-automata correspond to Turing machines running in linear time; incorporating "silent" moves recovers recursively enumerable languages.

The categorical semantics enables the uniform expression and comparison of classical and quantum stack machines as specific instances of TT-automata, with quantum extensions modeled via the passage from sets to Hilbert spaces and unitaries (Goncharov et al., 2014).

5. Illustrative Examples and Computational Power

Several representative languages illustrate the power of (quantum) two-stack machines (Qiu, 21 Nov 2025):

  • Leq={0n1n2n:n0}L_{eq}=\{0^n1^n2^n: n\geq 0\} is recognized by a two-stack machine: one stack tracks 0s/1s balance, the second matches 1s/2s.
  • Lw={w#w:w{0,1}}L_w=\{w\#w: w\in\{0,1\}^*\} is recognizable by pushing/popping stacks coordinated with the separator.
  • Unary language LwwRL_{ww^R} (mirror) requires nondeterminism in the one-stack model but is feasible in two stacks.

Transitioning to the quantum case, these construction patterns generalize to superpositions, allowing quantum stack machines to potentially outperform classical analogs in language recognition, though the full extent of such quantum speedups remains an open area of investigation.

Recent work on generalizations of checking stack automata (CSAs) contextualizes the power and limitations of multi-stack (classical) machines (Ibarra et al., 2022). In particular:

  • Deterministic multi-stack CSAs (with heads and stacks) are equivalent to multi-head two-way DFAs and recognize LOGSPACE, strictly less than the power of general two-stack pushdown (Turing-complete) machines.
  • Nondeterministic variants quickly reach Turing completeness with two stacks, reflecting the collapse of hierarchies seen in PDA versus multi-stack settings.
  • Space-limited and hybrid models exhibit a spectrum between tractable and intractable behaviors, depending on allowed stack and head resources.

A plausible implication is that quantum analogs of CSAs may exhibit similarly nuanced expressive boundaries, but the literature in the supplied data does not elaborate explicit correspondences.

7. Connections to Sorting Machines and Pattern-Avoiding Networks

Although traditional quantum stack machines focus on language acceptance, an important parallel thread concerns specialized stack-based sorting devices, such as series of restricted stacks or pop stacks (Smith et al., 2013, Baril et al., 2020). These sorting machines act on permutations, classified by forbidden patterns or more intricate divided-pattern generalizations.

While these results are not yet transposed into the quantum computing domain per se, the formal apparatus underlying quantum stack machines is equally expressive:

  • Pop stacks and their series analogs can be modeled as restricted stack submonads or automata, providing a clear route for analysis within the coalgebraic framework.
  • The enumeration of sortable permutations (e.g., yielding Catalan, Schröder, or binomial-transformed Catalan numbers) provides a link between structural language theory and stack machine expressivity over combinatorial objects (Baril et al., 2020).

This suggests that quantum stack machines could, in principle, implement and potentially enrich such sorting processes via quantum branching and interference, although concrete separations or advantages remain to be explicitly demonstrated.


References:

Slide Deck Streamline Icon: https://streamlinehq.com

Whiteboard

Forward Email Streamline Icon: https://streamlinehq.com

Follow Topic

Get notified by email when new papers are published related to Quantum Stack Machines.