Skip to content

link tesseract with stim and add tests for the python wrapper of common.h #32

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
Jun 11, 2025

Conversation

NoureldinYosri
Copy link
Contributor

@NoureldinYosri NoureldinYosri commented Jun 11, 2025

some classes in stim are not exposed directly to python (e.g. DemTarget) instead they are exposed through a child class (e.g. ExposedDemTarget) ... this forces us to do the conversion to be able to cross the python/C++ boundary.


note that This PR doesn't actually link with stim instead the rule "@stim_py//:stim" rebuilds the python wrapper for stim in a way that allows us to use it. this is in order to unblock this project until I figure out how to link to the stim.so file generated by https://github.com/quantumlib/Stim/blob/f566b83c5da89ab94d7280178e2bd642350180c3/BUILD#L90

TODO: find the correct way to link to the stim.so file.


part of #17

@NoureldinYosri NoureldinYosri changed the title "link tesseract with stim and add tests for the python wrapper of common.h" link tesseract with stim and add tests for the python wrapper of common.h Jun 11, 2025
@NoureldinYosri NoureldinYosri requested a review from LalehB June 11, 2025 03:10
Copy link
Collaborator

@LalehB LalehB left a comment

Choose a reason for hiding this comment

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

Awesome 👏🏻
Thank you Nour

@@ -65,3 +65,11 @@ http_archive(
urls = ["https://github.com/bazelbuild/platforms/archive/refs/tags/0.0.6.zip"],
strip_prefix = "platforms-0.0.6",
)

http_archive(
name = "stim_py",
Copy link
Collaborator

Choose a reason for hiding this comment

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

I have a general question Nour!
do you think there might be a Stim version mismatch between this line that requires Stim 15 and the one in lines 21–26 of the same WORKSPACE file?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

technically yes, but the difference between these two versions is two days ... for now this is fine since this is a workaround ... I think I should add the bazel rules in external/stim_py to stim itself to avoid having two dependencies on stim

@NoureldinYosri NoureldinYosri merged commit 492ecc5 into main Jun 11, 2025
3 checks passed
@NoureldinYosri NoureldinYosri deleted the py_wrapper branch June 11, 2025 17:43
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