Skip to main content

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

correlation_analysis-0.1.0.tar.gz (12.7 kB view details)

Uploaded Source

Built Distribution

correlation_analysis-0.1.0-py3-none-any.whl (14.8 kB view details)

Uploaded Python 3

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

Hashes for correlation_analysis-0.1.0.tar.gz
Algorithm Hash digest
SHA256 47e1cf4cf916ac483ccc22579691aaaabaa334cd50d6c75ac03f5a9505858858
MD5 f33e3238bc2c38c562cc10de25e8f875
BLAKE2b-256 762227c7004cc2b27d6ab08b69deda1aa51970053a14aa5e6ca7da0d762d471a

See more details on using hashes here.

File details

Details for the file correlation_analysis-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for correlation_analysis-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 11aed03d7bc42f7dea14f624e65d1a4db6b8b8e12add28f01f2a96c0ac2b8029
MD5 fa0f80d76dc52240db91c5b18e38a1fc
BLAKE2b-256 21b5f5e764d6b76a9c61aefcdef57668b827a634141aa976be6f412c3ff5377c

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page