Device Submission Basics

This page gives a broad overview of some of the tools available in True-Q™ that facilitate submission of circuits to physical devices and the handling of results retrieved from such a submission. Each section links to pages which explain the relevant tools in detail.

Compiling Circuits

The first step to bridge the gap between True-Q™ and a physical device is to translate circuits into a form that the device can accept. There are two steps in this process:

  1. Writing circuits in terms of native gates. A device will have a native set of gates that it can implement, each with a subset of qubits that it can act on. Therefore, in order to run a circuit on a given device, we must first compile the circuits into the native gateset.

  2. Converting circuits to the software language used by the device. Your current lab setup likely uses a specific quantum computing software language to submit jobs, e.g. QASM. In order to implement a circuit on your device, then, we need to translate the circuits into the device’s native language.

True-Q™ can compile circuits into native gatesets and translate circuits into several quantum computing software languages. Both of the steps outlined above are handled by True-Q™'s compiler tools. When converting to a different quantum computing software language, a user can specify a configuration which contains the native gateset that they want to compile to. Translated gates will then be returned in the specified language, in terms of the native gateset.

The first step to get True-Q™ working for you in the lab is then to construct a configuration for your device that can be used by the True-Q™ compiler. Our Compilation Basics tutorial talks you through writing a configuration for your device.

Note

If you are running a Qiskit backend, you can skip the following compilation step and go straight to the Batching and Submitting section, as compilation will be handled by True-Q™'s Executor.

Once you have a configuration for your device, check out the Compilation Basics tutorial to see how to convert circuits into a form which uses the gateset specified by your configuration.

Batching and Submitting

Once you have circuits in a form that your device can run, you can try submitting them to your device. True-Q™ has several functions that can help make this process easier:

  1. Batching True-Q™'s batching tools allow users to break jobs into batches of a fixed size for submission.

  2. Executor If your device uses a Qiskit backend, you can submit jobs directly using True-Q™. The linked example will step through the process for directly submitting circuits to a device running a Qiskit backend using True-Q™.

Handling Results

After retrieving results from your device, you may wish to do some post-processing or save the results while keeping them paired with the circuit that produced them. In this case, you can set the results of the Circuit object using the returned distribution of bitstrings. For a walkthrough of how to assign the returned results, see Recording Results.

Total running time of the script: ( 0 minutes 0.000 seconds)

Gallery generated by Sphinx-Gallery