Overview
The Phase Coherence & Unitarity Test Suite validates that all three neural backends (Hamiltonian, Schrödinger, and Dirac) preserve fundamental quantum mechanical constraints without explicit enforcement. All 22 tests passed with exact agreement.Test Results Summary
Result: 22/22 tests passed across all three backendsTest Groups
Group 1: Single-Qubit Phase Algebra
These tests verify that phase relationships are preserved through gate sequences:Single-Qubit Phase Algebra Tests (8 tests)
Single-Qubit Phase Algebra Tests (8 tests)
| Test | Description | Result | Measured | |||
|---|---|---|---|---|---|---|
| HZH = X | Hadamard-Z-Hadamard equals X gate | PASS | P( | 1>)=1.0000 | ||
| HXH = Z | Hadamard-X-Hadamard equals Z gate | PASS | P( | 1>)=0.0000 | ||
| HSSH = HZH = X | S-gate composition via HZH | PASS | P( | 1>)=1.0000 | ||
| H Rz(π) H = X | Rotation composition | PASS | P( | 1>)=1.0000 | ||
| Ry(π) | 0> = | 1> | Y-rotation by π | PASS | P( | 1>)=1.0000 |
| XX = I | X gate is self-inverse | PASS | P( | 1>)=0.0000 | ||
| HZZH = I | Z-Z cancellation | PASS | P( | 1>)=0.0000 | ||
| Rx(π) | 0> = | 1> | X-rotation by π | PASS | P( | 1>)=1.0000 |
Group 2: Two-Qubit Phase-Sensitive Interference
These tests verify correct phase handling in entangled states:Two-Qubit Phase Tests (5 tests)
Two-Qubit Phase Tests (5 tests)
| Test | Description | Result | Measured | |||
|---|---|---|---|---|---|---|
| H CNOT CNOT H = I | CNOT self-inverse property | PASS | P( | 00>)=1.0000 | ||
| H CNOT CZ CZ CNOT H = I | Controlled-Z cancellation | PASS | P( | 00>)=1.0000 | ||
| H CNOT Z(ctrl) CNOT H = X(0) | Phase-controlled interference | PASS | P( | 10>)=1.0000 | ||
| X(1) SWAP SWAP = I | SWAP gate reversibility | PASS | P( | 01>)=1.0000 | ||
| SWAP | 01> = | 10> | Qubit exchange | PASS | P( | 10>)=1.0000 |
Group 3: Norm Preservation (Unitarity)
These tests verify that probability normalization is preserved:Norm Preservation Tests (6 tests)
Norm Preservation Tests (6 tests)
| Circuit | Sum of Probabilities | Result |
|---|---|---|
| After H | 1.00000000 | PASS |
| After X | 1.00000000 | PASS |
| After HXH | 1.00000000 | PASS |
| After Bell | 1.00000000 | PASS |
| After GHZ | 1.00000000 | PASS |
| After QFT-3 | 1.00000000 | PASS |
Group 4: Entanglement (Shannon Entropy)
These tests verify correct entropy for known quantum states:Entropy Tests (3 tests)
Entropy Tests (3 tests)
| State | Expected Entropy | Measured | Result | |
|---|---|---|---|---|
| Bell state | 1 bit | 1.0000 bits | PASS | |
| GHZ-3 | 1 bit | 1.0000 bits | PASS | |
| QFT-3 | 3 bits | 3.0000 bits | PASS | |
| 0> | 0 bits | 0.0000 bits | PASS |
Full Test Log
Complete Test Output from README.md:744-780
Complete Test Output from README.md:744-780
Significance
The test suite demonstrates that neural backends preserve quantum mechanical constraints through amplitude evolution rather than symbolic manipulation. These are not approximate results—they are exact to machine precision. As stated in README.md:143:The backends do not merely preserve probabilities and phases. They preserve the mathematical relationships needed for response calculations.
Backend Independence
All three neural backends passed identical tests:- Hamiltonian Backend: Spectral convolution network
- Schrödinger Backend: 2-channel wavefunction propagation network
- Dirac Backend: 8-channel spinor network
Related Tests
See also:- Phase Coherence Algebra - Detailed mathematical analysis
- Results Summary - Complete experimental results