amazon-braket / amazon-braket/amazon-braket-examples
Future-proof pulse control notebook
- Langage dominant
- Python
- Étoiles
- 589
- Forks
- 262
- Merge moyen
- 13 h 38 min
- PR mergées (30 j)
- 7
Description
**Is your feature request related to a problem? Please describe.**
https://github.com/aws/amazon-braket-examples/blob/main/examples/pulse_control/3_Bell_pair_with_pulses_Rigetti.ipynb
This notebook uses hardcoded qubits:
```
a=10
b=113
```
This works for the topology of the current Rigetti devices, but it would be great if the notebook would work for any future Rigetti devices, as well.
**Describe the solution you'd like**
A random pair of connected qubits can be generated from a given `device` as follows:
```
import numpy as np
connectivity = device.properties.paradigm.connectivity.connectivityGraph
qubit_a = np.random.choice(list(connectivity.keys()))
neighbors = connectivity[str(qubit)]
qubit_b = neighbors[np.random.randint(len(neighbors))]
```
**Describe alternatives you've considered**
Guide de contribution
Ouvrir le guide de contribution
Évaluation
Cette issue n'a pas encore été évaluée.