Expand description
§tileuniverse-quantum
Structured sparse quantum-state representations with GHZ and W-state helpers.
This crate does not simulate arbitrary quantum circuits. It stores compact representations for state families whose nonzero amplitudes are already known.
§The Key Insight
GHZ state |GHZ_n> = (|00...0> + |11...1>)/sqrt(2) has exactly 2 non-zero amplitudes
regardless of n. Store only those two amplitudes; the qubit count is metadata.
use tileuniverse_quantum::*;
// Fixed endpoint-block memory for this concrete usize qubit count.
let ghz = MinimalGhzState::new(1_000_000);
let v = ghz.verify();
assert!((v.fidelity - 1.0).abs() < 1e-10);§State Types
| Struct | Count representation | Use Case |
|---|---|---|
MinimalGhzState | usize | Fixed-size endpoint GHZ representation |
UnlimitedGhzState | Materialized BigUint | Endpoint GHZ representation with large integer labels |
SymbolicGhzState | Symbolic labels | Graham’s number, TREE(3), and formal infinity labels |
SparseQuantumGridVec | usize | Materialized W-state excitation amplitudes with O(n) memory |
§W-State Example
use tileuniverse_quantum::SparseQuantumGridVec;
// W-states materialize one amplitude per excitation position: O(n), not O(2^n).
let grid = SparseQuantumGridVec::new(1_000);
assert_eq!(grid.n_qubits(), 1_000);§Symbolic Example
use tileuniverse_quantum::*;
// Graham's number as a symbolic qubit-count label.
let ghz = SymbolicGhzState::graham();
let v = ghz.verify();
assert!((v.fidelity - 1.0).abs() < 1e-10);
assert_eq!(v.size_class, "Graham-class");
// Symbolic W-states check the stored formula algebraically.
let w = create_graham_w();
let wv = w.verify();
assert!(wv.is_valid);
assert!(wv.total_probability.is_one());Structs§
- Complex64
- Complex number with f64 precision
- Minimal
GhzState - Ultra-minimal GHZ state representation.
- Minimal
GhzVerification - Verification results for MinimalGhzState
- Sparse
Quantum Grid Vec - Fast Vec-based sparse quantum grid.
- Symbolic
Binomial - Symbolic binomial coefficient C(n,k) = n!/(k!(n-k)!)
- Symbolic
Dicke State - Symbolic Dicke state |D_n^k> for labels such as Graham’s number, TREE(3), or a formal infinity label.
- Symbolic
Dicke Verification - Verification result for SymbolicDickeState
- Symbolic
Fraction - Symbolic fraction for probability calculations.
- Symbolic
GhzState - GHZ endpoint representation with a symbolic qubit-count label.
- Symbolic
GhzVerification - Verification results for SymbolicGhzState
- SymbolicW
State - Symbolic W-state formula object for labels such as Graham’s number, TREE(3), or a formal infinity label.
- SymbolicW
Verification - Verification result for SymbolicWState.
- Unlimited
GhzState - GHZ endpoint representation using a BigUint qubit-count label.
- Unlimited
GhzVerification - Verification results for UnlimitedGhzState
- VecBlock
- A single block of 128 complex amplitudes
- WState
Verification Vec - Verification result for W state
Enums§
- Simplified
Binomial - Result of simplifying a binomial coefficient
- Symbolic
Amplitude - Symbolic representation of quantum amplitudes.
- Symbolic
Entropy - Symbolic representation of entropy.
- Symbolic
Number - Symbolic representation of incomprehensibly large numbers.
Constants§
- BLOCK_
SHIFT - BLOCK_
SIZE - Block size: 128 amplitudes (2^7) per block
Functions§
- create_
ghz_ power_ of_ 10 - Create a GHZ state with a
10^exponentBigUint qubit count. - create_
graham_ dicke - Create a Dicke state with Graham’s number of qubits and k excitations
- create_
graham_ ghz - Create a GHZ state with Graham’s number of qubits
- create_
graham_ w - Create a W-state with Graham’s number of qubits
- create_
infinite_ dicke - Create a Dicke state with a formal infinity label and k excitations
- create_
infinite_ ghz - Create a GHZ state with a formal infinity label
- create_
infinite_ w - Create a W-state with a formal infinity label (aleph_0)
- create_
minimal_ ghz - Create a minimal GHZ state for a positive
usizequbit count. - create_
symbolic_ dicke - Create a Dicke state with symbolic qubit and excitation counts
- create_
symbolic_ ghz - Create a GHZ state with symbolic qubit count
- create_
symbolic_ w - Create a W-state with symbolic qubit count
- create_
tree_ dicke - Create a Dicke state with TREE(t) qubits and k excitations
- create_
tree_ ghz - Create a GHZ state with TREE(n) qubits
- create_
tree_ w - Create a W-state with TREE(n) qubits
- create_
unlimited_ ghz - Create a GHZ state from a BigUint qubit count.