I have an open-source-always philosophy. Today, that philosophy led to a 71% fidelity breakthrough on IBM’s 127-qubit Eagle processor.
The Origin Story
I’ve been building the Perceptual Grid Engine (PGE) for a while. Originally, it was an architecture for Artificial Intelligence—designed to help models maintain memory consistency and “object permanence” over long context windows.
It is based off of navigational techniques used by blind individuals like myself, as I do everything in a systematic grid-like pattern. I scan from left to right, down, then right to left until I have completed my task. Originally, I saw no reason why AI and now Quantum Computing shouldn’t do the same.
This morning, I stared at my architecture diagram and realized something strange. The logic I used to “hand off” memory states in AI looked suspiciously like Quantum Teleportation.
So I asked the dangerous question: Can I map my software-defined AI grid onto physical quantum hardware to solve the decoherence problem?
An hour later, I had my answer. I didn’t just run a simulation. I ran a Round-Trip Stress Test on ibm_fez (one of IBM’s utility-scale quantum processors). The results shocked me.
The Problem: Quantum Amnesia
In AI, if you lose context, the model hallucinates. In Quantum Computing, if you lose coherence, the qubit becomes noise.
Current quantum processors (QPUs) have a “T1 time” (coherence lifetime) of roughly 100-300 microseconds. If your calculation takes longer than that, your data dies. This is the biggest bottleneck in the industry.
Most researchers try to solve this with better hardware (shielding, colder fridges). I decided to solve it with better software logic.
The Solution: The Perceptual Grid Engine (PGE)
My hypothesis was simple: Don’t let the qubit die.
Instead of leaving data in a single qubit (Q0) until it rots, I adapted my PGE logic to “teleport” the state to a fresh qubit (Q2) the moment coherence starts to dip. Then, crucially, I wipe the original qubit clean and send the data back.
It’s effectively a Quantum RAM Refresh Cycle, derived entirely from AI consistency logic.
The Architecture
To make this work on real atoms, I had to use IBM’s latest Qiskit SDK v1.0 and the SamplerV2 primitive. The key was using Dynamic Circuits—specifically the if_test logic.
This isn’t a pre-recorded script. The hardware measures the “dying” qubit mid-flight, makes a classical logic decision (0 or 1), and fires a correction gate ($X$ or $Z$) to the fresh qubit before the data decays.
Here is the “Round Trip” engine that ran on the metal:
# The PGE "Ping-Pong" Protocol
# 1. Hop 1: Teleport q0 -> q2
# 2. Reset q0 (Mid-circuit wipe)
# 3. Hop 2: Teleport q2 -> q0 (Return home)
def create_round_trip_circuit():
qc = QuantumCircuit(qr, crz, crx, result)
# --- HOP 1: OUTBOUND ---
# Entangle & Teleport to Grid (q2)
qc.h(1)
qc.cx(1, 2)
qc.cx(0, 1)
qc.h(0)
qc.measure(0, crz)
qc.measure(1, crx)
# Real-time Hardware Correction
with qc.if_test((crx, 1)):
qc.x(2)
with qc.if_test((crz, 1)):
qc.z(2)
# --- THE CRITICAL STEP: RESET ---
qc.reset(0)
qc.reset(1)
# --- HOP 2: INBOUND ---
# Teleport back to Home (q0)
# ... (Repeat logic in reverse) ...
return qc
The Receipts: 71.9% Fidelity on ibm_fez
I didn’t want to rely on a simulator. Simulators are perfect; reality is noisy. I queued the job on the IBM Quantum Platform.
The Test:
- Initialize: Create a specific unbalanced superposition state on Q0 (Rx Rotation $pi/3$) creating a target distribution of roughly 75% $|0rangle$ / 25% $|1rangle$.
- Execute: Run the full Round-Trip circuit (Teleport $rightarrow$ Reset $rightarrow$ Return).
- Measure: Check if the data survived the loop.
The Results:
- Hardware Target:
ibm_fez(127-qubit Eagle Processor) - Single Hop Fidelity: 74.5% (Theoretical Max: 75.0%)
- Round Trip Fidelity: 71.9%
Job ID: d4usjvcgk3fc73auamsg (Publicly verifiable on IBM Quantum)
I expected the signal to drop to 50% (random noise) after the second hop. Instead, it stayed rock solid. We lost less than 3% fidelity after doubling the circuit depth and adding a hardware reset.
Why This Matters
I didn’t invent quantum teleportation (physics did that in 1993). But I believe this is one of the first demonstrations of a Software-Defined Quantum Memory derived from AI principles.
By treating physical qubits not as “registers” but as “disposable containers” that can be refreshed via teleportation loops, the Perceptual Grid Engine effectively extends the lifespan of quantum data. We are moving from “Static Quantum Computing” to “Dynamic, Self-Healing Quantum Computing.”
What’s Next?
This proved that the PGE is substrate-independent. It works on neural networks, and it works on superconducting transmon qubits.
I’m open-sourcing the entire codebase today. If you have an IBM Quantum account (even the free tier), you can clone the repo and run the Grid Handoff yourself.
https://github.com/damianwgriggs/Perceptual-Grid-Engine-Quantum-Experiment
AI PGE Memory Article:
https://medium.com/@dgriggsde/the-engine-of-creation-unleashed-why-im-giving-away-the-ai-that-writes-marathon-stories-1b4b13107213
