A Qiskit User’s Guide to IBM Quantum Summit 2022

Qiskit
Qiskit
Published in
7 min readDec 28, 2022
Reprinted with permission from IBM Quantum.

By Abby Mitchell, Luciano Bello, and Robert Davis

The IBM Quantum Summit 2022 brought a flurry of announcements about the latest innovations in quantum computing, from record-breaking hardware advances to industry-leading partnerships. But with so much news coming out of the event, we know you may need some help figuring out which headlines point to new tools and features Qiskit users can explore today—or at least in the near future. We’re here to help.

Many of the technical announcements from IBM Quantum Summit 2022 concern long-term projects like the 100×100 Challenge and the IBM Quantum System Two. Others concern “under the hood” improvements to IBM Quantum devices—system upgrades that will enhance the user experience regardless of whether users are aware of them. For this blog, however, we’re focusing our attention on a third category of announcements, those which introduce new software tools that Qiskit users can start applying to their work right away.

In particular, there are five new features that Qiskit users, especially Qiskit Runtime users, can experiment with today to enhance the accuracy, variety, and scale of the quantum circuits they run with Qiskit. These include new capabilities related to (1) error mitigation, (2) error suppression, (3) dynamic circuits, (4) circuit knitting, and (5) quantum serverless. Below, we take a closer look at what each of these new tools and features can do, and show how you can start incorporating them into Qiskit code.

Quantum error suppression and mitigation come to Qiskit Runtime

IBM Quantum researchers have put a lot of focus this year on the important role that error handling techniques like quantum error mitigation and quantum error suppression will play in achieving truly useful quantum computation. Now, they’re putting those techniques into the hands of Qiskit users with the beta-release of the new “Optimization” and “Resilience” level settings in Qiskit Runtime primitives—tools focusedon reducing or removing noise in quantum computations.

Using quantum error suppression and quantum error mitigation once required specialized knowledge, but Qiskit Runtime primitives are meant to create a frictionless experience for users. Now anyone can easily apply these techniques to investigate the value that unbiased observables could bring to their applications, and to experiment with the various overhead tradeoffs that come with different techniques.

Qiskit Runtime users can now tap into the power of quantum error suppression by selecting from one of four different optimization levels, with higher optimization levels generating more optimized circuits at the expense of longer transpilation times. For example, let’s say you’re using a Qiskit Runtime Estimator primitive and you want to apply a Dynamical Decoupling technique for error suppression. We can do this by setting options.optimization_level and passing it to the Estimator object—see below for an example:

...
options = Options()
options.resilience_level = 0 # No error mitigation enabled
options.optimization_level = 1 # Enable Dynamical Decoupling error suppression
options.execution.shots = 1000

with Session(service=service, backend=backend) as session:
estimator = Estimator(session=session, options=options)
job = estimator.run(circuits=my_circuits, observables=obs_list)
res = job.result()
...

Along the same lines, users can also select one of four resilience levels to apply varying degrees of error mitigation to their quantum circuits, with a similar time vs. accuracy tradeoff. For example, let’s say you’re using a Qiskit Runtime Estimator primitive, and you want to apply a Zero-Noise Extrapolation technique for error mitigation. All you need to do is set options.resilience_level and pass it to your Estimator object, like so:

...
options = Options()
options.resilience_level = 2 # Enable ZNE error mitigation
options.optimization_level = 0 # No error suppresssion optimization enabled
options.execution.shots = 1000

with Session(service=service, backend=backend) as session:
estimator = Estimator(session=session, options=options)
job = estimator.run(circuits=my_circuits, observables=obs_list)
res = job.result()
...

Learn more about these techniques and get started today with new quantum error suppression and quantum error mitigation tools, available only in Qiskit Runtime. See below for links to key documentation on qiskit.org.

Qiskit Tutorial: Error suppression and error mitigation with Qiskit Runtime
Qiskit Tutorial:
Configure Error Mitigation
Qiskit Tutorial:
Configure Error Suppression

Setting resilience levels to explore error mitigation. Reprinted with permission from IBM Quantum.
Setting resilience levels to explore error mitigation. Reprinted with permission from IBM Quantum.

Dynamic circuits are rolling out to 18 IBM Quantum systems worldwide

The IBM Quantum Summit 2022 also brought the introduction of dynamic circuits, a new capability that delivers useful advantages over traditional static circuits, to IBM Quantum processors. In a static quantum circuit, we initialize our qubits, run the qubits through a sequence of gates, and take measurements at the end. None of these quantum operations depend on data produced during the circuit runtime. But dynamic circuits are different. They incorporate classical processing within the coherence times of the qubits, vastly increasing the type of computational logic that circuits can express.

