Fluid Quantum Logic: Zero-Shot Reprogrammability via Ancilla Superposition
Abstract
This paper demonstrates that quantum circuits exhibit native computational primitives that can be reprogrammed without training by rotating ancilla qubits. Using a 6-qubit reprogrammable logic unit simulated on classical hardware, we achieve 100% accuracy on AND, OR, and XOR operations across all four input combinations with zero parameter updates.
The key insight: operations are inherent to circuit geometry, not learned representations.
The Big Idea
Classical neural networks learn by updating weights over thousands of iterations. We asked: Can a quantum circuit compute without learning?
The answer is yes. By treating the circuit’s topology as a geometric primitive, we can perform perfect logic operations, detect audio rhythms, and filter noise—all with zero training epochs. We call this Fluid Quantum Logic, where the “software” (the function) is just a quantum state applied to the “hardware” (the topology).
This frames the Quantum Processor not as a fixed ASIC, but as a Quantum FPGA. The hardware remains static, but by placing the control qubits in superposition, we can execute multiple logic gates simultaneously on the same data. The instruction set itself becomes a quantum wave function.
Loading PDF...
Resources
Core Contribution: The Quantum FPGA Paradigm
Classical FPGAs reconfigure hardware via lookup tables—one function at a time, sequentially between compute cycles. Our architecture inverts this: the circuit topology remains fixed, but ancilla qubits in superposition select the function.
The result is something unprecedented: placing the ancilla in state |OR⟩ + |AND⟩ executes both operations simultaneously on the same input, producing interference patterns impossible in any classical system. The instruction set architecture (ISA) itself becomes a quantum wave function.
This is field programmability via state preparation—where “reprogramming” means rotating a qubit, not recompiling a circuit.
Key Results
1. Instant Logic: AND/OR/XOR with Zero Training
The 6-qubit Universal Logic Unit achieves perfect accuracy on AND, OR, and XOR without any training:
| Gate | Input 00 | Input 01 | Input 10 | Input 11 | Accuracy |
|---|---|---|---|---|---|
| AND | 0 | 0 | 0 | 1 | 100% |
| OR | 0 | 1 | 1 | 1 | 100% |
| XOR | 0 | 1 | 1 | 0 | 100% |
Operations are selected via ancilla rotation: [0, π, 0] for AND, [π, 0, 0] for OR, [0, 0, π] for XOR. All three gates use the same underlying topology, differing only in ancilla control.
2. The Geometry Limit: Why Topology Matters
Automated search reveals that only 4 of 16 possible 2-input Boolean functions are native to the circuit topology:
- Discoverable (≥95% accuracy): AND, OR, XOR, FALSE
- Not discoverable: NAND, NOR, XNOR, IMPLY, and 8 others
This establishes that computational power emerges from geometric structure, not arbitrary programmability. The topology defines a “basis set” of operations analogous to an ISA in classical computing. NAND/NOR require architectural changes (additional gates or wires).
3. Quantum Coherence: 43% Deviation from Classical Predictions
When attention mechanisms are placed in superposition, we measure 43% deviation from classical predictions:
| Condition | Attention | P(Coherent) |
|---|---|---|
| Baseline | [0, 0] | 0.042 |
| Horizontal Only | [π, 0] | 0.930 |
| Vertical Only | [0, π] | 0.934 |
| Superposition | [π/2, π/2] | 0.499 |
Classical prediction: (0.930 + 0.934) / 2 = 0.932. The 43% deviation validates genuine quantum interference—attention in superposition produces quantum coherence, not classical averaging.
4. Discrete Collapse: Bistability Revealed by Sampling
A critical methodological correction: expectation values hide bistability. The expectation of superposition |0⟩+|1⟩ equals 0, the same as a 50/50 classical mixture. Sampling reveals discrete flips:
WITH Scene Layer (200 shots):
- 00 (neither): 37 (18%)
- 01 (VERTICAL): 61 (30%)
- 10 (HORIZONTAL): 74 (37%)
- 11 (both): 28 (14%)
- Bimodal samples: 135/200 (67%)
WITHOUT Scene Layer: Bimodal drops to 39%. The Scene Layer (BasicEntanglerLayers) creates the entanglement needed for discrete state collapse.
5. Universal Primitives: From Vision to Audio
The XOR primitive generalizes from vision (spatial) to audio (temporal) with zero modification:
| Transition | XOR Output | Expected | Accuracy |
|---|---|---|---|
| Silence → Silence | 0 | 0 | 100% |
| Silence → Sound | 1 | 1 | 100% |
| Sound → Silence | 1 | 1 | 100% |
| Sound → Sound | 0 | 0 | 100% |
Same circuit, different domain—the pure quantum primitive outperforms the previously trained CNOT-RY approach (~50% accuracy).
6. NISQ-Ready: Noise Robustness at Real Error Rates
XOR primitive maintains 100% accuracy even at 10% depolarizing noise:
| Noise Level (p) | XOR Accuracy |
|---|---|
| 0.00 (ideal) | 100% |
| 0.05 | 100% |
| 0.10 | 100% |
Since function is determined by circuit structure rather than learned parameters, there are no trainable values to drift under calibration changes. Geometry-based gates survive NISQ-era noise better than trained parameterized circuits.
7. Platform Independence: Validated Across Frameworks
Results validated on both PennyLane (default.qubit) and Qiskit (aer_simulator), confirming platform independence and ruling out simulator-specific artifacts.
Architecture
The circuit architecture is inspired by Joscha Bach’s Request-Confirmation Network (RCN) model and Integrated Information Theory, using quantum phenomena (superposition, entanglement, measurement collapse) to naturally implement cognitive patterns without learned parameters.
6-Qubit Universal Logic Unit:
- Wires 0-1: Input qubits (A, B) encoded via RX rotations
- Wire 2: Output qubit measured via Pauli-Z
- Wires 3-5: Ancilla qubits controlling gate selection
Gate Implementations:
- AND: Pure Toffoli gate
- OR: De Morgan’s law via input inversion
- XOR: Parity detection via CNOTs
Implications
This work suggests a paradigm shift in quantum algorithm design: exploit inherent circuit structure rather than training parameterized circuits via gradient descent. The approach avoids barren plateaus, eliminates training time, and yields interpretable operations.
For consciousness modeling, the experiments validate Bach’s RCN requirements: coherence maximization (43% interference), perceptual bistability (62-76% discrete collapse), attention modulation (quantum control via ancilla), and hierarchical binding (3-layer architecture).
Citation
@software{close_2025_fluid_quantum_logic,
author = {Close, Larsen},
title = {Fluid Quantum Logic: Zero-Shot Reprogrammability
via Ancilla Superposition},
month = nov,
year = 2025,
publisher = {Zenodo},
version = {v1.0.0},
doi = {10.5281/zenodo.17677140}
}
Patent Status
This work is patent pending under USPTO Application 63/921,961 (filed November 20, 2025).