Topology-aware quantum circuit compiler with relay-bit fault isolation
Project description
Nativ3
Topology-aware quantum circuit compiler with fault isolation analysis.
Nativ3 treats circuit topology as the primitive, not the gate. It classifies every qubit by its role in the directed gate graph and provides exact fault isolation guarantees based on a single binary property: the relay bit.
The Relay-Bit Principle
A qubit propagates errors if and only if it serves as a CNOT control after serving as a target.
r(q) = 1 → relay (target then control) → propagates errors
r(q) = 0 → hub or spoke → fault-isolated
Install
pip install -e . # core (analysis only, no Qiskit needed)
pip install -e ".[qiskit]" # with Qiskit circuit generation
Usage
Python API
from nativ3 import star, chain, dual_hub, compile
# Star topology — all spokes fault-isolated
result = compile(star(hub=0, spokes=[1, 2, 3]))
print(result.report())
# Chain topology — WARNING: has relay qubits
result = compile(chain([0, 1, 2, 3]))
print(result.report())
# ⚠ q1 is a RELAY (target at t=0, control at t=1)
# ⚠ q2 is a RELAY (target at t=1, control at t=2)
# Dual-hub — total fault isolation, no relays anywhere
result = compile(dual_hub(hubs=[0, 4], spokes=[1, 2, 3]))
print(result.report())
# ✓ fully fault-isolated
# Tradeoff analysis
from nativ3 import analyze_tradeoff
tradeoff = analyze_tradeoff(chain([0, 1, 2, 3]), alpha=0.3)
print(tradeoff['recommendation'])
Command Line
nativ3 star 0 1,2,3 # star with hub=q0
nativ3 chain 0,1,2,3 # chain (shows relay warnings)
nativ3 dual_hub 0,4 1,2,3 # dual-hub (total isolation)
nativ3 tradeoff 0,1,2,3 --alpha 0.5 # chain→star cost analysis
nativ3 compare 0,1,2 # compare star vs chain states
Three Theorems
Based on the paper: DOI 10.5281/zenodo.19210676
- Non-transitivity: Star ≠ chain for non-trivial middleman states
- Fidelity formula: F(star, chain) = cos⁴(α), independent of opening gate
- Fault isolation: Star topologies exactly preserve hub-endpoint correlations under arbitrary TPCP noise on spoke qubits
Node Types
| Type | Role | Relay Bit | Fault Behavior |
|---|---|---|---|
| Hub (H) | Control-only | 0 | Errors propagate TO targets |
| Spoke (S) | Target-only | 0 | Errors stay local — isolated |
| Relay (R) | Target→Control | 1 | Errors propagate downstream |
License
MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file nativ3-0.1.0.tar.gz.
File metadata
- Download URL: nativ3-0.1.0.tar.gz
- Upload date:
- Size: 22.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.10.6 {"installer":{"name":"uv","version":"0.10.6","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
205299d2bb8123a03f32967141cb5e77d86ef527668faaff0f3a39a36b4a5f27
|
|
| MD5 |
c510e595c48077549101b2a7ebb6aae2
|
|
| BLAKE2b-256 |
51d3ea21b451ada1fb8198cd9cd6c173ad1fa776bbdad6883ab2f8e7115da2cd
|
File details
Details for the file nativ3-0.1.0-py3-none-any.whl.
File metadata
- Download URL: nativ3-0.1.0-py3-none-any.whl
- Upload date:
- Size: 20.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.10.6 {"installer":{"name":"uv","version":"0.10.6","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cff1ab16e071a32d2ae7689ef56c184ff469e182fb71164bca31a7945bb34825
|
|
| MD5 |
181974c8a92c1a06abaa09deaf9fa70d
|
|
| BLAKE2b-256 |
0683d2b4ed702c7bc39e2d27c680a6f91adb2ccbd2d45215f2448971115995ee
|