Dynamic circuits allow us to take mid-circuit measurements and perform “feed-forward” operations, where we define a gate as a function of measurement outcomes. In other words, dynamic circuits give us the ability take a measurement in the middle of a circuit, and use the outcome of that measurement to decide which gates to apply next in that circuit.

A demonstration of how dynamic circuits can shorten a circuit. Reprinted with permission from IBM Quantum.

Over the long term, dynamic circuits will be an exciting playground for anyone who’s interested in the push toward fault-tolerant quantum computing and quantum error correction. In the near-term, dynamic circuits will give users new opportunities to reduce circuit depth across a range of applications, since mid-circuit measurements enable much cleaner implementations of, for example, quantum teleportation than we can achieve with static circuits. Dynamic circuits also enable more efficient state preparations.

Mid-circuit measurements also unlock the ability to incorporate classical conditional logic—such as IF/THEN statements and FOR loops that are ubiquitous in classical computing—directly into quantum circuits. Users can even create code blocks or circuit constructions that are bundled together and nested under an IF/ELSE chain or in a looping structure, leveraging mid-circuit measurements to steer the quantum execution in a way that is impossible with static circuits.

As an example, let’s say you want to create a simple circuit that will add up to 5 Hadamard gates until a mid-circuit measurement operation on q0 measures a 1. You could encode this logic into your circuit using mid-circuit measurements as part of a dynamic circuit for loop and if statement:

# construct a circuit with 2 qubits
qc = QuantumCircuit(1, 2)

# construct a for-5-loop that will break if 1 is measured in q0
with qc.for_loop(range(5)): # each time the loop is run,
qc.reset(0) # reset q0
qc.h(0) # add a Hadamard gate,
qc.measure(0, 0) # and add a mid-circuit measurement
with qc.if_test((0, True)):
# if 1 is measured on q0, break the loop, otherwise continue adding H
qc.break_loop()

# do a final measurement outside of for loop to get final result
qc.measure(0, 1)

# run circuit and get results
backend.run(qc).result().get_counts() # {'00': 0.25, '11': 0.75}

Click here to view IBM Quantum’s documentation and tutorials for dynamic circuits and start experimenting with them for yourself.

Expanding the power of quantum with Circuit Knitting and Quantum Serverless

Finally, let’s take a quick look at two new solutions that are still in the very earliest stages of development: the new Circuit Knitting Toolbox and Quantum Serverless. Both are examples of quantum middleware, software tools that enable high-performance quantum applications to run across a parallelized, cloud-based mix of quantum and classical resources. IBM researchers believe these tools will dramatically increase the scale and complexity of the problems we’re able to solve on quantum devices in the near term.

The Circuit Knitting Toolbox enables users to decompose a quantum circuit into smaller circuits, execute those smaller circuits on one or more quantum processors, and then “knit” these results back together to derive a solution to the original circuit. Quantum Serverless, on the other hand, is a powerful tool that takes over the heavy lifting of resource allocation and infrastructure management so users can easily execute hybrid quantum-classical workloads. Much like the new optimization and resilience settings introduced for error handling, these solutions abstract away the complexity of tasks like circuit decomposition and resource allocation so users can stay focused on the problem at hand.

The Circuit Knitting Toolbox and Quantum Serverless are both currently in alpha release, meaning they’re still rough around the edges. Full releases for both tools are scheduled for 2025, but you can start exploring the code today and even begin making open source contributions to either project via the Github repos linked below.

IBM Research Blog: Circuit Knitting Overview
Github:
Circuit Knitting Repo
Github:
Quantum Serverless Repo

A schematic demonstrating how quantum serverless works. Reprinted with permission from IBM Quantum.
A summary of different circuit knitting techniques. Reprinted with permission from IBM Quantum.

A new era in quantum software development

From powerful error-handling solutions like the Qiskit Runtime optimization level setting to experimental quantum middleware like the Circuit Knitting Toolbox, these developments all signal the beginnings of a new era in quantum software.

As we’ve seen above, many of these tools are designed to deliver a more frictionless experience so developers can spend more time focused on the problems they want to solve and less time worrying about the systems, resources, and techniques they’ll use to solve them. At the same time, these tools also provide means for extending the power, scale, and accuracy of quantum circuits before weachieve fault tolerance.

Of course, the only way to see how well these tools work under real world conditions is for Qiskit Runtime users to test them out, identify their strengths and weaknesses, and submit any issue (or even better, a PR!) to our GitHub repos to ensure they’re the best they can possible be. We hope you’ll get involved.

--

--

Qiskit
Qiskit

An open source quantum computing framework for writing quantum experiments and applications