Introduction

IonQ’s default error mitigation strategy is debiasing, a compiler-level error mitigation strategy that works by creating and running many symmetric variations of a given circuit. Results from the different circuit executions are aggregated to minimize the impact of some types of noise. Aggregation is performed via averaging and via sharpening (plurality voting) and the aggregated results from either strategy can be retrieved, depending on the specific application. This technique is very general and doesn’t require additional shot or qubit overhead.

This guide covers when debiasing is applied, how to enable or disable debiasing when submitting a job via Qiskit, and how to retrieve results with averaging or sharpening via Qiskit. For more details about this technique and how it works, refer to our debiasing and sharpening guide.


Error mitigation defaults

For jobs submitted to IonQ QPUs via the IonQ cloud, debiasing is enabled by default for jobs with 500 or more shots, but it can be disabled (as shown below). It is not used for jobs with fewer than 500 shots, and cannot be enabled - at least 500 shots are required in order to obtain a significant number of results for each circuit execution variant.

These default settings and shot cutoffs apply for jobs submitted directly to the IonQ cloud platform, and they may be different for jobs submitted via our cloud partners.

Debiasing is not currently available for jobs run via IonQ’s simulators, including our noisy simulators.

In most cases, there is a minimum cost for jobs run on IonQ’s QPUs, and this minimum cost is increased by debiasing. For small circuits, splitting a job into multiple executions can add a significant amount of time relative to the actual circuit duration, so debiasing makes the job more expensive. If you are running particularly shallow circuits that yield high-quality results without error mitigation, you may prefer to disable debiasing. For more specifics on pricing, please contact your IonQ representative directly.

Specifying the debiasing settings

To explicitly specify the debiasing setting for a job, we need to:

  1. Import ErrorMitigation from qiskit_ionq
  2. Pass either error_mitigation=ErrorMitigation.DEBIASING or error_mitigation=ErrorMitigation.NO_DEBIASING when calling backend.run()

In this example, we’ll disable debiasing for a job with 1000 shots (where it would be enabled by default).

from qiskit import QuantumCircuit
from qiskit_ionq import IonQProvider, ErrorMitigation

provider = IonQProvider()
qpu_backend = provider.get_backend("ionq_qpu.aria-1")

# Create a basic Bell State circuit:
qc = QuantumCircuit(2, 2, name="Debiasing Off")
qc.h(0)
qc.cx(0, 1)
qc.measure([0, 1], [0, 1])

# Run the circuit on IonQ's platform:
job = qpu_backend.run(
    qc,
    shots=1000,
    error_mitigation=ErrorMitigation.NO_DEBIASING
)

Retrieving and aggregating results

After a job is run with debiasing, there are two options for aggregating the results over the different symmetric variants. You can read more about component-wise averaging, sharpening via plurality voting, and which one to choose in our debiasing guide.

Component-wise averaging computes the mean probabilities over all circuit variants, which preserves the measured probability distribution. This is the default aggregation method used when retrieving the results of a job. Once you have a job (either one that you just submitted, or one retrieved using the job ID and backend.retrieve_job(job_id)), just get the counts.

print(job.get_counts())

The above example might give something like:

{'11': 505, '00': 483, '10': 9, '01': 3}

Note that job.result().get_counts() and job.result(sharpen=False).get_counts() are equivalent.

Sharpening via plurality voting is a different aggregation strategy which takes the highest-probability result from each variant. For circuits where you’re trying to identify one or a few high-probability states, debiasing and sharpening can greatly improve the result quality.

print(job.result(sharpen=True).get_counts())

For this example, the sharpened result looks like:

{'00': 530, '11': 470}

The QPU result included a few measurements of the 10 and 01 states, which can only occur due to error. These were included when the results were aggregated by averaging. However, when sharpening was used, we counted only the highest-probability state from each circuit variant that was run, and these states were always either 00 or 11.


Additional resources