SERVER-SIDE COMPILED SAFE RUST

Project PRISM Mathematical Engine

A pure Safe Rust mathematical engine and multi-level qudit quantum simulator. Evaluated server-side in compiled machine code with strictly zero floating-point hardware multipliers.

#![forbid(unsafe_code)] Qubits d=2 · Qutrits d=3 · Ququarts d=4 Canonic Shift-and-Add 0.8 - 15 µs Latency Zero Runtime Dependencies
prism-calc v0.1.0 · Project PRISM Mathematical Console (Safe Rust)
╔═══════════════════════════════════════════════════════════════════════════════════════╗
║ PROJECT PRISM MATHEMATICAL ENGINE (prism-calc) ║
║ Mage's Guild Psychonautics LLC — Pure Safe Rust Multiplier-Free REPL ║
╠═══════════════════════════════════════════════════════════════════════════════════════╣
║ • Scientific Arithmetic & Transcendental Calculus (Euler, trig, complex branch cuts) ║
║ • Complex Linear Algebra (det, inv, trace, dagger †, Kronecker tensor product ⊗) ║
║ • Multi-Level Qudit Quantum States (Qubits d=2, Qutrits d=3, Ququarts d=4) ║
║ • Multiplier-Free Canonic Shift-and-Add Radix-16 Dot Products ║
║ • Click any example below or enter math expressions directly ║
╚═══════════════════════════════════════════════════════════════════════════════════════╝
Ready for evaluation. Try 'exp(i * pi) + 1' or 'q = cx(h(qubit(2), 0), 0, 1)'...
prism>>
Click to Inspect Work & Run Live Benchmarks

Verified Silicon Stress Test Receipts

Tested on physical silicon across 1,000,000 iterations to confirm mathematical bit-exactness, memory stability, and microsecond line-rate execution.

88.4 M
Ops / Second
1,000,000 Multiplier-Free Dot Terms (0.00e0 Error)
67,194
Inversions / Sec
16x16 Complex Matrix Inv (Residual < 1e-15)
17.04 µs
10-Qubit GHZ
1,024 Complex Amplitudes Fully Entangled
17.35 µs
6-Qutrit SU(3)
729 Amplitudes Chrestenson Cascade
1.24 M
Expr / Sec
0.80 µs Average AST Parse & Eval Latency

Canonical Quantum Problem Classes Solved

1. Orthonormal Bell Basis & Entropy

Constructs all four Bell states with exact von Neumann entanglement entropy measuring ln(2) ≈ 0.6931 ebits in under 10 µs.

phi_plus = cx(h(qubit(2), 0), 0, 1)

2. Tripartite GHZ & Partial Tracing

Constructs multi-qubit GHZ states and computes reduced density matrices via partial tracing to verify complete subsystem mixing.

ghz = cx(cx(h(qubit(3), 0), 0, 1), 1, 2)

3. Superdense Coding Protocol

Transmits two classical bits of information using only a single physical qubit sent across an entangled quantum channel.

decoded = h(cx(x(z(shared, 0), 0), 0, 1), 0)

4. Deutsch-Jozsa 1-Query Separation

Differentiates between constant and balanced boolean functions deterministically in a single query with 100% certainty.

dj = h(cx(h(h(x(qubit(2), 1), 1), 0), 1), 0)

5. Grover Amplitude Amplification

Searches an unstructured 4-item database, driving the marked state amplitude to 100.0% probability in exactly one iteration.

g = h(h(cz(x(x(h(h(cz(s, 0, 1), 0), 1), 0), 1), 0, 1), 0), 1)

6. High-Dimensional SU(3) Qutrits

Simulates three-level qutrit Hilbert spaces ($d=3$) with Shift ($X_3$), Clock ($Z_3$), Chrestenson ($H_3$), and maximal entropy ln(3) ≈ 1.0986.

q3_bell = cx3(h3(qutrit(2), 0), 0, 1)

Operator & Function Reference

Category Function / Syntax Description
Qubit Gates h(q, t), x, y, z, s, t Single-qubit gates (Hadamard, Pauli, Phase S, Phase T)
Entanglement cx(q, c, t), cz(q, c, t), swap(q, q1, q2) Controlled-NOT, Controlled-Z, and SWAP gates
Rotations rx(q, t, th), ry, rz Continuous Bloch sphere rotations by angle θ
Qutrit Gates x3(q, t), z3, h3, cx3(q, c, t) 3-Level Shift, Clock, Chrestenson, and Controlled-Shift
Diagnostics rho(q), entropy(q, targets), probabilities(q) Density matrix, von Neumann entropy, measurement vector
Linear Algebra det(M), inv(M), tr(M), M†, A kron B Determinant, matrix inverse, trace, Hermitian dagger, Kronecker product
Arithmetic dot(weights, inputs) Canonic shift-and-add inner product (zero multipliers)