Posted in: IBM Research-Africa, Quantum Computing

Quantum Algorithm Classifies 9,500 Handwritten Numbers

While still in their infancy, as quantum computers edge closer to surpassing classical computers, a new discipline is emerging called quantum machine learning. Its goal is to apply quantum information processing to pattern recognition tasks such as classification, regression and clustering. By using quantum bits (qubits) instead of normal binary bits scientists expect to achieve results on highly complex data sets, such as those found in Nature, in seconds, instead of years, rapidly accelerating the discovery of new drugs and medicines.

The underlying question whether quantum computation can help to efficiently solve hard machine learning problems has only recently gained significant interest by the machine learning and the quantum information communities. A few weeks ago 40 members of this community, including physicists, mathematicians and computer scientists, assembled in South Africa for a 10-day workshop to talk about quantum machine learning and to test their skills on a unique programming challenge.


A “3” and an “8” from the MNIST handwritten digit dataset

The challenge was to classify the MNIST handwritten digit dataset into two groups. The dataset includes 9,586 images of handwritten digits of 3 and 8. Each image is a 28 x 28 pixel square or 784 pixels in total.

There were nine teams that competed and submitted their results. Each team consisted of one developer and promising young researchers in quantum computing and quantum information.

Waheeda Saib from the IBM Research lab in Johannesburg, was the only female developer out of the nine programmers participating, which didn’t surprise her.

She comments, “There exists a perception in society that software development is a male dominated field due to figures like Bill Gates and Steve Jobs, but you will be hard pressed to find a professor talk about Ada Lovelace, who created the world’s first computer algorithm or Grace Hopper, who invented the first compiler for a programming language. We need a mindset change or this will never advance.”

Even though classification of the MNIST dataset has been tried and tested against most classical machine learning and deep learning models and is still an open Kaggle challenge, her team thought it would be novel to create a quantum machine learning model to classify the digits.

Saib adds, “Based on my experience on a cancer reporting project which utilized deep learning to extract relevant medical concepts from pathology reports, I knew I could implement a deep learning model that could be used in conjuction with a simple quantum classification algorithm. So I suggested this approach to the team, which challenged the others to find a way of implementing the quantum classification model.”

Waheeda Saib

Waheeda Saib prepares the quantum algorithm while a team member looks on.

With the lectures running from 9:00 to 5:30 every day Saib and the team met in the afternoons, and in the evenings to work on the model. At 4AM and with five hours to spare they finally completed the coding and testing before the final presentation and evaluation.

Thankfully the effort paid-off. Despite a few early setbacks, the team won the ‘most creative/novel solution’ being the only team to implement a deep learning quantum classification algorithm.

Saib adds, “We worked on quantum simulators created for the workshop and used the 5-qubit IBM Quantum Experience to implement the concepts learnt in the Quantum computing lectures. The IBM Quantum Experience was relatively easy to use and we considered using it to run our quantum algorithm, but our Internet connection was not ideal, so we used the the quantum toolbox in the python library (QuTIP). But what mattered most was that we achieved good results, which were on par with a classical machine learning model. Not bad considering we did this is in less than four days.”

Perhaps even more impressive is that Saib has only recently decided to focus her work on quantum computing in October 2014.

She adds, “I was watching a BBC documentary titled “Defeating the Hackers” and it changed my life. The documentary introduced me to advances in quantum computing and its potential to crack problems that are considered unsolvable, which could have significant impact in the medical, business and security domains. It was then that I realized the research area I wanted to specialize in. This spurred my resignation as a software engineer, to pursue my dream of becoming a research scientist, with a focus in quantum computing and quantum machine learning.”

The workshop was sponsored by the South African National Institute for Theoretical Physics (NITheP), the University of KwaZulu-Natal, Cambridge Quantum Computing and Springer publishers



  1. says:

    Very impressive story @ an energetic researcher willing to think out of the box to push new frontier – and oh by the way blowing past stereotypes … Sridhar

Add Comment

Your email address will not be published. Required fields are marked *

Waheeda Saib

"The [BBC] documentary also introduced me to advances in quantum computing and its potential to crack problems that are considered unsolvable, which could have significant impact in the medical, business and security domain."