← Back to Benchmarks
KLT Adaptive — Phase Detection

105-Qubit Phase Detection — Z4 Label

7×15 Willow-scale SYC grid  ·  Depth 2  ·  Smean = 0.732 bits/qubit  ·  Cumulant K = 4

Z4
KLT phase label
0.0014
Predicted TVD
3.4 s
CPU time (105q)

What this benchmark tests

Before simulating a quantum circuit, Qumulator's KLT adaptive engine runs a lightweight preflight analysis that classifies the circuit into one of five entanglement phases (Z1–Z5). This classification — returned alongside every result — determines which simulation backend is invoked and certifies the TVD accuracy of the result without requiring an exponential reference simulation.

This benchmark exercises the phase-detection step on a 105-qubit 7×15 Willow-scale Sycamore (SYC/fSim) circuit at depth 2. At this depth the circuit is partially entangled but has not yet reached the Haar-random plateau — a regime where the KLT adaptive strategy (Z4, cumulant K=4) delivers the highest per-qubit value: small TVD at a fraction of the cost of full statevector simulation.

Result: 7×15 Willow-scale SYC grid, depth 2. KLT phase: Z4. Smean = 0.732 bits/qubit. Cumulant level K = 4. Predicted TVD = 0.0014. Natural depth τ = 0.30. Wall-clock time: 3.4 s on CPU.

KLT phase ladder

The KLT engine classifies every circuit into one of five entanglement regimes before simulation:

Phase
Z1
Product state / < 0.1 bits
Phase
Z2
Low entanglement 0.1–0.4
Phase
Z3
Moderate 0.4–0.7
This circuit
Z4
High 0.7–0.9 bits/q
Phase
Z5
Haar-random ≥ 0.9

Full result summary

Grid7×15 = 105 qubits (Willow-scale)
Circuit depth2 layers
Gate setSYC (fSim θ=π/2, φ=π/6) + single-qubit Haar
KLT phase labelZ4  ✓
Mean entropy Smean0.732 bits/qubit
Cumulant level K4 (4th-order correction stack)
Predicted TVD0.0014  ✓
Natural depth τ0.30 (depth-to-saturation ratio)
Saturation depth dsat~7 (estimated from τ)
Hilbert space dimension2105 ≈ 4×1031
EngineKLT MPS (χ=64) + cumulant K=4
Hardware4 vCPU / 16 GB RAM — CPU only
Wall-clock time3.4 s

Reproduce this result

Submit the circuit using return_entropy_map=True to get the KLT phase label alongside the simulation result. The phase label, TVD certificate, and natural depth are returned as first-class fields on every circuit response.

pip install qumulator-sdk
import os, math
import numpy as np
from qumulator import QumulatorClient

client = QumulatorClient(
    api_url=os.environ["QUMULATOR_API_URL"],
    api_key=os.environ["QUMULATOR_API_KEY"],
)

# 7×15 Willow-scale SYC circuit, depth 2
nrows, ncols, depth = 7, 15, 2
N = nrows * ncols  # 105 qubits
rng = np.random.default_rng(42)

# SYC gate unitary: fSim(θ=π/2, φ=π/6)
def syc():
    th, ph = math.pi/2, math.pi/6
    c, s = math.cos(th), math.sin(th)
    U = [[1,0,0,0],[0,c,-1j*s,0],[0,-1j*s,c,0],[0,0,0,np.exp(-1j*ph)]]
    M = np.array(U, dtype=complex)
    return M.real.tolist(), M.imag.tolist()

syc_r, syc_i = syc()

instructions = []
for d in range(depth):
    # Random single-qubit Haar rotations
    for q in range(N):
        instructions.append({"gate": "ry", "qubits": q, "params": [rng.uniform(0, math.pi)]})
        instructions.append({"gate": "rz", "qubits": q, "params": [rng.uniform(0, 2*math.pi)]})
    # SYC entangling layer (horizontal bonds)
    for r in range(nrows):
        for c in range(ncols - 1):
            q0, q1 = r*ncols+c, r*ncols+c+1
            instructions.append({
                "gate": "unitary", "qubits": [q0, q1],
                "matrix_real": syc_r, "matrix_imag": syc_i,
            })

result = client.circuit.run(
    n_qubits=N,
    instructions=instructions,
    mode="klt_mps",
    bond_dim=64,
    shots=1024,
    seed=42,
    return_entropy_map=True,
)

print(f"KLT phase     : {result.klt_phase}")        # → Z4
print(f"Mean entropy  : {result.mean_entropy:.3f} bits/qubit")  # → 0.732
print(f"Predicted TVD : {result.tvd_bound:.4f}")    # → 0.0014
print(f"Natural depth : {result.natural_depth:.2f}")  # → 0.30
print(f"Cumulant K    : {result.cumulant_level}")    # → 4
What is natural depth τ? τ = d / dsat is the circuit depth expressed as a fraction of the saturation depth — the depth at which the circuit reaches the Haar-random Z5 phase. τ = 0.30 means this depth-2 circuit has consumed 30% of its "scrambling budget." The saturation depth is estimated from the Lyapunov exponent λL via the Hayden–Preskill scrambling time t* = log(N) / λL.

Why does phase detection matter?

Classical simulation cost scales exponentially with entanglement. A circuit in Z1 or Z2 can be simulated with bond dimension χ ≤ 8 (seconds, gigabytes). A circuit in Z5 requires full statevector (exponential memory). The phase label routes each circuit to the cheapest correct backend automatically — no manual tuning required.

For this 105-qubit Z4 circuit, the KLT engine selects MPS with χ = 64 and a 4th-order cumulant correction stack. The result carries a TVD accuracy certificate of 0.0014 — meaning the output distribution differs from the ideal quantum output by at most 0.14% in total variation distance. This is returned with every result, no exact reference simulation required.

Scaling: Phase detection itself (entropy map computation) runs in O(N × χ² × d) time — for this 105-qubit depth-2 circuit that is under 1 s. The remaining 2.4 s is the MPS simulation with χ = 64 and K = 4 cumulant corrections. The TVD certificate is computed analytically from the entropy profile; no exponential reference is needed.