Toroidal dephasing noise channel for PennyLane — spectral-gap suppression on T² lattices
Project description
pennylane-toroidal-noise
Toroidal dephasing noise channel for PennyLane.
Qubits on a toroidal lattice experience reduced dephasing because the lattice
Laplacian's spectral gap filters low-frequency noise. This plugin provides
ToroidalDephasing — a drop-in replacement for qml.PhaseDamping that models
this suppression.
Installation
pip install pennylane-toroidal-noise
Usage
import pennylane as qml
from pennylane_toroidal_noise import ToroidalDephasing
dev = qml.device("default.mixed", wires=1)
@qml.qnode(dev)
def circuit(gamma):
qml.Hadamard(wires=0)
ToroidalDephasing(gamma, grid_n=12, wires=0)
return qml.expval(qml.PauliX(0))
# Compare: more coherence preserved than plain PhaseDamping
circuit(0.5) # ~0.99 (vs ~0.87 for PhaseDamping)
How it works
The effective dephasing probability is suppressed by the spectral gap of the cycle graph C_n:
gamma_eff = gamma * lambda_1 / (lambda_1 + alpha)
where lambda_1 = 2 - 2*cos(2*pi/n) is the smallest nonzero eigenvalue of
the n-vertex cycle graph Laplacian (also the spectral gap of the n x n torus).
| grid_n | suppression (alpha=1) |
|---|---|
| 4 | 1.5x |
| 8 | 2.7x |
| 12 | 4.7x |
| 32 | 27x |
Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
gamma |
float | — | Bare dephasing probability in [0, 1] |
grid_n |
int | 12 | Side length of the toroidal lattice |
alpha |
float | 1.0 | Coupling strength (larger = stronger filtering) |
wires |
int | — | Wire the channel acts on |
Rust companion
A pure-Rust implementation is also available: toroidal-noise
Reference
S. Cormier, "Toroidal Logit Bias," Zenodo, 2026. DOI: 10.5281/zenodo.18516477
License
MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pennylane_toroidal_noise-0.1.0.tar.gz.
File metadata
- Download URL: pennylane_toroidal_noise-0.1.0.tar.gz
- Upload date:
- Size: 6.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.9.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bd5d8a140a8f5bd03287a0f2dce429fb86572eef0dab3cdddfb762230256a68c
|
|
| MD5 |
b762fc25630eb983c483ff57990cfa57
|
|
| BLAKE2b-256 |
a797db7b30b61c986c948525dd73d6a716f728e4dad97a3dc40ca23ea1e921d9
|
File details
Details for the file pennylane_toroidal_noise-0.1.0-py3-none-any.whl.
File metadata
- Download URL: pennylane_toroidal_noise-0.1.0-py3-none-any.whl
- Upload date:
- Size: 5.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.9.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e6917ef6c4c81c5858de838ecd19bf3ad2c8c7f7165f7a71b8efa7a80e5545b3
|
|
| MD5 |
07bb349bb8e068a487086a18c644abae
|
|
| BLAKE2b-256 |
e5c8134838e2aed6dcb68c4a11b5f2dd872fa554cf612fcccd3320ff46a79c31
|