High order correlation analysis of error models.
Project description
correlation
High order correlation analysis of detector error models
Installation
pip install correlation_analysis
Usage
import stim
import correlation
circuit = stim.Circuit.generated(
code_task='surface_code:rotated_memory_z',
distance=3,
rounds=2,
after_clifford_depolarization=0.01,
after_reset_flip_probability=0.01,
before_measure_flip_probability=0.01,
before_round_data_depolarization=0.01,
)
dets = circuit.compile_detector_sampler().sample(shots=1_000_000)
dem = circuit.detector_error_model(decompose_errors=True)
graph = correlation.TannerGraph(dem)
result = correlation.cal_high_order_correlations(dets, graph.hyperedges, num_workers=16)
prob_from_dem = []
prob_from_correlation = []
for hyperedge, prob in graph.hyperedge_probs.items():
prob_from_dem.append(prob)
prob_from_correlation.append(result.get(hyperedge))
print("Probabilities from detector error model:")
print(prob_from_dem)
print("Probabilities from correlation analysis:")
print(prob_from_correlation)
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
File details
Details for the file correlation_analysis-0.1.0.tar.gz
.
File metadata
- Download URL: correlation_analysis-0.1.0.tar.gz
- Upload date:
- Size: 12.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.12.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 47e1cf4cf916ac483ccc22579691aaaabaa334cd50d6c75ac03f5a9505858858 |
|
MD5 | f33e3238bc2c38c562cc10de25e8f875 |
|
BLAKE2b-256 | 762227c7004cc2b27d6ab08b69deda1aa51970053a14aa5e6ca7da0d762d471a |
File details
Details for the file correlation_analysis-0.1.0-py3-none-any.whl
.
File metadata
- Download URL: correlation_analysis-0.1.0-py3-none-any.whl
- Upload date:
- Size: 14.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.12.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 11aed03d7bc42f7dea14f624e65d1a4db6b8b8e12add28f01f2a96c0ac2b8029 |
|
MD5 | fa0f80d76dc52240db91c5b18e38a1fc |
|
BLAKE2b-256 | 21b5f5e764d6b76a9c61aefcdef57668b827a634141aa976be6f412c3ff5377c |