Zilver
Zilver is a distributed quantum simulation network. On Apple silicon it runs on the GPU through MLX, with hand-written Metal compute kernels for the universal gates, and Macs join the network as nodes. On AMD GPUs it runs standalone through a fused HIP kernel, reaching 32 qubits on a Radeon 8060S, and it also runs standalone on x86 CPUs.
It is designed for QML researchers and engineers who want to develop, train, and benchmark variational quantum algorithms locally on their own machine. No cloud dependency. No virtualisation. No platform cost.
Install and run
pip install zilver
Apple Silicon Mac, macOS 13 or later, Python 3.10 or later.
On an AMD GPU (Windows 11, with PyTorch for ROCm installed), run it standalone:
pip install zilver
python -m zilver.gpu
New to Zilver? The Quickstart goes from install to a trained circuit in a few minutes.
import numpy as np
from zilver.circuit import hardware_efficient
circuit = hardware_efficient(n_qubits=10, depth=3)
params = np.random.default_rng(0).uniform(-np.pi, np.pi, circuit.n_params)
sv = circuit.statevector(params)
print(sv.numpy().shape, sv.dtype)
That is the entire setup. No accounts, no API keys, no registration.
For the multithreaded CPU path and double-precision simulation, install the optional extra:
pip install "zilver[accel]"
What you can build
Zilver ships the primitives QML practitioners use daily.
Variational algorithms. Parameter-shift gradients, batched over a parameter vector or a parameter grid, fused into a single MLX dispatch.
import mlx.core as mx
from zilver.gradients import param_shift_gradient, param_shift_gradient_batched
f = circuit.compile(observable="sum_z")
g = param_shift_gradient(f, mx.array(params.astype(np.float32)))
Quantum kernel methods. A fidelity kernel |<psi_i|psi_j>|^2 for an N-sample batch is one call, computed on-device.
K = circuit.fidelity_kernel(batch_params) # (N, N) numpy float32
Loss-landscape and barren-plateau analysis. A 2D parameter sweep at fixed depth is one vmap dispatch.
from zilver.landscape import LossLandscape
land = LossLandscape(circuit, sweep_params=(0, 1), resolution=32).compute()
print(land.trainability_score(), land.plateau_coverage())
Noisy simulation. NoisyCircuit runs on the density-matrix backend, and a NoiseModel applies Kraus channels automatically after every gate — depolarizing, or thermal relaxation built straight from device T1/T2 and gate times.
import mlx.core as mx
from zilver import NoisyCircuit, NoiseModel
nc = NoisyCircuit(4)
nc.h(0); nc.cnot(0, 1); nc.ry(1, param_idx=0)
# coherence times and gate durations share a unit (e.g. ns)
noise = NoiseModel.thermal_relaxation(t1=250_000, t2=170_000,
gate_time_1q=32, gate_time_2q=70)
f = nc.compile(observable="sum_z", noise_model=noise)
exp = f(mx.array([0.7]))
Statevector backends
Circuit.statevector(params, method=..., precision=...) selects how the circuit executes.
method="metal" runs hand-written Metal compute kernels for RY, RZ, RX, H, X, CNOT, CZ, RZZ, and U3, fused into a single graph by mx.compile. Single precision (complex64). The default for single-statevector evaluation.
method="accel" runs a multithreaded CPU path on Numba and Accelerate. It auto-routes between strided NumPy (small circuits), tape-lowered JIT dispatch, and k=2 fused blocks based on qubit count. Supports complex64 and complex128. Requires the accel extra.
method="mlx" is the generic MLX path. Use it for batched workloads such as parameter sweeps, gradient batches, and fidelity kernels where mx.vmap over the parameter axis is the dominant compute pattern.
method="auto" (the default) picks metal when the circuit uses only supported gate kinds and precision="single", otherwise accel.
The wider simulation surface (density-matrix and tensor-network backends) is selected at job-submission time via the backend flag.
| Backend | Flag | Approximate ceiling on a 16 GB M-series |
|---|---|---|
| Statevector | sv | 30 qubits |
| Density matrix | dm | 15 qubits |
| Tensor network | tn | 50+ qubits, circuit-dependent |
Performance
Single statevector, hardware-efficient ansatz at depth 2, on Apple M1 Pro with 16 GB unified memory. Wall time in milliseconds, minimum of four trials; lower is better.
| Qubits | Zilver (Metal) | Qiskit Aer |
|---|---|---|
| 12 | 1.45 | 1.50 |
| 16 | 1.76 | 4.84 |
| 20 | 19.93 | 40.84 |
| 22 | 70.31 | 148.44 |
| 24 | 334.63 | 588.61 |
Two-qubit process fidelity against the ideal unitary: CNOT and CZ are bit-exact on every backend. RZZ on the Metal path is within 3.4e-08 of ideal, the float32 floor. The Accel path with precision="double" reproduces ideal to numerical zero.
Join the Zilver network
Everything above runs standalone on your Mac/Mini. If you want to contribute compute or run jobs across a distributed pool of Apple Silicon nodes, the Zilver network adds that as a separate, opt-in layer.
The network connects Apple Silicon nodes into a shared simulation fabric. Researchers submit jobs to the registry; the registry matches to a capable node; the node executes and returns a cryptographically signed result.
Join as a node operator
Node registration is invite-only during the current phase. Open an issue with your chip model and intended uptime; on approval you will receive a registry API key.
pip install "zilver[network]"
zilver-node start \
--registry https://registry.siriusquantum.com \
--public-url https://your-public-url.example.com
See NODES.md for setup requirements, public URL options, and identity management.
Submit jobs as a researcher
Client API access is also by invitation. Open an issue describing your use case and institution; on approval you will receive a client key.
from zilver.client import NetworkCoordinator
from zilver.node import SimJob
coord = NetworkCoordinator(
"https://registry.siriusquantum.com",
client_api_key="your-key",
)
job = SimJob(
circuit_ops=[{"type": "ry", "qubits": [0], "param_idx": 0}],
n_qubits=4, n_params=1, params=[1.57], backend="sv",
)
result = coord.submit(job)
print(result.expectation)
print(result.verify(job))
Status
Zilver is under active development. Public APIs and wire formats may change between minor releases.
Feedback and contributions
Open an issue on GitHub or write to info@siriusquantum.com.
License
Apache 2.0. See LICENSE.
Metadata
Release files for zilver 0.6.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| zilver-0.6.2.tar.gz | 123.4 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| zilver-0.6.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 251.7 kB
Release files / zilver-0.6.2.tar.gz
| Download URL | zilver-0.6.2.tar.gz |
|---|---|
| Size | 123.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
3d59e9f116075d99e3e9d90e9ec9574f5b9a5d1d00c94c4d81f698d4f167205f
|
|
BLAKE2b-256 checksum How to use checksums |
3751d151b86a7bf6619a9a4773bfcd96d6a3dfea6aeca4c22a76edb755f2ac94
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.11.1
|
Release files / zilver-0.6.2-py3-none-any.whl
| Download URL | zilver-0.6.2-py3-none-any.whl |
|---|---|
| Size | 128.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
912c3f34341e099ddf58410e9f09e43b95609a07bc2f49141b3661cb7894571e
|
|
BLAKE2b-256 checksum How to use checksums |
9349c78ef31b360cd54d6c3fdab9c45c24f7eaa82852e27055ce812307eac8d0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.11.1
|