Skip to content

FAQ

Scope

How do I get the SDK?

Request access at outshift.cisco.com/quantum/quantum-compiler-app. It is not on PyPI. See Installation for what happens after you have a wheel.

Does this run circuits on real quantum hardware?

No. Everything is local simulation. There is no hardware control plane and nothing here talks to a device.

Does it compute my circuit's output state?

Not as its main job. The SDK models execution — timing, contention, resource consumption, error rates — not amplitudes.

If you do want amplitudes, qndk.compile produces a runnable distributed circuit and hands it to Qiskit Aer:

from qndk.circuit.qiskit_circuits import QiskitCircuit
from qndk.compile.distributed import simulate_circuit

circuit = QiskitCircuit("simple", num_qubits=3)
counts = simulate_circuit(circuit, shots=64)
print(counts)

That scales like any state-vector simulator, so it is for small circuits.

Is this a replacement for Qiskit's transpiler?

No — it uses Qiskit for exactly that. The SDK's transpile package normalizes gates and builds the graph representations the distributed stages need. Single-QPU optimization is Qiskit's job.

What size problems are realistic?

Partitioning and simulation handle circuits with tens to low hundreds of qubits on datacenter-scale topologies comfortably. The limit is usually remote-gate count rather than qubit count — see Troubleshooting.

Nothing here needs to simulate the quantum state, so it does not hit the exponential wall a state-vector simulator does.


Choosing components

Which partitioner should I use?

Partitioner Use when
KernighanLinPartitioner Default. Pure Python, always available, good general results.
MetisPartitioner Large interaction graphs where KL is slow. Not on Windows.
WindowBasedCircuitPartitioner The circuit's interaction pattern changes as it runs, so one fixed mapping is a poor fit.

Start with KL. Move to WBCP when you suspect a single static mapping is leaving EPR cost on the table; it pays teleportation to get cheaper gates within each window.

Which simulator should I use?

DQCScheduler for most work. It is the one with entanglement lookahead, a Bell-pair inventory, explicit path reservation, and the only one that supports the fault-tolerant path.

StaticScheduler pre-computes a schedule and is useful for quick comparisons and for the batch scheduler adapter. DynamicScheduler sits between them.

grid4 or all2all?

grid4 is realistic — real hardware is nearest-neighbour constrained, and grid4 makes the simulator account for the SWAPs needed to route around that. Use all2all as an optimistic baseline when you want to isolate network effects from internal routing.

Note grid4 requires QPUSpec.comp_qubits to be a perfect square.

FixedIdleEpr or PoissonEpr?

They answer the same question at two fidelities, and are not two spellings of the same number.

  • FixedIdleEpr(k_idle=...) charges the wait for a pair as extra idle noise. The circuit is untouched — a conservative fudge factor. Its table covers a wide range and computes missing rows on demand.
  • PoissonEpr(mu=...) models pairs arriving as a genuine Poisson process, so some rounds cannot measure the seam at all. More faithful. Its table covers only what was swept, and raises otherwise.

A slow FixedIdleEpr setting can land more than an order of magnitude more pessimistic than PoissonEpr at a comparable nominal speed, because it cannot distinguish "somewhat slower" from "structurally broken".


Fault tolerance

Why did raising d not improve my error rate?

Almost certainly because magic states are your limiting term, and d does not appear in the magic term at all.

The three code terms fall off as p^((d+1)/2) — very steep. One round of distillation gives 35p³ — much shallower. Past the crossing point, a larger code improves a term that had already stopped mattering. Add a distillation round instead:

from qndk.quantum_network import MagicFactorySpec

one = MagicFactorySpec(distill_rounds=1)
two = MagicFactorySpec(distill_rounds=2)
print(f"1 round: {one.distillation_level_time_ms:.3f} ms per magic state")
print(f"2 rounds: {2 * two.distillation_level_time_ms:.3f} ms per magic state")

See quantum_error_correction for the worked numbers.

Do I need num_magic_factories if my circuit has no T gates?

No. Only the T-gate rewrite needs a factory. But a Clifford-only circuit is not universal, so most realistic fault-tolerant workloads have T gates — and several built-in circuits (tfim, for instance) are Clifford+rotation only, which is why the examples add a t() explicitly.

Does SurfaceCode(d=15) multiply my qubit count by 225?

No. The layout stage maps one network compute qubit to one logical qubit regardless of d; the code distance enters when the error budget prices the run. That is a deliberate modelling choice — it lets you sweep d against a fixed network without rebuilding it.

Why does the same code object go to two different functions?

So the layout stage and the pricing stage cannot disagree about the physics. fault_tolerant_encode(..., code=code) and tler(..., code=code) taking the same object is the mechanism that prevents encoding at one distance and pricing at another. tler() takes no bare d= for the same reason.


Practical

Are results deterministic?

Yes, by default. Partitioners draw from their own RNG seeded with a fixed default (seed=20250101), so the same circuit on the same network produces the same layout every time. Pass a different seed to vary it.

That determinism is what makes A/B comparisons readable: if you change one hardware parameter, the difference you see is that parameter, not layout noise.

Can I mix hardware generations in one network?

Yes. Pass qpu_specs — a dict of QPU index to QPUSpec — to override specific QPUs while the rest use the baseline:

from qndk.quantum_network import build_clos, QPUSpec, QubitSpec

baseline = QPUSpec(comp_qubits=4, connectivity="all2all")
newer = QPUSpec(comp_qubits=9, connectivity="all2all",
                qubit=QubitSpec(gate_fidelity=0.9999))

network = build_clos(ports_per_switch=4, qpus_per_rack=2,
                     qpu_spec=baseline, qpu_specs={0: newer})
for qpu_id in sorted(network.qpu_ids())[:3]:
    qpu = network.get_qpu(qpu_id)
    print(f"{qpu_id}: {qpu.num_comp_qubits} comp qubits")

Switches and links stay uniform at construction; vary those afterwards with update_switch() and update_link().

Can I load a topology from a file?

Yes. QuantumNetwork.to_json() and from_json() round-trip a network. See quantum_network.

Can I write my own partitioner or simulator?

Yes — that is what the abstract base classes are for, and they are subclassable from the wheel. Implement Partitioner for a layout strategy or Simulator for a scheduling one; EprDelivery is likewise extensible. See partition and simulator.

Why does the SDK raise instead of falling back to a default?

Because a quietly wrong answer is worse than a stack trace. The models here produce numbers people use to make architecture decisions, so where the shipped data does not support an answer, the code says so rather than extrapolating past its own evidence. Most of Troubleshooting is that policy in action.

Where do the models come from?

Published research, not invention. The fault-tolerant path follows arXiv:2606.17495, and the other models have their own references under Background reading. Where the SDK invented a rule because no published model exists, the documentation says so rather than presenting it as settled physics.