Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Future-proof pulse control notebook #235

Open
laurencap opened this issue Jan 13, 2023 · 0 comments
Open

Future-proof pulse control notebook #235

laurencap opened this issue Jan 13, 2023 · 0 comments
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@laurencap
Copy link
Contributor

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

@laurencap laurencap added enhancement New feature or request good first issue Good for newcomers labels Jan 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

1 participant