Infleqtion / client-superstaq

https://superstaq.readthedocs.io
Apache License 2.0
88 stars 19 forks source link

Missing `basis_gates` in `aqt_keysight_qpu` provider #975

Open cdbf1 opened 4 months ago

cdbf1 commented 4 months ago

What is happening?

When calling the get_target_info() method on the aqt_keysight_qpu provider the basis_gates value is currently showing as None. Should this instead be showing the basic gate set of the device?

How can we reproduce the issue?

The snippet:

provider = qss.SuperstaqProvider()
aqt_keysight_compiler = provider.get_backend("aqt_keysight_qpu")
aqt_keysight_compiler.target_info()

returns the dictionary:

{
    'backend_name': 'aqt_keysight_qpu',
    'backend_version': 'n/a',
    'n_qubits': 4,
    'basis_gates': None,
    'gates': [],
    'local': False,
    'simulator': False,
    'conditional': False,
    'open_pulse': False,
    'memory': False,
    'max_shots': None,
    'coupling_map': [[4, 5], [5, 4], [5, 6], [6, 5], [6, 7], [7, 6]],
    'description': '4 qubit device',
    'supports_midcircuit_measurement': False
}

while I was expecting the 'basic_gates' to return a list of the gates available on this device.

What should happen?

I was expecting the 'basis_gates' to return a list of the gates available on this device.

Environment

Any additional context?

No response

dowusu-antwi commented 4 months ago

Might've been covered in dev meeting, but as we already warn users compiling to AQT when there are no gate/pulse configs present:

# Create a circuit and compile to AQT without configs uploaded.
circuit = cirq.Circuit(cirq.H(cirq.q(0)))
compiler_output = service.aqt_compile(circuit1)
# Generates the following warning:
# ~/.../python3.11/site-packages/cirq_superstaq/compiler_output.py:282:
#     UserWarning: This output only contains compiled circuits (using a default AQT gate set)...

so we could similarly add a warning to target_info.

Also, somewhat tangentially: @richrines1 can aqt_get_configs and aqt_download_cofigs be unified? (If there's a reason they're separate, can we document it?)

richrines1 commented 4 months ago

so i think that warning and all the /aqt*configs endpoints will soon be removed altogether:

once these changes are made, it will maybe make sense to allow the same configs/device info to be passed to target_info? that way we could return things like the correct basis gate set

bharat-thotakura commented 3 months ago

This issue might be a duplicate sub-issue of https://github.com/Infleqtion/client-superstaq/issues/678