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`

未关闭
#255 5 条评论 0 个 reaction 已指派 1 人 已被 @WingCode 认领 在 GitHub 查看
good first issue
主要语言
Python
星标
47
派生
41
平均合并
4 天 1 小时
30 天内合并 PR
2

描述

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)`.

贡献指南

打开贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。