What’s New in Qiskit 0.12

Catherine Klauss
Qiskit
Published in
5 min readAug 29, 2019

Qiskit released an update last Thursday with a myriad of changes, many of which revolve around our favorite quantum computing villain — noise. There are also several new algorithms and a new drawing tool, so there’s plenty to cover today.

In this post we’ll cover some of our favorite changes of the latest release, starting with the most exciting. For a more complete list of changes, check out the latest release notes.

Aqua 0.6

QEOM

First off, we’re excited to see a brand-new algorithm for calculating the excited states of small molecules. Called Quantum Equation of Motion, or QEOM for short, this algorithm calculates excited states of molecules, which is a first step towards understanding molecular behavior. Understandings like this are of interest to industries such as pharmaceutical and battery, to name a couple.

Now, if you already know of Aqua’s QSE (quantum substate expansion) algorithm, you may be thinking, wait, I can already calculate a molecule’s excited states. But hear us out — QEOM is more resistant to computational noise. While QSE calculated the energy values of the excited states themselves, QEOM calculates the energy difference between excited states and the ground state.

Open-Shell Molecule Simulations

In addition to providing more noise-avoidant algorithms to calculate a molecule’s excited states, we’re also happy to see that Aqua now supports open-shell molecules.

Previously, we could only simulate closed-shell molecules, meaning that the molecules must have only paired electrons. Now, we can also calculate the energies of open-shell molecules, meaning the molecules can be in the doublet or triplet states. These open-shell molecules, such as everybody’s favorite radical, OH- (hydroxide), are much more reactive than their closed-shell counterparts, and thus are found in many chemistry and physics experiments.

+ more

There’s also a new algorithm, called Maximum Likelihood Amplitude Estimation, that more efficiently (read: reduced depth) estimates amplitudes, and therefore has uses in applications such as finance. This algorithm achieves better efficiency by forgoing the use of quantum phase estimation.

For more information on these algorithms, and a complete list of the changes to Aqua, check out the release notes.

Ignis 0.2

There were plenty of updates to Ignis this time around, but by far our two favorites are the two new methods for measuring gate noise.

Specifically, we now have two new methods to run randomized benchmarking, for a total of four. For those who need a refresher, randomized benchmarking (RB) is one of two processes users can leverage to measure gate fidelity (the other process is tomography).

The two new methods of RB introduced last week are Interleaved RB and Purity RB.

Interleaved Randomized Benchmarking

With interleaved RB we can now estimate the error of a specific gate. While in standard RB the errors of all Clifford gates are estimated together, interleaved RB focuses on a specific gate’s error by inserting said gate between each random Clifford gate.

Purity Randomized Benchmarking

The addition of Purity RB, on the other hand, gives us the ability to differentiate incoherent and coherent error. Incoherent error is the error that arises due to decay of the system — i.e., limited lifetimes (T1) and dispersion in the XY plane (T2). And while standard RB measures the total error (incoherent + coherent error), Purity RB measures solely the incoherent error through the trace of the density matrix squared. In a way, Purity RB is like “a specialized version of tomography,” according to Ignis developers.

+ more

There’s also a logging module and a repetition code added as part of this update. As always, see the release notes for a more detailed description of the latest changes.

Aer 0.3

While some developers are trying to avoid noise, and others are trying to quantify noise, only the Aer developers would be inclined to simulate noise.

QASM Updates

There are two new updates to Aer’s QASM simulator, which is a backend that mimics a real device. The first update is a new density matrix simulation that more quickly simulates the expected noise from real hardware. The second update is a matrix product state simulator that can better simulate many qubits.

Snapshots

While improvement updates to QASM are always helpful for hardware mocking, Aer’s developers have sought (and succeeded) to make simulations a more useful debugging tool too. As part of this debugging effort, developers have finally made Snapshots available on every simulator!

If you haven’t used Snapshots before, it’s a way to sneak a look at your quantum system — whether as a state vector, stabilizer, density matrix, probability or expectation value — before it collapses under measurement. Implementing the tool is as easy as designing a circuit, inserting a Snapshot instruction, and running the simulation.

+ more

Check 👏 Out 👏 The 👏 Release 👏 Notes

Terra 0.9

Finally, to our trusty Terra, what updates do you have in store for us now?

The biggest updates to Terra were to the transpiler, which is the like bridge troll of quantum computing (as in, it translates and optimizes your circuits to run on hardware, or refuses them altogether). Many of the complaints we’ve had of the transpiler thus far are that it has been (1) too slow, and (2) too mysterious. So we’re happy to see that both of these complaints have been addressed by two new abilities.

Transpiler Tools

There are two new abilities that help understand the transpiler. The first is the ability to select a call-back, in which a function can be run between each pass. As a reminder, the transpiler requires multiple passes to translate and optimize your circuit, usually no less than a dozen passes in total.

The second is the ability to ask for logs to be emitted at INFO levels. By asking for logs at this level, we can access pass names and records of how long each pass took.

Combined, these two new abilities grant us everything we need to keep an eye on that transpiler and debug whatever tricks it might be up to.

Transpiler Layout

The transpiler layout specifies the qubit assignments (left) in circuit drawings and is now applied to every drawing, regardless of whether qubits have been specifically assigned.

And speaking of that tricky transpiler, nothing helps us understand its inner workings like a good ole drawing. That’s why we’re very happy to see the new initial layout function in Terra become more ubiquitous — qubit assignments are now specified in all circuit drawings. While we previously could assign our pretend circuit qubits to real hardware qubits, with this new layout function we’ll see this assignment whether we’ve specified it or not. This new feature certainly makes the transpiler’s layout choices more transparent. But is it enough to strengthen our trust in the transpiler as a whole? We’re optimistic.

+ more

Beyond transpiler updates, Terra now has new ways to specify the parameters that define gate values. While previously we could assign a parameter to be a variable, now we can perform algebra with those variables too. This has the added benefit of being able to reuse parameters in multiple gates with different values, so we’re a big fan all-around of the capabilities this unleashes. And if the complicated equation needed to define your parameter spans beyond basic algebra, you can now define the values with an array using the new ParameterVector.

Terra, in particular, had a bunch of small updates in this release, so we can’t recommend enough for you to check out the release notes for a full account.

Are you happy with the updates, or have you found any new bugs? Share your favorite 0.12 changes below, but report any issues to the Qiskit GitHub.

--

--

Catherine Klauss
Qiskit
Writer for

Quantum Physicist, Writer, and Outdoor Enthusiast. Twitter @KlaussMouse