amazon-braket / amazon-braket/amazon-braket-examples

get list of measured bistrings from Aquila

未關閉
#369 3 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視
good first issue
主要語言
Python
星號
589
分支
262
平均合併
13 小時 38 分鐘
30 天內合併 PR
7

描述

For some analysis, say evaluation of stability of the HW, one needs to see the bistrings from all shots, presented as a list.
Currently you provide only the summary in the form of dictionary of all unique bistrings and the number of occurences. It is done by get_counts():
`https://amazon-braket-sdk-python.readthedocs.io/en/latest/_modules/braket/tasks/analog_hamiltonian_simulation_quantum_task_result.html#AnalogHamiltonianSimulationQuantumTaskResult.get_counts
`
Can you provide also new function get_shots(), which would differ very little from get_counts(), namely instead of accumulating the dictionary:
```
state_counts = Counter()
for shot in self.measurements:
...
state_counts.update((state,))
return dict(state_counts)
```
it would append a list:
```
state_list = []
for shot in self.measurements:
...
state_list.append(state)
return state_list
```
I can hack it for now, but this type of functionality is of general use. E.g. it is available in Qiskit or TKet.
Thanks, Jan

貢獻指南

開啟貢獻指南

評估

這個 Issue 還沒有評估資料。

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。