IQMBackend#

IQMBackend(api_token, device_instance=None, server_url=None, compilation_options=None)[source]#

This function instantiates an IQMBackend based on VirtualBackend using Qiskit and Qiskit-on-IQM.

Parameters:
api_tokenstr

An API token retrieved from the IQM Resonance website or IQM backend.

device_instancestr

The device instance of the IQM backend such as garnet. For an up-to-date list, see the IQM Resonance website. Required if server_url is not provided.

server_urlstr, optional

The server URL of the IQM backend. If not provided, it defaults to IQM resonance using the device_instance. If a server URL is provided, a device instance should not be provided.

compilation_options: `CircuitCompilationOptions <https://docs.meetiqm.com/iqm-client/api/iqm.iqm_client.models.CircuitCompilationOptions.html>`_.

An object to specify several options regarding pulse-level compilation.

Examples

We evaluate a QuantumFloat multiplication on the 20-qubit IQM Garnet.

>>> from qrisp.interface import IQMBackend
>>> qrisp_garnet = IQMBackend(api_token = "YOUR_IQM_RESONANCE_TOKEN", device_instance = "garnet")
>>> from qrisp import QuantumFloat
>>> a = QuantumFloat(2)
>>> a[:] = 2
>>> b = a*a
>>> b.get_measurement(backend = qrisp_garnet, shots = 1000)
{4: 0.548,
 5: 0.082,
 0: 0.063,
 6: 0.042,
 8: 0.031,
 2: 0.029,
 12: 0.014,
 10: 0.03,
 1: 0.027,
 7: 0.025,
 15: 0.023,
 9: 0.021,
 14: 0.021,
 13: 0.018,
 11: 0.014,
 3: 0.012}