Skip to content

feat: visualise detection probability on patch (#135)#271

Open
Shanwis wants to merge 2 commits into
Deltakit:mainfrom
Shanwis:unitaryHACK_135
Open

feat: visualise detection probability on patch (#135)#271
Shanwis wants to merge 2 commits into
Deltakit:mainfrom
Shanwis:unitaryHACK_135

Conversation

@Shanwis
Copy link
Copy Markdown
Contributor

@Shanwis Shanwis commented Jun 4, 2026

🔗 Closed Issues

Closes #135

📝 Description

Adds plot_detection_probability_on_patch() to overlay detection probabilities as coloured circles on a rotated surface code patch. Each stabiliser ancilla qubit is drawn with a colour mapped from the aggregated defect rate at that location.

Supports three aggregation modes:

  • "average" — mean across all rounds
  • "median" — median across all rounds
  • "variance" — variance excluding first/last outlier rounds

The function accepts optional fig/ax for embedding as an inset plot, and vmin/vmax/cmap/show_colorbar for full visual control.

This contribution is part of unitaryHACK 2026.

New files:

  • deltakit-explorer/src/deltakit_explorer/plotting/_detection_on_patch.py
  • deltakit-explorer/tests/plotting/test_detection_on_patch.py

Modified files:

  • deltakit-explorer/src/deltakit_explorer/plotting/__init__.py (export)

🚦 Status

Ready for review.

🛠️ Future Work

  • Support per-round subplot mode
  • Extend to unrotated and toric code variants
  • Add optional stabiliser-plaquette fill overlay (vs. current ancilla-circles)

🧾 Release Note

feat: visualise detection probability on patch (#135)

@nelimee nelimee added the UnitaryHACK26 Issues that are part of the Unitary Hack 2026. label Jun 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

deltakit-explorer UnitaryHACK26 Issues that are part of the Unitary Hack 2026.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

request: visualise detection probability on patch

2 participants