Skip to content

Conversation

@NoureldinYosri
Copy link
Contributor

@NoureldinYosri NoureldinYosri commented Aug 9, 2025

Currently visualization is created by parsing the logs ... this PR introduces a different way to do this by creating a visualization class ... for now this class can only write to file to be inline with how things are done now but can be improved in different ways ... for example it can record data that the python layer can use directly with matplotlib

to use the class set the flag create_visualization=True in the TesseractConfig and after running the decoding call decoder.visualizer.write(file_path) to write to the desired file

void Visualizer::add_activated_detectors(const boost::dynamic_bitset<>& detectors,
size_t num_detectors) {
std::stringstream ss;
ss << "activated_detectors = ";
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@LalehB is it supposed to be activated_detectors or activated_dets ... the script seems to look for _dets

activated_dets = parse_implicit_list(det_line, "activated_dets =")

Copy link
Collaborator

Choose a reason for hiding this comment

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

@NoureldinYosri yeah amazing catch! it used to be activated_dets and then in the code got changed to activated_detectors but apparently the visualization did not get updated! thanks a lot!

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.

LGTM!
Thank you so much Nour! 👏🏻

@LalehB LalehB merged commit ea08c0f into quantumlib:main Aug 9, 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