amazon-braket-examples icon indicating copy to clipboard operation
amazon-braket-examples copied to clipboard

feature: Parameterized circuit example

Open wrasmuss opened this issue 2 years ago • 3 comments

Is your feature request related to a problem? Please describe. amazon-braket-sdk-python supports parameterizing circuits but there is no example for how to use the feature.

Describe the solution you'd like A notebook that shows how and when to use parameterized circuits.

Describe alternatives you've considered Updating documentation in the Braket SDK

Implementation Checklist (if applicable)
N/A

Additional context N/A

wrasmuss avatar Jun 07 '22 18:06 wrasmuss

@wrasmuss we do have an example of how to use parametrized circuits here: https://github.com/aws/amazon-braket-examples/blob/main/examples/hybrid_quantum_algorithms/VQE_Chemistry/VQE_chemistry_braket.ipynb. Would it help if we made an example under the braket_features folder instead? Thanks!

christianbmadsen avatar Jun 14 '22 13:06 christianbmadsen

Searching this repo for FreeParameter doesn't seem to yield any hits. Maybe I'm doing something wrong. Parameter gets a lot of hits but it's too many to sort through. Having a notebook under features specifically for parameterized circuits might help users find the feature, but maybe we could address the feature through helping users find the existing example via keywords or something.

wrasmuss avatar Jun 21 '22 17:06 wrasmuss

@wrasmuss A more reliable way to search is to clone the repository and search with grep from a console. So in this case you could do something like this from a terminal:

$ git clone https://github.com/aws/amazon-braket-examples.git
Cloning into 'amazon-braket-examples'...
remote: Enumerating objects: 2473, done.
remote: Counting objects: 100% (277/277), done.
remote: Compressing objects: 100% (193/193), done.
remote: Total 2473 (delta 103), reused 240 (delta 82), pack-reused 2196
Receiving objects: 100% (2473/2473), 57.50 MiB | 11.20 MiB/s, done.
Resolving deltas: 100% (1331/1331), done.
$ grep -r FreeParameter amazon-braket-examples/*
amazon-braket-examples/examples/hybrid_quantum_algorithms/VQE_Chemistry/VQE_chemistry_braket.ipynb:    "from braket.circuits import Circuit, FreeParameter, observables\n",

That said it's a good suggestion that this feature (and similar small features) should be easier to discover by way of examples and/or our other documentation, such as the developer guide.

christianbmadsen avatar Jun 21 '22 18:06 christianbmadsen

Hasn't this been addressed by AG launch?

kshyatt-aws avatar Dec 19 '22 18:12 kshyatt-aws

There are several examples that use FreeParameters, including the AG example; closing.

speller26 avatar Jul 12 '23 03:07 speller26