What is debiasing?
Debiasing, sometimes called symmetrization or diversification, is a compiler-level error mitigation strategy that works by creating and running many symmetric variations of a given circuit. Debiasing reduces the overall impact of stochastic noise on the computed result — the deterministic inaccuracies largely cancel out while random noise does not get amplified. This approach effectively mitigates the impact of hardware control errors and qubit decoherence, which are major sources of imperfection in modern quantum technologies. Debiased mapping relies on identifying certain symmetries that arise at multiple levels of quantum computer hardware and using them to generate variant circuit implementations. That is, we identify and create variations of a circuit that should be identical on a noiseless machine, but in practice are not due to stochastic error. Different qubit assignments, gate decompositions, and pulse sequences can all be used to create variant implementations.
Default settings and availability
Debiasing is available for all IonQ QPUs, but it is not currently available for the IonQ Quantum Cloud simulator, including the simulator with noise model. Debiasing can’t be used for jobs with fewer than 500 shots, since each execution needs a meaningful number of shots. For any job with fewer than 500 shots, debiasing is automatically disabled and cannot be turned on. For jobs submitted to the IonQ Quantum Cloud in standard QIS gates, debiasing is enabled by default for jobs with 500 or more shots, but it can be turned off. For jobs submitted to the IonQ Quantum Cloud using IonQ’s native gateset, debiasing is disabled by default. However, it can be turned on if the job has 500 or more shots. You may want to turn on debiasing for a native-gate job if you are looking to maximize performance, but you may prefer not to use it if your experiment requires a consistent qubit mapping.Some integrations and cloud partners may have different default settings or require more shots for debiasing.
Effect on job cost
While debiasing doesn’t increase the number of circuits or shots in the job, it adds a small amount of classical overhead which can be relatively significant for small jobs (few gates and/or few shots). To account for this, the minimum per-circuit-job cost for a system is higher when debiasing is enabled. However, for larger jobs, the job cost is not affected by debiasing. Our resource estimator tool, job estimate API endpoint, and dry run job submission option all take the debiasing setting into account when estimating job cost. You can use any of these tools to determine whether turning debiasing on or off will change the expected cost of a job. In general, we recommend keeping debiasing on for medium and large circuits in order to maximize performance, since it will not affect job cost in these cases. However, for very shallow circuits or small test jobs, turning debiasing off can give similar results while conserving credit.How to use debiasing
In the IonQ v0.3 API, the create job request should include"error_mitigation": { "debias": True }
or "error_mitigation": { "debias": False }
.
In the IonQ v0.4 API, debiasing is in the create job request under the “settings” field.
ErrorMitigation
from qiskit-ionq
and pass error_mitigation=ErrorMitigation.DEBIASING
or error_mitigation=ErrorMitigation.NO_DEBIASING
when calling backend.run()
.
In Cirq, pass error_mitigation={"debias": True}
or error_mitigation={"debias": False}
when calling service.run()
or service.create_job()
.
Here’s several examples of a “Hello world” circuit with 1000 shots where debiasing is turned off (overriding the default, where it would be turned on):
Aggregating job results over executions
When a job is run with debiasing, we also provide two options for combining the results from the different executions (circuit variants) that were run. The default aggregation can be used with any type of algorithm, application, or result type, while sharpening provides an option for additional post-processing that can amplify signal for results that should have a small number of high-probability states. Debiasing enables sharpening by splitting the job into distinct executions, but sharpening is not required when using debiasing.Default - averaging
By default, the measurements from each execution are directly combined into one histogram, providing a probability distribution that represents the average over all executions. The results from each individual execution are not provided separately, but the overall result reflects the combination of all executions. This approach (debiasing without additional post-selection) is versatile and can be used for most, if not all, types of algorithms and applications.Sharpening
Optionally, the results from each execution can be combined via sharpening (also known as plurality voting). With this option, all counts from each execution are assigned to the highest-probability bitstring from that execution. For jobs where the expected probability distribution features one or a few quantum states, or where you are trying to identify the highest-probability quantum state, sharpening can amplify the desired signal and remove counts for low-probability states.
Retrieving job results with sharpening
While debiasing is set “on” or “off” when the job is submitted, sharpening is an option used for result retrieval. When retrieving the results from a job that was run with debiasing, you can always choose to apply sharpening or not (or you can retrieve the result both ways for comparison). If you request a sharpened result from a job that was not run with debiasing, you’ll receive an error.Sharpening is “opt-in”: the default setting is always to retrieve the result without sharpening.
sharpen
to retrieve a job result with sharpening. In Python, this looks like passing params={"sharpen": True}
to the request call. Note that the specific request URL format is different between v0.3 (.../{job_id}/results
) and v0.4 (.../{job_id}/results/probabilities
).
In Qiskit, use job.result(sharpen=True).get_counts()
rather than job.get_counts()
to retrieve a job result with sharpening.
In Cirq, use job.results(sharpen=True)
to retrieve a job result with sharpening.
In all of these examples, setting this value to False
or omitting it will give the default, non-sharpened result.
Here’s several examples of retrieving a sharpened job result, given a job ID: