amazon-braket-sdk-python
amazon-braket-sdk-python copied to clipboard
Composite Operator: feature for composing quantum operations at a high level
Issue #, if available: NA
Description of changes: This feature supports building decomposable quantum operations for high level quantum algorithms. Moreover, it allows quantum circuits to be compartmentalized into distinct sub operations when visualizing.
Testing done:
-
./test/unit_tests/braket/circuits/test_composite_operator.py: tested composite_operator base class; covered all class methods and constructor__init__ -
./test/unit_tests/braket/circuits/test_composite_operators.py: tested composite operators for GHZ, QFT, and QPE; covered all class methods and decompositions using one instance each (maybe can add more instances with different qubit inputs in the future) -
./test/unit_tests/braket/circuits/test_ascii_circuit_diagram.py: tested composite operator ascii circuit diagram -
./test/unit_tests/braket/circuits/test_circuits.py: tested decompose function on circuit object -
./test/unit_tests/braket/circuits/test_instruction.py: tested decompose function on instruction object
Merge Checklist
Put an x in the boxes that apply. You can also fill these out after creating the PR. If you're unsure about any of them, don't hesitate to ask. We're here to help! This is simply a reminder of what we are going to look for before merging your pull request.
General
- [ x] I have read the CONTRIBUTING doc
- [ ] I used the commit message format described in CONTRIBUTING
- [ ] I have updated any necessary documentation, including READMEs and API docs (if appropriate)
Tests
- [ x] I have added tests that prove my fix is effective or that my feature works (if appropriate)
- [ ] I have checked that my tests are not configured for a specific region or account (if appropriate)
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.