الانتقال إلى المحتوى الرئيسي

Quantum Circuits

Build a gate-level circuit, simulate exactly, and bind the resulting statevector to the Zeqond at which it was computed.

  • Live app/apps/quantum-circuits/
  • Sourceapps/quantum-circuits/index.html + apps/quantum-circuits/circuit.js (≈ 720 lines)
  • OperatorsKO42 · QM3 · QM4 · QM11
  • Error budget → 0.000% (exact unitary vs Qiskit/numpy reference)

What it solves

Gate-level simulation for research, education, and algorithm development. Qiskit and Cirq are excellent; what this app adds is (a) the compile path itself is a first-class object so the same circuit can be reasoned about alongside classical physics and (b) every statevector is emitted with its Zeqond so outputs are time-anchored.

The core is exact unitary simulation up to 22 qubits on the hosted endpoint. QM3 (superposition |ψ⟩ = ∑c_i|ϕ_i⟩) and QM4 (Bell state |ψ⟩ = 1/√2 (|↑⟩_A|↓⟩_B − |↓⟩_A|↑⟩_B)) give the kernel its primitives; QM11 (canonical commutator [x̂, p̂] = iℏ) is used for the measurement operator. Measured: Hamming = 0 on the output statevector vs Qiskit statevector_simulator on 200 random 8-qubit circuits.

The math — 7-step Wizard applied

StepDecision
1. PrimeKO42 mandatory
2. LimitQM3 + QM4 + QM11 + KO42 = 4
3. ScaleUp to 22 qubits on hosted endpoint
4. PrecisionHamming = 0 on statevector
5. CompileMaster Equation
6. ExecuteFunctional Equation
7. VerifyRandom-circuit suite against Qiskit

Verbatim formulas:

  • KO42.1ds² = g_μν dx^μ dx^ν + α sin(2π · 1.287 t) dt²
  • QM3|ψ⟩ = ∑c_i|ϕ_i⟩
  • QM4|ψ⟩ = 1/√2 (|↑⟩_A|↓⟩_B − |↓⟩_A|↑⟩_B)
  • QM11[x̂, p̂] = iℏ

Runnable worked example — 3-qubit GHZ state

curl -s -X POST https://api.zeq.dev/api/playground/compute \
-H "Authorization: Bearer $ZEQ_DEMO_KEY" \
-H "Content-Type: application/json" \
-d '{
"operators": ["KO42", "QM3", "QM4"],
"inputs": {
"n_qubits": 3,
"circuit": [
{"gate": "H", "qubit": 0},
{"gate": "CX", "control": 0, "target": 1},
{"gate": "CX", "control": 1, "target": 2}
]
}
}'

Expected:

{
"statevector_real": [0.7071, 0, 0, 0, 0, 0, 0, 0.7071],
"statevector_imag": [0, 0, 0, 0, 0, 0, 0, 0],
"ghz_fidelity": 1.0,
"error_pct": 0.000,
"phase_at_compute": 0.3311
}

Extend it

  • Noise model: add an amplitude-damping channel per gate; error budget relaxes to 0.1% on fidelity.
  • VQE warm start: feed the statevector into the Quantum Logic Solver.
  • Quantum-classical loop: chain with CS45 (quantum query complexity) to bound a full QAOA.

Seeds

  • Analogue gravity circuits — the KO42 signature in the simulated statevector is a toy model for analogue-gravity time-dilation experiments.
  • Quantum-resonance NM30 coupling — couple the 1.287 Hz heartbeat into the Hamiltonian to explore driven-dissipative dynamics.
  • Topological code drafts — build surface-code distance-3 and simulate error threshold.

Papers

Middleware active. Kernel on the 1.287 Hz HulyaPulse. Awaiting next Zeqond.