Skip to content

Surface code demo 1 refactor#685

Draft
eliotheinrich wants to merge 11 commits into
NVIDIA:mainfrom
eliotheinrich:pr-surface-code-demo
Draft

Surface code demo 1 refactor#685
eliotheinrich wants to merge 11 commits into
NVIDIA:mainfrom
eliotheinrich:pr-surface-code-demo

Conversation

@eliotheinrich

@eliotheinrich eliotheinrich commented Jul 13, 2026

Copy link
Copy Markdown
Collaborator

Description

This PR updates the surface code demo (/libs/qec/unittests/realtime/app_examples/surface_code-1.cpp) to use the new syndrome format, memory circuit kernel, and decoder context. Semantically, the demo should remain very similar to the original version, but I have aimed to remove the hand-rolled sections and replace them with CUDA-QX features as much as possible.

NOTE: This is still a relatively early draft, and includes changes from several dependencies at the moment; it will likely change as the dependencies are modified during review, and the diff will shrink as other PRs merge.

Depends on #656, #671, and #676.

Runtime / performance impact

N/A

Self-review checklist

Please confirm each item before requesting review. Check [x] or strike
through and explain.

Before requesting review

  • I reviewed my own full diff in GitHub or my editor.
  • PR is in Draft if it is not yet ready for review.
  • Temporary / debugging changes have been removed.
  • Local test logs reviewed; no unexplained warnings or errors.
  • CI logs reviewed; no unexplained warnings or errors.
  • Full CI has been run.

Scope and size

  • PR is under ~1000 lines, or an exception is justified in the description.
  • Refactoring-only changes are isolated in their own PR(s).
  • No existing tests were disabled or modified just to make this PR pass
    (if so, an issue has been raised).

Tests

  • New functionality has new tests.
  • Tests fail if the new functionality is broken (including crashes), not
    just when it is missing.
  • Negative tests added where exceptions are expected.
  • Truth data added where simple EXPECT_* / assert checks are
    insufficient for algorithmic correctness.
  • CI runtime impact considered; team notified if significant.

Documentation

  • Public-facing APIs have Doxygen docs.
  • User-visible behavior changes have public docs, or a follow-up is
    tracked.

Code style

  • Naming follows the existing convention (snake_case vs camelCase) for
    the area being modified.

Dependencies

  • No new third-party dependencies, or the team has been notified and
    OSRB tickets filed.

… window decoder

Signed-off-by: Eliot Heinrich <eheinrich@nvidia.com>
Signed-off-by: Eliot Heinrich <eheinrich@nvidia.com>
Signed-off-by: Eliot Heinrich <eheinrich@nvidia.com>
…nd syndrome enqueuing

Signed-off-by: Eliot Heinrich <eheinrich@nvidia.com>
…AQ_QEC_MEMORY_CIRCUIT_DECLARATIONS_ONLY

Signed-off-by: Eliot Heinrich <eheinrich@nvidia.com>
Signed-off-by: Eliot Heinrich <eheinrich@nvidia.com>
…urface-code-demo

# Conflicts:
#	libs/qec/lib/experiments.cpp
#	libs/qec/unittests/backend-specific/stim/test_qec_stim.cpp
Signed-off-by: Eliot Heinrich <eheinrich@nvidia.com>
…der context

Signed-off-by: Eliot Heinrich <eheinrich@nvidia.com>
@copy-pr-bot

copy-pr-bot Bot commented Jul 13, 2026

Copy link
Copy Markdown

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant