Skip to main content

IBM i Clients can get Started With IBM Q

Open-source Python code available through Qiskit allows clients to access IBM Q Experience through IBM i

Open-source Python code available through Quiskit allows clients to access IBM Q Experience through IBM i

Currently, quantum computing works with an efficiency and reliability roughly analogous to  that of the early transistor. But IBM, which, in the past, has “brought it’s a-game” to revolutionize computer engineering, is attempting a repeat with IBM Q*. Further  developments are needed to complete a generally useful quantum computer, but IBM Q is state-of-the-art for the transmon-based “quantum Turing machine” model, theorized to execute any quantum algorithm.

In the interests of the rapid advance of quantum algorithms, IBM offers free access to IBM Q via IBM Q Experience. Enhanced access is available to the many businesses and institutions partnering with IBM during this epoch, which will irrevocably transform computation in finance, optimization, engineering, chemistry, materials and other fields.

Getting Started With Qiskit

IBM’s Quantum Information Science Kit (Qiskit) is open-source Python code used to create quantum programs and run them on simulators and real processors online. Qiskit can be installed like other Python libraries under IBM PASE for i. The IBM Q Experience website offers a visual composer for quantum circuits (see Figure 1 below).

The visual composer is good for interactive experimentation, while use of Qiskit locally, on your workstation or on IBM i, empowers development in a familiar Python + Git environment. You can design whole circuits in Qiskit Terra and borrow entire algorithmic implementations from Qiskit Aqua, or you can architect and test circuits visually interactively on IBM Q Experience and cut and paste the resultant OPENQASM 2.0 quantum assembly code into your programs.

We installed Qiskit 0.7.3 onto an IBM i 7.3 PASE environment in four setups:

1. No isolation

2. Python virtual environment (venv)

3. chroot jail

4. chroot jail + venv

We decided that No. 4 above, offering full isolation, was the safest bet against finger slips modifying the complex site library setup of the global production Python environment. See below, for the steps we followed on a “bare” PASE open-source installation.

yum install python3
yum install ibmichroot
chroot_setup /QOpenSys/quantum minimal nls
yum install --installroot=/QOpenSys/quantum bash python3\*
yum group install --installroot=/QOpenSys/quantum “Developer Tools”
yum install --installroot=/QOpenSys/quantum python3-psutil
chroot /QOpenSys/quantum /QOpenSys/pkgs/bin/bash
python3 -m venv /home/JESSE/work/venv_qiskit --system-site-packages
. /home/JESSE/work/venv_qiskit/bin/activate
pip install cython
pip install qiskit=0.7.3

When Jack was a student learning high-level programming languages, he would practice-code in each language a “Yi Qing Oracle” demo program–based on the famed mathematical treatise of ancient China. Figure 3, shows the tail end of a run of Jack’s Quantum Yi Qing program on the IBM i executed on the IBM Q 16 Melbourne quantum processing unit remotely via Qiskit.

The code for quantum_yiqing is on github. Also useful is Jack’s qis_job program for running OPENQASM quantum assembly files at the command line without writing any Python code.

Resources for IBM Q

If you choose to explore IBM Q*, a mountain of online documentation and self-teaching resources is available, including Jupyter notebooks (web documentation that can execute demo Python code inside documentation frames). The web is rich with documents and videos discussing quantum computing science and its many current experimental implementations worldwide.

Should your organization bother? Drill down on the IBM Q web to see the many prominent partners already engaged in the pursuit of a competitive advantage.

Should you bother? That’s a good question. Will you still be working 10 or 20 years from now? Quantum computing is coming—have no doubt on that point. It requires insight and new skills from its practitioners. Do you want to arrive early on the express train, or catch the crowded local later?

Fortunately for those of us ready to dive into IBM Q quantum computing today, all the resources we need are present and run on every modern platform, including our favorite: IBM i. 

IBM Systems Webinar Icon

View upcoming and on-demand (IBM Z, IBM i, AIX, Power Systems) webinars.
Register now →