Skip to content

Add global decoder ablation workflow#17

Merged
sacpis merged 22 commits into
NVIDIA:mainfrom
sacpis:add_global_decoders
Mar 23, 2026
Merged

Add global decoder ablation workflow#17
sacpis merged 22 commits into
NVIDIA:mainfrom
sacpis:add_global_decoders

Conversation

@sacpis
Copy link
Copy Markdown
Collaborator

@sacpis sacpis commented Mar 18, 2026

Add global decoder ablation workflow

  • Adding code/evaluation/failure_analysis.py from the internal repo
    • Made a few tweaks
  • Adding a workflow task decoder_ablation entry point
  • Fixing a bug where meas_basis_test: both in the config caused an AttributeError
    • Overriding the datapipe config copy with the single basis

sacpis added 7 commits March 18, 2026 11:20
Signed-off-by: Sachin Pisal <spisal@nvidia.com>
…ion, and plotting helpers

Signed-off-by: Sachin Pisal <spisal@nvidia.com>
Signed-off-by: Sachin Pisal <spisal@nvidia.com>
Signed-off-by: Sachin Pisal <spisal@nvidia.com>
Signed-off-by: Sachin Pisal <spisal@nvidia.com>
Signed-off-by: Sachin Pisal <spisal@nvidia.com>
Signed-off-by: Sachin Pisal <spisal@nvidia.com>
@sacpis sacpis requested a review from bmhowe23 March 18, 2026 21:26
Signed-off-by: Sachin Pisal <spisal@nvidia.com>
Comment thread code/evaluation/failure_analysis.py
Signed-off-by: Sachin Pisal <spisal@nvidia.com>
@sacpis sacpis marked this pull request as ready for review March 18, 2026 23:40
@sacpis sacpis requested a review from bmhowe23 March 18, 2026 23:53
Comment thread code/requirements_public_train.txt
Comment thread code/evaluation/logical_error_rate.py Outdated
Copy link
Copy Markdown
Collaborator

@bmhowe23 bmhowe23 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall, this LGTM. Just one minor comment.

sacpis added 2 commits March 19, 2026 14:30
Signed-off-by: Sachin Pisal <spisal@nvidia.com>
Signed-off-by: Sachin Pisal <spisal@nvidia.com>
@sacpis sacpis requested a review from bmhowe23 March 19, 2026 21:44
Comment thread code/tests/test_failure_analysis.py Outdated
@sacpis sacpis requested a review from ivanbasov March 19, 2026 23:10
Comment thread code/evaluation/failure_analysis.py
Comment thread code/evaluation/failure_analysis.py
Comment thread code/evaluation/failure_analysis.py
Comment thread code/evaluation/failure_analysis.py
Comment thread code/tests/test_failure_analysis.py
sacpis added 4 commits March 19, 2026 16:52
Signed-off-by: Sachin Pisal <spisal@nvidia.com>
Signed-off-by: Sachin Pisal <spisal@nvidia.com>
Signed-off-by: Sachin Pisal <spisal@nvidia.com>
Signed-off-by: Sachin Pisal <spisal@nvidia.com>
@sacpis
Copy link
Copy Markdown
Collaborator Author

sacpis commented Mar 20, 2026

Seems like unit tests are failing because of missing ldpc module.

Signed-off-by: Sachin Pisal <spisal@nvidia.com>
@sacpis sacpis requested a review from ivanbasov March 20, 2026 03:29
@sacpis
Copy link
Copy Markdown
Collaborator Author

sacpis commented Mar 20, 2026

Thank you @bmhowe23 and @ivanbasov for reviewing this PR. Please let me know if we need to add/update anything else.

@bmhowe23
Copy link
Copy Markdown
Collaborator

Seems like unit tests are failing because of missing ldpc module.

@ivanbasov does a CI script perhaps need to be updated to install the new dependency?

Comment thread code/evaluation/failure_analysis.py Outdated
Comment thread code/evaluation/failure_analysis.py
Comment thread code/evaluation/failure_analysis.py Outdated
sacpis added 2 commits March 20, 2026 14:18
Signed-off-by: Sachin Pisal <spisal@nvidia.com>
Signed-off-by: Sachin Pisal <spisal@nvidia.com>
@sacpis sacpis requested a review from ivanbasov March 20, 2026 21:36
@ivanbasov
Copy link
Copy Markdown
Member

Seems like unit tests are failing because of missing ldpc module.

@ivanbasov does a CI script perhaps need to be updated to install the new dependency?

sure. @sacpis , could you please update CI scripts. CI jobs fail.

Signed-off-by: Sachin Pisal <spisal@nvidia.com>
@sacpis
Copy link
Copy Markdown
Collaborator Author

