How to set up Fire Opal in qBraid
qbraid_lab
> fire_opal
> get-started.ipynb
to follow along with the code examples in this tutorial.
Python 3 [FireOpal]
(see switch notebook kernel). Then, verify that the Fire Opal environment
is configured correctly by running the following code in the first cell:
organization_slug
is the unique ID used to identify this organization. You can check organization names and other
details by visiting your Q-CTRL account.
draw_circuit
: draws our QASM circuitplot_bv_results
: plots the results of our experimentsdraw_circuit
. Such a string can also be generated by exporting a quantum circuit written
with any quantum-specific Python library.
show_supported_devices
to list the devices that are both supported by Fire Opal and accessible
to you when using the credentials
above.
"desired_backend"
. The list will only include devices
accessible to you.
validate_results["results"] == []
. Note that the length of the validate_results
list is the total number of errors present
across all circuits in a batch. Since our circuit is error free, we can execute our circuit on real hardware.
111 111 111 11
.
However in real quantum hardware, noise disturbs the state of the system and degrades performance, decreasing the probability of
obtaining the correct answer for any single experiment. Fire Opal automates the adjustments made by experts when running circuits
on a real device.
111 111 111 11
state.
We should also take note of the amount of incorrect states that now contain non-zero return probabilities. Not only do default
configurations fail to find the correct answer, they also increase the probabilities of the incorrect answers.
In fact, the performance degradation is so severe that in order to be reasonably sure of the hidden string, using the original
classical algorithm would be more efficient.
You can tell that Fire Opal found the correct answer because the mode of the output distribution, or the most frequent outcome,
matches the desired output: bitstring 111 111 111 11
. Fire Opal significantly improves the probability of a successful outcome,
often by a factor of ten or more.