amazon-braket / amazon-braket/amazon-braket-pennylane-plugin-python
Print noisy circuit when a Braket noise model is applied to PL device with `parallel=True`
- Dominant language
- Python
- Stars
- 47
- Forks
- 41
- Avg merge
- 4d 1h
- Merged PRs (30d)
- 2
Description
PennyLane device with Braket backend supports [noise model](https://github.com/amazon-braket/amazon-braket-pennylane-plugin-python/blob/4560f4e4dc49f621c3698b2d7eeffe6073d09fec/src/braket/pennylane_plugin/braket_device.py#L124). The noise model added to the device will automatically apply to circuit executed by the device.
Normally, one can call `print(device.circuit)` to visualize the circuit after the device has executed it. This allows users to check if the noise is applied as expected. But in the case where the `device` is set to `parallel=True`, this does not work. The underlying issue is that `batch_execute` does not populate the deivce's `circuit` field (because there are multiple circuits being executed on the device).
**Describe the feature you'd like**
If the `device` is initialized with `parallel=True`, the device should cache all of the circuits that have been run on the device so that they can be accessed later. We should also have updated documentation on how to attach a noise model to a device and how to print the resulting circuit(s).
**Describe alternatives you've considered**
The alternative is to use `parallel=False` so that only a single circuit is run and populated in the `circuit` field of the device, and then call `print(device.circuit)`.
Contributor guide
Assessment
This issue has not been assessed yet.