sacpis commented Mar 21, 2026

Seems like unit tests are failing because of missing ldpc module.

@ivanbasov does a CI script perhaps need to be updated to install the new dependency?

sure. @sacpis , could you please update CI scripts. CI jobs fail.

Done with eaed4cc.

@sacpis
Copy link
Copy Markdown
Collaborator Author

sacpis commented Mar 23, 2026

@bmhowe23 @ivanbasov Good to go?

@sacpis sacpis merged commit 9f6d854 into NVIDIA:main Mar 23, 2026
12 checks passed
ivanbasov added a commit that referenced this pull request Mar 23, 2026
* Replace proprietary license headers with Apache-2.0

Update all SPDX headers from LicenseRef-NvidiaProprietary to Apache-2.0
across all 70 tracked source files. Also updates spdx_headers.py to
generate Apache-2.0 headers and replace old proprietary headers in-place.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* fix(headers): apply Apache-2.0 headers to files added after branch cut

Files added by PRs #13, #14, and #17 still carried the proprietary
LicenseRef-NvidiaProprietary header. Replace with Apache-2.0 to match
the rest of the codebase after the header migration.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* style: apply YAPF formatting after header replacement

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* fix(headers): restore full file content truncated during rebase

The first rebase used --theirs to resolve header conflicts, which took
the old PR branch content instead of main's newer content for 5 files.
Restore from upstream/main and apply Apache-2.0 header correctly.

Affected files:
- code/qec/noise_model.py
- code/qec/surface_code/homological_equivalence_torch.py
- code/tests/mid/test_homological_equivalence.py
- code/tests/test_noise_model.py
- code/training/train.py

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* fix(test): remove PreDecoderModelMemory_v2 test removed by PR #18

PR #18 removed the unused v2 model architecture. Drop the corresponding
test class and import to fix the ImportError in CI.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
ivanbasov pushed a commit that referenced this pull request Apr 10, 2026
* adding dependencies for decoder_ablation workflow

Signed-off-by: Sachin Pisal <spisal@nvidia.com>

* adding failure_analysis containing the decoder helpers, decoder ablation, and plotting helpers

Signed-off-by: Sachin Pisal <spisal@nvidia.com>

* adding modified code/evaluation/failure_analysis.py

Signed-off-by: Sachin Pisal <spisal@nvidia.com>

* adding tests for failure analysis

Signed-off-by: Sachin Pisal <spisal@nvidia.com>

* adding decoder_ablation as a workflow task

Signed-off-by: Sachin Pisal <spisal@nvidia.com>

* overriding the config copy with the resolved single basis

Signed-off-by: Sachin Pisal <spisal@nvidia.com>

* formatting

Signed-off-by: Sachin Pisal <spisal@nvidia.com>

* formatting

Signed-off-by: Sachin Pisal <spisal@nvidia.com>

* adding CUDA-Q nv-qldpc-decoder from internal repo and tests

Signed-off-by: Sachin Pisal <spisal@nvidia.com>

* removing _PYMATCHING_SUPPORTS_CORRELATIONS and inspect

Signed-off-by: Sachin Pisal <spisal@nvidia.com>

* formatting

Signed-off-by: Sachin Pisal <spisal@nvidia.com>

* removing unconditional imports

Signed-off-by: Sachin Pisal <spisal@nvidia.com>

* adding a test to check predecoder actually modifies residual syndromes

Signed-off-by: Sachin Pisal <spisal@nvidia.com>

* adding comments for _decode_ldpc_batch

Signed-off-by: Sachin Pisal <spisal@nvidia.com>

* refactoring decoder_ablation_study

Signed-off-by: Sachin Pisal <spisal@nvidia.com>

* adding unittests for refactored functions

Signed-off-by: Sachin Pisal <spisal@nvidia.com>

* tracking unavailable decoders

Signed-off-by: Sachin Pisal <spisal@nvidia.com>

* adding BP variants in try/except block

Signed-off-by: Sachin Pisal <spisal@nvidia.com>

* removing redundant check

Signed-off-by: Sachin Pisal <spisal@nvidia.com>

* adding modules to install to requirements

Signed-off-by: Sachin Pisal <spisal@nvidia.com>

---------

Signed-off-by: Sachin Pisal <spisal@nvidia.com>
ivanbasov added a commit that referenced this pull request Apr 10, 2026
* Replace proprietary license headers with Apache-2.0

Update all SPDX headers from LicenseRef-NvidiaProprietary to Apache-2.0
across all 70 tracked source files. Also updates spdx_headers.py to
generate Apache-2.0 headers and replace old proprietary headers in-place.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* fix(headers): apply Apache-2.0 headers to files added after branch cut

Files added by PRs #13, #14, and #17 still carried the proprietary
LicenseRef-NvidiaProprietary header. Replace with Apache-2.0 to match
the rest of the codebase after the header migration.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* style: apply YAPF formatting after header replacement

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* fix(headers): restore full file content truncated during rebase

The first rebase used --theirs to resolve header conflicts, which took
the old PR branch content instead of main's newer content for 5 files.
Restore from upstream/main and apply Apache-2.0 header correctly.

Affected files:
- code/qec/noise_model.py
- code/qec/surface_code/homological_equivalence_torch.py
- code/tests/mid/test_homological_equivalence.py
- code/tests/test_noise_model.py
- code/training/train.py

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* fix(test): remove PreDecoderModelMemory_v2 test removed by PR #18

PR #18 removed the unused v2 model architecture. Drop the corresponding
test class and import to fix the ImportError in CI.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
ivanbasov pushed a commit that referenced this pull request Apr 10, 2026
* adding dependencies for decoder_ablation workflow

Signed-off-by: Sachin Pisal <spisal@nvidia.com>

* adding failure_analysis containing the decoder helpers, decoder ablation, and plotting helpers

Signed-off-by: Sachin Pisal <spisal@nvidia.com>

* adding modified code/evaluation/failure_analysis.py

Signed-off-by: Sachin Pisal <spisal@nvidia.com>

* adding tests for failure analysis

Signed-off-by: Sachin Pisal <spisal@nvidia.com>

* adding decoder_ablation as a workflow task

Signed-off-by: Sachin Pisal <spisal@nvidia.com>

* overriding the config copy with the resolved single basis

Signed-off-by: Sachin Pisal <spisal@nvidia.com>

* formatting

Signed-off-by: Sachin Pisal <spisal@nvidia.com>

* formatting

Signed-off-by: Sachin Pisal <spisal@nvidia.com>

* adding CUDA-Q nv-qldpc-decoder from internal repo and tests

Signed-off-by: Sachin Pisal <spisal@nvidia.com>

* removing _PYMATCHING_SUPPORTS_CORRELATIONS and inspect

Signed-off-by: Sachin Pisal <spisal@nvidia.com>

* formatting

Signed-off-by: Sachin Pisal <spisal@nvidia.com>

* removing unconditional imports

Signed-off-by: Sachin Pisal <spisal@nvidia.com>

* adding a test to check predecoder actually modifies residual syndromes

Signed-off-by: Sachin Pisal <spisal@nvidia.com>

* adding comments for _decode_ldpc_batch

Signed-off-by: Sachin Pisal <spisal@nvidia.com>

* refactoring decoder_ablation_study

Signed-off-by: Sachin Pisal <spisal@nvidia.com>

* adding unittests for refactored functions

Signed-off-by: Sachin Pisal <spisal@nvidia.com>

* tracking unavailable decoders

Signed-off-by: Sachin Pisal <spisal@nvidia.com>

* adding BP variants in try/except block

Signed-off-by: Sachin Pisal <spisal@nvidia.com>

* removing redundant check

Signed-off-by: Sachin Pisal <spisal@nvidia.com>

* adding modules to install to requirements

Signed-off-by: Sachin Pisal <spisal@nvidia.com>

---------

Signed-off-by: Sachin Pisal <spisal@nvidia.com>
ivanbasov added a commit that referenced this pull request Apr 10, 2026
* Replace proprietary license headers with Apache-2.0

Update all SPDX headers from LicenseRef-NvidiaProprietary to Apache-2.0
across all 70 tracked source files. Also updates spdx_headers.py to
generate Apache-2.0 headers and replace old proprietary headers in-place.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* fix(headers): apply Apache-2.0 headers to files added after branch cut

Files added by PRs #13, #14, and #17 still carried the proprietary
LicenseRef-NvidiaProprietary header. Replace with Apache-2.0 to match
the rest of the codebase after the header migration.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* style: apply YAPF formatting after header replacement

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* fix(headers): restore full file content truncated during rebase

The first rebase used --theirs to resolve header conflicts, which took
the old PR branch content instead of main's newer content for 5 files.
Restore from upstream/main and apply Apache-2.0 header correctly.

Affected files:
- code/qec/noise_model.py
- code/qec/surface_code/homological_equivalence_torch.py
- code/tests/mid/test_homological_equivalence.py
- code/tests/test_noise_model.py
- code/training/train.py

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* fix(test): remove PreDecoderModelMemory_v2 test removed by PR #18

PR #18 removed the unused v2 model architecture. Drop the corresponding
test class and import to fix the ImportError in CI.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
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.

3 participants