Cqt 455 implement analyzer pass in open squirrel#682
Conversation
- Implement Analyzer ABC in opensquirrel/passes/analyzer/general_analyzer.py - Implement CircuitAnalyzer with size, IG, GDG, and density metrics - Update Circuit.analyze() return type to dict[str, Any] - Add 14 tests in tests/passes/analyzer/ - Update CHANGELOG
|
"Hey Chris, thanks for the tip! I ve grouped the size, depth, IG, and GDG tests using @pytest.mark.parametrize. I also modified the CHANGELOG.md, and made sure all the linter checks are green. Thanks for the review !" |
No thanks to me! It was Rares (@rares1609) who did the review 😄! Thanks for making the changes |
|
Oops , my bad! Massive thanks to Rares for the review 🙌 |
elenbaasc
left a comment
There was a problem hiding this comment.
Nice work!
Just a few minor comments, nothing too serious :)
|
Hey Chris , thank you for the review ! |
|
Thanks for addressing the comments! I have resolved all those that were addressed; there is one still open (a simple name change) FYI: Feel free to respond to my comments or give context for the choices you made. Also, please let me know if you don't agree with the proposed changes or if you have a better solution, I'm open to learn :) |
|
Thanks for the feedback Chris! I realized I had missed renaming the gdg variable inside the building function, but I have just pushed a commit updating it to gate_dependency_graph to match the rest of the code. |
elenbaasc
left a comment
There was a problem hiding this comment.
All good to go!
Thanks for the effort :)
Adds a new ''Analyzer'' pass type and the first concrete implementation, "'CircuitAnalyzer'', which computes structural metrics describing a quantum circuit. Metrics are organized into four categories :