Skip to content

Conversation

@noajshu
Copy link
Contributor

@noajshu noajshu commented Aug 20, 2025

No description provided.

@noajshu noajshu requested a review from NoureldinYosri August 20, 2025 22:10
py::call_guard<py::scoped_ostream_redirect, py::scoped_estream_redirect>(), R"pbdoc(
.def(
"decode_to_errors",
[](TesseractDecoder& self, const py::array_t<bool>& syndrome) {
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't think it is wise to have logic in this part of the code ... having logic here should only happen for simple copying or conversion. lets either modify the C++ decode_to_errors method to have the checks and filter or create a new one that does with tests

Copy link
Contributor Author

Choose a reason for hiding this comment

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

good idea

Copy link
Contributor Author

Choose a reason for hiding this comment

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

In a future refactor, let's add methods to the SimplexDecoder and TesseractDecoder APIs which accept a dense representation of the detection events. These will just convert to a sparse representation and call the sparse API methods. The checks for the array size can happen there instead of being duplicated throughout all the pybind glue code for both decoders. WDYT?

noajshu and others added 3 commits August 20, 2025 16:00
Co-authored-by: Noureldin <noureldinyosri@gmail.com>
@noajshu noajshu dismissed NoureldinYosri’s stale review August 20, 2025 23:55

just need to get this closed ASAP

@noajshu noajshu merged commit 05697ee into quantumlib:main Aug 20, 2025
4 checks passed
@NoureldinYosri NoureldinYosri mentioned this pull request Sep 5, 2025
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.

2 participants