Skip to content

Comments

Implement Command Module#43

Merged
masa10-f merged 24 commits intomasterfrom
command
May 4, 2025
Merged

Implement Command Module#43
masa10-f merged 24 commits intomasterfrom
command

Conversation

@masa10-f
Copy link
Collaborator

@masa10-f masa10-f commented May 3, 2025

Before submitting, please check the following:

  • Make sure you have tests for the new code and that test passes (run pytest)
  • If applicable, add a line to the [unreleased] part of CHANGELOG.md, following keep-a-changelog.
  • Format added code by ruff
  • Type checking by mypy and pyright
  • Make sure the checks (github actions) pass.
  • Check that the docs compile without errors (run make html in ./docs/ - you may need to install dependency for sphinx docs, see docs/requirements.txt.)

Then, please fill in below:

Description of the change:

  • Added command.py module, which has basic operations in MBQC.
  • Added D command, which expresses the decoding operation.
  • Added decoder_backend.py module. Currently, only the XORDecoder is implemented

Related issue:

@masa10-f masa10-f added the enhancement New feature or request label May 3, 2025
@masa10-f masa10-f self-assigned this May 3, 2025
@masa10-f masa10-f requested a review from Copilot May 3, 2025 08:56
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR implements a new command module and decoder backend for MBQC operations. Key changes include:

  • Adding a new command module with various command classes (N, E, M, X, Z, Clifford, D).
  • Implementing the XORDecoder in the decoder backend.
  • Adding comprehensive tests for the XORDecoder functionality.

Reviewed Changes

Copilot reviewed 3 out of 6 changed files in this pull request and generated 1 comment.

File Description
tests/test_decoder_backend.py Added tests targeting XORDecoder behavior.
graphix_zx/decoder_backend.py Implemented BaseDecoder and XORDecoder classes.
graphix_zx/command.py Introduced new command classes including command D.
Files not reviewed (3)
  • docs/source/command.rst: Language not supported
  • docs/source/decoder_backend.rst: Language not supported
  • docs/source/references.rst: Language not supported
Comments suppressed due to low confidence (1)

tests/test_decoder_backend.py:1

  • [nitpick] The header comment in this file ('# test_xor_decoder.py') does not match the filename ('test_decoder_backend.py'). Consider updating it for consistency.
# test_xor_decoder.py

@masa10-f masa10-f marked this pull request as ready for review May 3, 2025 09:06
@masa10-f masa10-f requested review from EarlMilktea, d1ssk and shinich1 May 3, 2025 09:18
@masa10-f masa10-f mentioned this pull request May 3, 2025
@masa10-f masa10-f merged commit 14f2a3a into master May 4, 2025
21 checks passed
@masa10-f masa10-f deleted the command branch May 4, 2025 13:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants