Chaseklvk/add amplitude estimation braket #44
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR adds an Amazon Braket implementation of the Amplitude Estimation benchmark.
Here are a couple notes about this implementation:
I found that Braket just doesn't support certain features natively, namely, adjoint circuits, multi-cnot gates, etc. (at least not obviously from the documentation), so I had to implement many of those functions by hand. It sounds like it might be useful to compile a general set of Braket utils useful across all benchmarks.
The main implementation is located in
braket/ae_benchmark.py
and the utilities mentioned in point 1 are located inbraket/ae_utils.py
.I tried to keep the benchmark itself as uniform as possible with respect to the existing benchmarks with some small differences due to Braket's limitations.
cQ
andQ
, the functionQ_Unitary
returns theQ
circuit object as well as the unitary matrix ofQ
which is later supplied tocontrolled_unitary()
when creating the general circuit.Let me know if you have any questions! I'm not sure if there's any established workflow, so I just assumed based on the branches that I should PR into develop. Please let me know if there's a different established flow.