0% found this document useful (0 votes)
40 views8 pages

2019 Date Qiskit Working With and Developing For Real Quantum Computers

The document discusses IBM's Qiskit toolchain, which enables users to work with and develop applications for real quantum computers. It highlights the significance of Qiskit as an open-source framework that facilitates quantum programming and experimentation, while also addressing the need for better coordination between the design automation and quantum computing communities. The paper provides an overview of Qiskit's libraries, user perspectives, and the potential for collaboration in advancing quantum technologies.

Uploaded by

rg.reis
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
40 views8 pages

2019 Date Qiskit Working With and Developing For Real Quantum Computers

The document discusses IBM's Qiskit toolchain, which enables users to work with and develop applications for real quantum computers. It highlights the significance of Qiskit as an open-source framework that facilitates quantum programming and experimentation, while also addressing the need for better coordination between the design automation and quantum computing communities. The paper provides an overview of Qiskit's libraries, user perspectives, and the potential for collaboration in advancing quantum technologies.

Uploaded by

rg.reis
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 8

See discussions, stats, and author profiles for this publication at: https://www.researchgate.

net/publication/333159955

IBM’s Qiskit Tool Chain: Working with and Developing for Real Quantum
Computers

Conference Paper · March 2019


DOI: 10.23919/DATE.2019.8715261

CITATIONS READS
147 2,639

3 authors, including:

Robert Wille Y. Naveh


Technical University of Munich IBM
769 PUBLICATIONS 11,336 CITATIONS 59 PUBLICATIONS 1,446 CITATIONS

SEE PROFILE SEE PROFILE

All content following this page was uploaded by Robert Wille on 18 December 2020.

The user has requested enhancement of the downloaded file.


IBM’s Qiskit Tool Chain:
Working with and Developing for Real Quantum Computers
(Special Session Summary)

Robert Wille1 Rod Van Meter2 Yehuda Naveh3


1 Institute
for Integrated Circuits, Johannes Kepler University, Linz, Austria
2 Keio University, Japan
3 IBM Research – Haifa, Israel

[email protected], [email protected], [email protected]

Abstract—Quantum computers promise substantial speedups computing. In addition to real-hardware machines, IBM also
over conventional machines for many practical applications. provides state-of-the-art simulators for simulating quantum
While considered “dreams of the future” for a long time, first programs on conventional machines.
quantum computers are available now which can be utilized
by anyone. A leading force within this development is IBM In order to write corresponding code and run experiments
Research which launched the IBM Q Experience – the first on those quantum computers, IBM also launched Qiskit –
industrial initiative to build universal quantum computers and an open-source framework aimed for researchers, teachers,
make them accessible to a broad audience through cloud access.
Along this initiative, the tool Qiskit has been launched which
developers, and general enthusiasts. For the design automation
enables researchers, teachers, developers, and general enthusiasts community, this is an ideal playground. In fact, many prob-
to write corresponding code and to run experiments on those lems in the domain of quantum computing can be addressed
machines. At the same time, this provides an ideal playground perfectly by automated methods and experiences [32]. Unfor-
for the design automation community which – through Qiskit – tunately, there is still far too little coordination between the
can deploy improved solutions e.g. on designing and realizing
quantum applications. This special session summary aims to
design automation community and the quantum community.
provide an introduction into Qiskit and is showcasing selected Consequently, many automatic approaches proposed in the
success stories on how to work with and develop for it. In addition past have either addressed the wrong problems or failed to
to that, it provides corresponding references to further readings reach the end users. Qiskit provides an ideal platform to bring
in terms of tutorials and scientific papers as well as links to together both communities and to exploit those synergies.
publicly available implementations for Qiskit extensions.
This special summary aims to foster this potential by provid-
I. I NTRODUCTION ing an introduction into Qiskit as well as showcasing selected
success stories on how to work with and develop for it. The
Quantum computers [20] promise substantial speedups over
descriptions shall provide an entry point for the interested but
conventional computers for many practical applications such
yet unexperienced reader. In combination with the references
as quantum chemistry, optimization, machine learning, cryp-
to further readings in terms of tutorials and scientific papers as
tography, quantum simulation, systems of linear equations, and
well as links to publicly available implementations for Qiskit
many more [24]. While considered “dreams of the future”
extensions, this shall equip the reader to efficiently design and
which mainly electrified the academic community only, recent
execute own applications on a real quantum computer. To this
accomplishments leading to the first real quantum computers
end, we will provide a brief overview of different aspects,
which can be utilized by everyone make this topic more and
namely
more relevant for the interested mainstream. A leading force
within this development is IBM Research which launched the • a short high-level description of Qiskit (covered in Sec-
IBM Q Experience in 2017 [1]. tion III)
This initiative represents the first industrial approach to • the user’s perspective on how Qiskit can be utilized to
build universal quantum computers and make them accessible actually work with quantum computers and simulators
to a broad audience through cloud access. While the project (covered in Section IV), as well as,
initially started with the 5-qubit quantum processor IBM QX2 • the developer’s perspective on how to develop new meth-
in March 2017, today it offers a total of four available ods for Qiskit, possibly outperforming existing state of
machines, plus additional in development. As of today, IBM Q the art solutions by using expertise from design automa-
machines have been used by more than 100,000 users, who tion (covered in Section V).
have run more than 6.5 million experiments, resulting in more
than 100 academic papers. Moreover, a worldwide network Before that, a basic introduction into quantum computation,
of Fortune 500 companies, academic institutions, and startups IBM QX, and the corresponding QX architectures are provided
work within this initiative and collaborate to advance quantum in the next section.
II. BACKGROUND OPENQASM 2.0;
include "qelib1.inc";
Before we start diving into Qiskit, this section first provides qreg q[4];
a brief review on the basics of quantum computation in general h q[2];
cx q[2],q[3];
and the IBM Q project as well as the corresponding QX cx q[0],q[1];
architectures in particular. Note that a comprehensive review h q[1];
of the wide field of quantum computation is out of scope for cx q[1],q[2];
t q[0];
this summary paper. Hence, for anyone who wishes to enter cx q[2],q[0];
the field, we refer to a more detailed treatment of the basics cx q[0],q[1];
as provided e.g. in [20].
(a) OpenQASM code
A. Quantum Computation |q0 i T
Quantum computation significantly differs from the conven- |q1 i H
tional computation paradigm. Conventional computations and
|q2 i H
circuits use bits as information units. In contrast, quantum
circuits perform their computations on qubits [20]. These |q3 i

qubits can not only be in one of the two basis states |0i (b) Circuit diagram
or |1i, but also in a superposition of both – allowing for
the representation of all possible 2n basis states of n qubits Fig. 1: Descriptions of a quantum circuit
concurrently. This so-called quantum parallelism, together
with quantum correlations in the form of entanglement and transfered into and out of dilution refrigirators, in which the
quantum interference effects, serve as the basis for algorithms quantum chips are set at an operating temperature of around
that are significantly faster on quantum computers than on 15 mK. Communication into, out of, and among the qubits
conventional machines. is done through on-chip resonators. Diagrams of the various
To this end, the qubits of a quantum circuit are manipulated IBM Q quatum chips can be observed in [2].
by quantum operations represented by so-called quantum The IBM QX architectures support the elementary single
gates. These operations can either operate on a single qubit, qubit operation U (θ, φ, λ) = Rz (φ)Ry (θ)Rz (λ) (i.e. an Euler
or on multiple ones. For multi-qubit gates, we distinguish decomposition) that is composed by two rotations around the
target qubits and control qubits. The value of the target z-axis and one rotations around the y-axis, as well as the
qubits is modified in the case that the control qubits are CNOT operation. By adjusting the parameters θ, φ, and λ,
set to basis state |1i. The Clifford+T library [10], which single-qubit operations can be realized. For specific gates such
is composed of the single-qubit gates H (Hadamard gate) as H or T , direct implementations are also available.
and T (Phase shift by π/4), as well as the two-qubit gate The first backend composed of 5 qubits and called IBM QX2
CNOT (controlled NOT), represents a universal set of quantum was launched in March 2017. In June 2017, IBM launched
operations (i.e. all quantum computations can be implemented a second one called IBM QX3 which is composed of 16
by a circuit composed of gates from this library). physical qubits that are connected with coplanar waveguide
To describe quantum circuits, high level quantum languages bus resonators [4]. In September 2017, IBM launched revised
(e.g. Scaffold [9] or Quipper [13]), quantum assembly lan- versions of their 5-qubit and 16-qubit backends named IBM
guages (e.g. OpenQASM 2.0 developed by IBM [12]), or QX4 and IBM QX5, respectively.
circuit diagrams are employed. In a circuit diagram, qubits When executing quantum circuits or algorithms (such as
are represented by horizontal lines, which are passed through sketched in the previous section) on these architectures, cou-
quantum gates. In contrast to conventional circuits, this how- pling restrictions have to be satisfied. In fact, the user first
ever does not describe a connection of wires with a physical has to decompose all non-elementary quantum operations
gate, but defines (from left to right) in which order the quantum (e.g. Toffoli gate, SWAP gate, or Fredkin gate) to the elemen-
gates are applied to the qubits. tary operations U (θ, φ, λ) and CN OT . Moreover, two-qubit
gates, i.e. CNOT gates, cannot arbitrarily be placed in the
Example 1. Fig. 1 shows a quantum circuit described in architecture but are restricted to prescribed pairs of qubits
OpenQASM (a) as well as in terms of a circuit diagram (b). only. Even within these pairs, it is firmly defined which qubit
is the target and which is the control. These restrictions are
B. IBM QX and Corresponding QX Architectures given by the so-called coupling-map illustrated in Fig. 2, which
The IBM Quantum Experience (IBM QX, [3]) is a web sketches the layout of the IBM QX4 architecture. The circles
portal which allows users to write quantum programs, either indicate physical qubits (denoted by Qi ) and arrows indicate
in OpenQASM or through a graphical interface, and run them the possible CNOT applications, i.e. an arrow pointing from
on actual IBM Q hardware or on conventional simulators physical qubit Qi to qubit Qj defines that a CNOT with control
of the quantum hardware. IBM Q implementation consist of qubit Qi and target qubit Qj can be applied. These restrictions
superconducting transmon qubits [17] on silicon chips. Control are called CNOT-constraints and need to be satisfied in order
and measurements are conducted through microwave pulses to execute a quantum circuit on a QX architecture.
Q4 Q0 is at the basis of many of Aqua’s applications. Tuning this
algorithm (e.g. specifying the optimization procedure to be
Q2 used by the algorithm) can be done by the user, or be set as
default by the Aqua application. Hence, Aqua provides the full
Q3 Q1
range from simple push-button applications, to full tunability
by the user.
Fig. 2: Coupling map of the IBM QX4 architectures [4]
Aer: Aer is expected to include a set of simulators and
emulators for running quantum circuits and applications on
III. T HE Q ISKIT T OOLSET conventional machines. This can serve various practices. It will
provide handy educational means to explore and experiment
Qiskit is an end-to-end open-source software library for with quantum circuits and algorithms without the burden of
quantum computing, covering the full stack from the actual waiting for the scarcer quantum hardware. It will also allow
interaction with the IBM Q hardware, through simulation and the exploration of the behavior of quantum hardware under
emulation, and up to application-level algorithms. The tool controlled conditions e.g. by injecting specific noise processes
itself is thereby arranged in four libraries named after the four into the circuits and observing their effect on the results.
classical elements terra, aqua, aer, and ignis. In the following, Finally, it will allow fast development of quantum algorithms
each library is briefly discussed. by again allowing for a highly-accessible way to run quan-
Terra: The Terra library covers all low-level sections of tum algorithm prototypes on a conventional machine. These
Qiskit. These include tools for specifying and manipulating algorithms can be run on “clean” (noiseless) simulators in
quantum circuits through the OpenQASM language [12], or at order to observe the expected results and enable design-space
the pulse levels through OpenPulse [19]. It provides transpilers exploration. Subsequently, the algorithms can also be run on
to make quantum circuits more optimized for running on real noisy simulators in order to analyze to what extent realistic
hardware e.g. by minimizing occurrences of CNOT gates. This noise levels deteriorate the results of the algorithms. The Aer
way, the user can write a circuit which captures the required library is not yet released.
functionality without investing much effort in optimizing for
Ignis: Finally, the Ignis library will include all constructs
the specific hardware, and then letting the transpiler find a
and implementations of methods related to quantum hardware
more optimized circuit while maintaining the exact functional-
characterization, verification, mitigation, and correction. These
ity prescribed by the user. Terra also includes infrastructure for
include methods of rigorously categorizing and analyzing
specifying and modeling physical noise processes. These are
noise processes in the hardware through randomized bench-
especially important in order to analyze behavior of a quantum
marking, tomography, and multi-faceted comparisons with
algorithm when run on a noisy quantum computer, as is the
simulation. It will also include pulse schemes for mitigation of
case with present-day hardware. Finally, Terra provides the
systematic gate-implementation errors, as well as a portfolio
suitable data structures and interfaces to define the various
of error correcting codes and algorithms. Also the Ignis library
software constructs relevant to quantum computing, and pass
is not yet released.
those constructs among the different Qiskit libraries, and to
the hardware.
Aqua: The Aqua library implements the other edge of the Taken together, the four Qiskit libraries provide the most
spectrum – the high-level quantum algorithms for a multitude comprehensive back-to-back software solutions for quan-
of applications. Here, the user is provided with high level tum computing, all seamlessly connected and communicating
interfaces he or she can use in order to be able to use through the same data structure constructs. The Qiskit software
quantum hardware and simulators, but without the necessity library is complemented by a thorough tutorial library [8]
to learn the details of how to construct quantum circuits. covering the full range of tutorials from novice to the ex-
Once the user provides the structure and parameters of the pert, and from quantum theory to low-level notebook-assisted
application, the actual quantum circuits are created by Aqua implementations of special-purpose quantum circuits.
using the Terra constructs. In addition, conventional flows are
constructed to build and run the quantum circuit, such that each
application is transformed into a conventional-quantum hybrid IV. U SER ’ S P ERSPECTIVE : W ORKING WITH Q ISKIT
algorithm. Those algorithms can then run on a conventional
machine which in turn calls the quantum hardware (or a Using Qiskit, anyone can easily define and execute desired
conventional simulator of the quantum hardware) in order to quantum computations, through cloud access, all the way
implement the full application. Aqua provides solutions taken down to the actual quantum computer. To this end, proper
from application domains such as chemistry and finance. Many description means and methods e.g. for simulation or mapping
of those applications are based on implementations of hybrid to corresponding architectures are provided. In the following,
conventional-quantum algorithms from machine learning, op- we illustrate that by a quick run-through how to install and
timization, and other underlying technologies. Most notably, how to make the first steps with the tool. By this, we provide
the Variational Quantum Eigensolver (VQE) algorithm [15] a brief glimpse into the user’s perspective of Qiskit.
Qiskit can be downloaded through https://qiskit.org/ and
from qiskit import execute, Aer
the links to corresponding github-repositories provided there. c = ClassicalRegister(5, ’c’)
After downloading the tool, it can be installed by executing: measurement = QuantumCircuit(q, c)
measurement.measure(q, c)
$ mkdir qiskit/ measured_circ = circ + measurement
$ cd qiskit/
$ python3 -m venv .qiskitvenv
$ source .qiskitvenv/bin/activate This can then be simulated e.g. by executing:
[within .qiskitvenv]$ pip install qiskit from qiskit.tools.visualization
import plot_histogram
For the hardware backends (i.e. the access to the QX ar- job = execute(measured_circ,
chitectures), additionally a registration at IBM QX is required backend=Aer.get_backend(’qasm_simulator’))
result = job.result()
which yields a token to be deposited.1 Afterwards, you can plot_histogram(job.result().get_counts())
load the QX architecture you would like to work with by
running a Python script with: If the simulation shows the intended result (visualized by a
from qiskit import IBMQ
plot generated by the last line), an execution on a real quan-
IBMQ.load_accounts() tum device can be triggered by changing the backend from
ibmqx4 = IBMQ.get_backend(’ibmqx4’) “qasm_simulator” to the previously loaded backend “ibmqx4”
in the execute-command. In contrast to the simulation, this
In this example, this loads the QX4 architecture whose corre- eventually yields results that have indeed be generated by a
sponding coupling map is shown in Fig. 2. real quantum computer.
Having that, any desired quantum circuit to be executed
on this architecture can be defined; either directly in Python The run-through from above of course only provided a
or through one of the available languages such as the glimpse of Qiskit’s functionality. However, Qiskit provides an
OpenQASM. For example, the quantum circuit depicted in extensive documentation which can be found at https://qiskit.
Fig. 1b can be defined in Python by: org/documentation/ and provides a more detailed treatment.
from qiskit import QuantumCircuit, QuantumRegister, Furthermore, several tutorials (in terms of Jupyter Notebooks)
ClassicalRegister are available at [8]. Using them provides an easy entry point
q = QuantumRegister(4, ’q’)
circ = QuantumCircuit(q) to working with real quantum computers.
circ.h(q[2])
circ.cx(q[2], q[3]) V. D EVELOPER ’ S P ERSPECTIVE : I MPROVING Q ISKIT
circ.cx(q[0], q[1])
circ.h(q[1]) Although Qiskit is a powerful tool, it still offers much room
circ.cx(q[1], q[2]) for improvement. In fact, many problems to be addressed
circ.t(q[0]) by Qiskit are solved in a rather straight-forward fashion
circ.cx(q[2], q[0])
circ.cx(q[0], q[1]) and provide potential for enhancement. In this section, we
exemplify that by the two representative functions introduced
Alternatively, the quantum circuit can be defined in previously in Section IV: simulation and compilation (called
OpenQASM as shown in Fig. 1a and, afterwards, loaded into mapping in the following). More precisely, we sketch how
Qiskit using the command load_qasm_file. simulation can be improved by utilizing a dedicated data-
Then, as reviewed in Section II-B, every circuit has to structure (in terms of decision diagrams) and how the mapping
be properly mapped for the respective architecture, i.e. the procedure can be improved by utilizing different heuristics.
coupling restrictions sketched by the coupling map shown Afterwards, we briefly discuss how improvements like this
in Fig. 2 have to be satisfied. Qiskit offers corresponding can be incorporated into Qiskit. By this, we provide a brief
methods for this compiling process (in the community, this glimpse into the developer’s perspective of Qiskit.
is also often referred to as mapping process). More precisely,
the circuit considered here can be made compatible for the A. Improving Simulation
QX4 architecture using: Simulation takes a given quantum state (usually denoted
by |ψi) and determines its transformation when a sequence
from qiskit import compile, qobj_to_circuits
qobj = compile(circ, ibmqx4) of quantum operations is applied to it. This requires a proper
compiled_circ = qobj_to_circuits(qobj)[0] mathematical description of both quantum states and quantum
operations.
The resulting circuit eventually can be executed on a real Usually, the state of a single qubit is described by
quantum computer. To this end, however, some measurements |ψi = α0 · |0i + α1 · |1i, where α0 , α1 ∈ C denote the am-
should be defined to make clear what outputs are of interest. If plitudes which indicate how much the qubit is related to the
we are interested in the result of all qubits after the execution, basis states |0i and |1i, respectively.2 If a quantum system is
this can be set up by:
2 Note that the amplitudes of a quantum state |ψi must satisfy the normal-
1 Details on this are provided at https://qiskit.org/documentation/install.html. ization constraint |α0 |2 + |α1 |2 = 1.
composed of multiple, i.e. n > 1, qubits, the description can 1

000
001
010
011
100
101
110
111
2

accordingly be extended to 1 1 i −i x0
X X 000 0 2
0 2
0 2
0 2
2
|ψi = αx ·|xi , where |αx | = 1 and αx ∈ C. 001 1
0 1
0 −i
0 i
0
2 2 2 2 −1
x∈{0,1}n x∈{0,1}n −i
1 −1 −i −i i
010 2
0 2
0 2
0 2
0 x1 x1

Such states can be also represented by a column vector 011 0 −1


2
0 1
2
0 −i
2
0 −i
2 −1 −1 −1
ψ = [ψi ] with 0 ≤ i < 2n and ψi = αx , where nat(x) = i. 100 0 −i
0 −i
0 −1
0 1
2 2 2 2
In turn, quantum operations are described by unitary ma- −i −i 1 −1
x2 x2 x2 x2
101 2
0 2
0 2
0 2
0
trices, i.e. complex square matrices whose inverse is their −i i 1 1
0 0 00 0 0 00
110 0 0 0 0 −1 −1
conjugate transposed. Prominent examples (working on single 2 2 2 2
i −i 1 1
qubits) include e.g. 111 0 2
0 2
0 2
0 2
1

     
0 1 1 1 1 1 0 (a) Matrix (b) Decision diagram
X= ,H = √ , and Z = ,
1 0 2 1 −1 0 −1
Fig. 3: Matrix and decision diagram of a 3-qubit computation
where X complements the current state of the qubit, H adjusts
the state of superposition of the qubit, and Z changes the phase
of the qubit. Besides that, an operation involving two qubits sketched by means of Fig. 3 which shows the matrix and a
is e.g. defined by functionally equivalent decision diagram comprised of a 3-
qubit quantum operation. Here, the 2n ×2n matrix (represented
 
1 0 0 0
0 1 0 0 by the top node) is split into four sub-matrices of dimension
CN OT =  0 0 0 1 ,

2n−1 ×2n−1 (represented by the top node’s successors). Doing
0 0 1 0 this recursively eventually yields a “sub-matrix” which is
composed of a single entry only. When additionally sharing
and performs a so-called controlled inversion. (structurally) equivalent sub-matrices by the same node (as it
Having both, a description of a quantum state and a quantum is e.g. the case for the top-left and bottom-left sub-matrix in
operation in terms of a state vector and a unitary matrix, Fig. 3a which only differ by the factor −i), a representation
respectively, the transformation executed by that can easily be may result which is much more compact than the exponentially
described through matrix-vector multiplication. For example, large matrix representation. The difference in the factor is
applying a CNOT operation to a two qubits system which represented by corresponding edge weights (−i in case of the
currently is in state |ψi = |11i yields a successor state defined third successor; if no edge weight is annotated, the factor of 1
by       is assumed).
1 0 0 0 0 0
0 1 0 0 0 0 Overall, this allows for a much faster simulation of quantum
0 0 0 1 · 0 = 1 ≡ |10i . computations as described and evaluated in detail in [40]. On
     
top of that, further optimizations are possible with respect to
0 0 1 0 1 0
| {z } |{z} the precision of the simulation (c.f. [38]) or the run-time per-
CN OT ψ formance (c.f. [43]). As briefly sketched later in Section V-C,
Accordingly, simulating a quantum circuit conceptually boils such improvements can be (and have been) integrated into
down to a sequence of matrix-vector multiplications using a Qiskit.3
given input quantum state as well as the matrices provided by
the operations defined in the circuit. B. Improving the Mapping to QX Architectures
However, a serious obstacle in the simulation of quantum Besides simulation, mapping a given quantum circuit to
circuits is that the corresponding descriptions (the vectors the desired QX architecture constitutes another important step
and matrices) grow exponentially with respect to the number of the Qiskit tool-chain (see the compilation step discussed
of qubits. This poses a limit to simulation techniques – in Section IV). Recall that, here, it has to be ensured that
including the one used in Qiskit. In order to address that, every two-qubit operations is performed on qubits which are
many researchers are investigating alternative approaches in adjacent in the coupling map of the considered architecture
order to optimize simulation. The spectrum includes solutions and that the respective positions of control and target qubits
utilizing parallelization (as done e.g. in [16], [29]), emulation are in-line (as defined e.g. in the coupling map illustrated
(as done e.g. in [14], [30]), or decision diagrams [31], [40]. in Fig. 2 and discussed in Section II-B). This may require
In the following, we briefly review the approach based on the mapping of qubits to change during the execution of a
decision diagrams (as this has also been integrated into Qiskit). quantum circuit. To this end, Hadamard (H) and SWAP gates
Using decision diagrams allows for a much more compact rep- (implemented as three alternating CNOT gates) can be applied
resentation of the exponentially large matrices and vectors and
already led to substantial improvements e.g. for synthesis [21], 3 More details on that, including an open-source implementation is available
[23], [41] or verification [22], [33]. The main idea is briefly at http://iic.jku.at/eda/research/quantum_simulation/.
|q0 i → Q0 H H T H H
C. Integrating into Qiskit
|q1 i → Q1 H H H
Qiskit is a Github-based open source software project. This
|q2 i → Q2 H
makes contributing advanced algorithms and methods partic-
|q3 i → Q3 H H
ularly easy. The regular structure for contributions typically
Q4 involves creating your own fork of the Qiskit repository,
(a) Mapped circuit obtained by Qiskit implementing and testing your contributions, and then creating
|q3 i → Q0 a pull request with the contribution back into Qiskit. This pull
Q1
request will typically include a description of the contribution
and its benefits and drawbacks. In many cases, discussions
|q2 i → Q2 H H H
with the community is a highly effective method to improve
|q0 i → Q3 T H H your algorithm and make it fit in the general Qiskit framework.
|q1 i → Q4 H Such discussions are most easily evoked by openning an issue
in the Qiskit Github space before or during development of
(b) Optimized circuit
the new feature.
Fig. 4: Mapping to QX4 architectures Once implementation is done and a pull request was cre-
ated, the Qiskit community will proceed to review, test, and
further analyze your contribution. This process may result in
interesting technical discussions which again may evoke ways
to flip the direction of control and target qubits and to change of making your contribution even more powerful. Eventually,
the mapping of the logical qubits, respectively. after all discussions have concluded and the code is at its best,
For example, consider again the quantum circuit shown in it may be pulled into Qiskit and become an itegral part of it.
Fig. 1. Just mapping all qubits qi to corresponding physical For more holistic contributions, for example a full software
qubits Qi (i.e. conducting a 1:1 mapping) does not work since tool such as a new simulator, the Qiskit team has created
the QX4 architecture prohibits e.g. the interaction between q2 another way of contributing. Here, the aim is to provide wide
as a control and q3 as a target in the second gate (only the access to the tool through the Qiskit package, while retaining
opposite is allowed) or between q0 as a control and q1 as the tool’s holistic functionality. In order to do that, the tool
a target in the third gate. This can be resolved by adding must first conform to the look and feel of the Qiskit code, and
additional H gates as shown in Fig. 4a. This circuit results especially support the same interfaces as Qiskit. This allows
when applying the command compile in the corresponding the wide community using Qiskit to also use the new tool
compilation step discussed before in Section IV. out of the box, minimizing any educational pain in using
it. Once this stage is done, a new repository can be created
However, inserting the additional gates to satisfy the con- under the general Qiskit repository. Then, the entire code of
straints imposed by the coupling graph may drastically in- the new tool can be deposited in this repository. This way,
creases the number of gates – which in turn significantly the tool’s functionality is retained in whole, while benefiting
increase the probability of errors during the computation. from the wide dissemination and simplicity of use brought by
Hence, minimizing the number of added H and SWAP gates is Qiskit. A prime example of such a full-scale contribution to
a primary objective (this is similar to optimizations for nearest Qiskit is the decision-diagram based simulator described in
neighbor quantum architectures as considered e.g. in [25]– Section V-A [5].
[27], [34]–[37]). Unfortunately, this is an N P-hard problem
Whether a simple improvement or a full-fledged tool, any
(as recently proved in [11]) and, hence, requires efficient
contribution into Qiskit reaches a vast community of enthusi-
methods. Triggered by call for solutions from the Qiskit team,
asts in the field. There is no better way for this contribution to
many researchers were motivated to work on improvements.
create the impact it is intended for on the future of quantum
In very short time, this already led to approaches such as
computing.
presented in [7], [18], [28], [39], [42]. Moreover, even com-
petitions seeking the best possible solution for this problem
have been conducted in order to further trigger development VI. C ONCLUSIONS
in this area (see [6]). They have yielded results as e.g. shown
This special session summary provided a brief glimpse into
in Fig. 4b, which introduced improved mapping, together with
IBM’s Qiskit which allows researchers, teachers, developers,
the application of H gates only before and after the seventh
and general enthusiasts to write code for and to run experi-
gate is applied.4 This eventually led to a more efficient overall
ments on real quantum computers. We covered both the user’s
map of the given input circuit to the QX4 architecture.
perspective as well as the developer’s perspective. We hope
this triggered further interest. In this case, we are referring
to further tutorials and references as cited above for a more
4 An implementation of the method generating this result is available at detailed treatment on the respective issues, as well as to
http://iic.jku.at/eda/research/ibm_qx_mapping/. personal interaction with the Qiskit team.
VII. ACKNOWLEDGMENTS [21] P. Niemann, R. Wille, and R. Drechsler. Efficient synthesis of quantum
circuits implementing Clifford group operations. In Asia and South
We thank the full team of Qiskit developers for enabling Pacific Design Automation Conf., pages 483–488, 2014.
this special session summary. We also thank Stefan Hillmich, [22] P. Niemann, R. Wille, and R. Drechsler. Equivalence checking in multi-
Alexandru Paler, and Alwin Zulehner for their specific contri- level quantum systems. In Int’l Conf. of Reversible Computation, pages
201–215, 2014.
butions to the work presented here. We acknowledge the use [23] P. Niemann, R. Wille, and R. Drechsler. Improved synthesis of Clif-
of IBM Q for this work. The views expressed are those of the ford+T quantum functionality. Design, Automation and Test in Europe,
authors and do not reflect the official policy or position of IBM 2018.
[24] J. Preskill. Quantum computing in the NISQ era and beyond. arXiv
or the IBM Q team. This work has partially been supported preprint arXiv:1801.00862, 2018.
by the European Union through the COST Action IC1405 and [25] M. Saeedi, R. Wille, and R. Drechsler. Synthesis of quantum circuits for
the Google Research Award Program. linear nearest neighbor architectures. Quantum Information Processing,
10(3):355–377, 2011.
R EFERENCES [26] A. Shafaei, M. Saeedi, and M. Pedram. Optimization of quantum circuits
for interaction distance in linear nearest neighbor architectures. In
[1] IBM Q. https://www.research.ibm.com/ibm-q/. Design Automation Conf., pages 41–46, 2013.
[2] IBM Q Devices. https://www.research.ibm.com/ibm-q/technology/ [27] A. Shafaei, M. Saeedi, and M. Pedram. Qubit placement to minimize
devices. communication overhead in 2D quantum architectures. In Asia and
[3] IBM Quantum Experience. https://quantumexperience.ng.bluemix.net/ South Pacific Design Automation Conf., pages 495–500, 2014.
qx/editor. [28] M. Siraichi, V. F. Dos Santos, S. Collange, and F. M. Q. Pereira.
[4] IBM QX backend information. https://github.com/QISKit/ Qubit allocation. In International Symposium on Code Generation and
ibmqx-backend-information. Optimization, pages 1–12, 2018.
[5] JKU Qiskit Addon Simulator. https://github.com/Qiskit/ [29] M. Smelyanskiy, N. P. D. Sawaya, and A. Aspuru-Guzik. qHiPSTER:
qiskit-jku-provider. The quantum high performance software testing environment. CoRR,
[6] QISKit Developer Challenge. https://qx-awards.mybluemix.net/ abs/1601.07195, 2016.
#qiskitDeveloperChallengeAward. [30] D. S. Steiger, T. Häner, and M. Troyer. ProjectQ: an open
[7] QISKIT SDK. https://qiskit.org/. source software framework for quantum computing. arXiv preprint
[8] Qiskit Tutorials. https://nbviewer.jupyter.org/github/Qiskit/ arXiv:1612.08091, 2018.
qiskit-tutorial/blob/master/index.ipynb. [31] G. F. Viamontes, I. L. Markov, and J. P. Hayes. High-performance
[9] A. J. Abhari, A. Faruque, M. J. Dousti, L. Svec, O. Catu, A. Chakrabati, QuIDD-based simulation of quantum circuits. In Design, Automation
C.-F. Chiang, S. Vanderwilt, J. Black, and F. Chong. Scaffold: Quantum and Test in Europe, page 21354. IEEE Computer Society, 2004.
programming language. Technical report, 2012. [32] R. Wille, A. Fowler, and Y. Naveh. Computer-aided design for quantum
[10] M. Amy, D. Maslov, M. Mosca, and M. Roetteler. A meet-in-the-middle computation. In Int’l Conf. on CAD, 2018.
algorithm for fast synthesis of depth-optimal quantum circuits. IEEE [33] R. Wille, D. Große, D. M. Miller, and R. Drechsler. Equivalence
Trans. on CAD of Integrated Circuits and Systems, 32(6):818–830, 2013. checking of reversible circuits. In Int’l Symp. on Multi-Valued Logic,
[11] A. Botea, A. Kishimoto, and R. Marinescu. On the complexity of pages 324–330, 2009.
quantum circuit compilation. In Symposium on Combinatorial Search, [34] R. Wille, O. Keszöcze, M. Walter, P. Rohrs, A. Chattopadhyay, and
2018. R. Drechsler. Look-ahead schemes for nearest neighbor optimization
[12] A. W. Cross, L. S. Bishop, J. A. Smolin, and J. M. Gambetta. Open of 1D and 2D quantum circuits. In Asia and South Pacific Design
quantum assembly language. arXiv preprint arXiv:1707.03429, 2017. Automation Conf., pages 292–297, 2016.
[13] A. S. Green, P. L. Lumsdaine, N. J. Ross, P. Selinger, and B. Valiron. [35] R. Wille, A. Lye, and R. Drechsler. Exact reordering of circuit lines
Quipper: a scalable quantum programming language. In Conf. on for nearest neighbor quantum architectures. IEEE Trans. on CAD of
Programming Language Design and Implementation, pages 333–342, Integrated Circuits and Systems, 33(12):1818–1831, 2014.
2013. [36] R. Wille, N. Quetschlich, Y. Inoue, N. Yasuda, and S. Minato. Using
[14] T. Häner, D. S. Steiger, M. Smelyanskiy, and M. Troyer. High πDDs for nearest neighbor optimization of quantum circuits. In Int’l
performance emulation of quantum circuits. In Int’l Conf. for High Conf. of Reversible Computation, pages 181–196, 2016.
Performance Computing, Networking, Storage and Analysis, page 74, [37] A. Zulehner, S. Gasser, and R. Wille. Exact global reordering for nearest
2016. neighbor quantum circuits using A∗ . In International Conference on
[15] A. Kandala, A. Mezzacapo, K. Temme, M. Takita, M. Brink, J. M. Chow, Reversible Computation, pages 185–201. Springer, 2017.
and J. M. Gambetta. Hardware-efficient variational quantum eigensolver [38] A. Zulehner, P. Niemann, R. Drechsler, and R. Wille. Accuracy and
for small molecules and quantum magnets. Nature, 549(7671):242, compactness in decision diagrams for quantum computation. In Design,
2017. Automation and Test in Europe, 2019.
[16] N. Khammassi, I. Ashraf, X. Fu, C. Almudever, and K. Bertels. QX: [39] A. Zulehner, A. Paler, and R. Wille. An efficient methodology for
A high-performance quantum computer simulation platform. In Design, mapping quantum circuits to the IBM QX architectures. IEEE Trans.
Automation and Test in Europe, 2017. on CAD of Integrated Circuits and Systems, 2018.
[17] J. Koch, M. Y. Terri, J. Gambetta, A. A. Houck, D. Schuster, J. Majer, [40] A. Zulehner and R. Wille. Advanced simulation of quantum computa-
A. Blais, M. H. Devoret, S. M. Girvin, and R. J. Schoelkopf. Charge- tions. IEEE Trans. on CAD of Integrated Circuits and Systems, 2018.
insensitive qubit design derived from the cooper pair box. Physical [41] A. Zulehner and R. Wille. One-pass design of reversible circuits:
Review A, 76(4):042319, 2007. Combining embedding and synthesis for reversible logic. IEEE Trans.
[18] G. Li, Y. Ding, and Y. Xie. Tackling the qubit mapping problem for on CAD of Integrated Circuits and Systems, 37(5):996–1008, 2018.
NISQ-era quantum devices. arXiv preprint arXiv:1809.02573, 2018. [42] A. Zulehner and R. Wille. Compiling SU(4) quantum circuits to IBM
[19] D. C. McKay, T. Alexander, L. Bello, M. J. Biercuk, L. Bishop, QX architectures. In Asia and South Pacific Design Automation Conf.,
J. Chen, J. M. Chow, A. D. Córcoles, D. Egger, S. Filipp, et al. Qiskit 2019.
backend specifications for OpenQASM and OpenPulse experiments. [43] A. Zulehner and R. Wille. Matrix-vector vs. matrix-matrix multiplica-
arXiv preprint arXiv:1809.03452, 2018. tion: Potential in DD-based simulation of quantum computations. In
[20] M. Nielsen and I. Chuang. Quantum Computation and Quantum Design, Automation and Test in Europe, 2019.
Information. Cambridge Univ. Press, 2000.

View publication stats

You might also like