PennyLaneAI / pennylane-rigetti

This PennyLane plugin allows the Rigetti Forest QPUs, QVM, and wavefunction simulator to optimize quantum circuits.
https://docs.pennylane.ai/projects/rigetti
BSD 3-Clause "New" or "Revised" License
37 stars 28 forks source link

Update the lattices used in the documentation #47

Open antalszava opened 4 years ago

antalszava commented 4 years ago

The lattices used when creating a device based on the documentation seem to be outdated. For example:

>>> dev_qpu = qml.device('forest.qpu', device='Aspen-0-12Q-A', shots=1000)
  File "/anaconda3/lib/python3.7/site-packages/pyquil/api/_devices.py", line 147, in _get_raw_lattice_data
    res = get_json(session, f"{config.forest_url}/lattices/{lattice_name}")
  File "/anaconda3/lib/python3.7/site-packages/pyquil/api/_base_connection.py", line 54, in get_json
    raise parse_error(res)
pyquil.api._errors.UnknownApiError: Lattice with name 'Aspen-0-12Q-A' not found.

This is true for multiple lattices used on the Usage page when creating a device.

josh146 commented 4 years ago

Hmm, I'm not sure what the most satisfying solution is here. We could:

  1. Update the lattice name, but then there is a maintenance overhead

  2. Add a disclaimer below the codeblock

antalszava commented 4 years ago

Yes, perhaps having option 2 to instruct the user to change the lattice name to one that is available based on the output of

import pyquil
pyquil.list_quantum_computers()

could be helpful. And then having a placeholder for the name could also be good because then the user wouldn't have the feeling that the command should work straight away.

josh146 commented 4 years ago

It might be good to align with the approach taken in the PyQuil documentation