Welcome to Entangled - A Leisure Discourse on Learning Quantum Computing

 


There is a lot of hype on the Internet today regarding the Quantum Computer. What is it? What capabilities will this deliver to computing? And will it replace the transistor-based CPU architecture we are accustomed to today?

Quantum computers have sparked my interest in the past couple of years. As a professional programmer and a hobbyist, I have written for my leisure coding processor emulators in python. These included a 6502 CPU and Nintendo emulators. With an old dusty degree in computational physics, I decided to embark on my experimentation in writing a quantum computer emulator. Unfortunately, I had yet to succeed in this endeavor beyond writing python code for wave equations. Once you had the wave equations code running - what then? How do you proceed in emulating a quantum processor? My false assumption was that a quantum processor would resemble its transistor-based predecessors and have general-purpose registers. And what of the address and data buses to transfer the information in and out of memory?

Figure 1. 6502 Address and Data Bus from Machine Language for the Commodore 64 - Jim Butterfield.

I shelved the quantum computer emulator for some time. Then in early September of 2022, I received a call from the University of Chicago with the opportunity to earn a certification in Quantum Computing and Networks. My expectation entering the course was that this was my opportunity to learn quantum computing architecture. I anticipated it would be like my college courses, circa 1989, learning low-level machine and assembly language, as I knew on the old DEC PDP-11 and 8-bit home computers of the time. I enjoyed low-level computing and thought this would be an exciting venture in my next career chapter of programming. I was one of many senior programmers in the course looking for a career change in this emerging market. Likewise, we all entered the course with the misguided self-deception that this would be the next level course where we could stand on the shoulders of our career experiences in transistor-based CPU computer programming. This frame of mind is the expectation of all career programmers regarding their understanding of quantum computers.


An intense submersion in linear algebra and Dirac notation transpired in the first two weeks of the course. As I mentioned, I completed a Computational Physics and Mathematics degree in the late 80s. I had taken courses, over 30 years ago, in quantum mechanics as a prerequisite for earning my Physics degree. As a result, I had a lot of dust to blow off calculating quantum states.
 

So I have taken you down the long path of what a quantum computer isn't. What is a quantum computer? A quantum computer has no general-purpose registers, memory architecture, or data buses like the classical computing transistor-based counterpart we all know and love today in our computers, smartphones, smart televisions, and every other smart device we own. In its current emerging development state, a quantum computer is primarily a Quantum Processing Unit, a QPU, if you will, but I haven't heard anyone call it this yet. A quantum computer requires a classical (normal transistor-based) computer to handle everything external to the QPU. A QPU is like your computer's Graphics Processing Unit, GPU. Only a GPU has its memory and is transistor based. I am comparing the GPU to what to expect from the quantum computer. A better term is Quantum Processing Unit, QPU.
 

Another consideration of the differences between the classical computer architecture CPU and the QPU is how these process information. The CPU is based on transistor operations where a high or low voltage is represented as a one or a zero. These voltage levels are called bit settings. A bit represents a digit in a CPU. A bit can contain only the value of 0 or 1. It is a binary digit representation. Although CPUs can currently hold 64-bit values in their registers, let's keep the conversation simple to a 1-bit register. This generalization will assist us in comparing apples to quantum states when discussing their differences in design. The bit is either on or off in the classical computer CPU register, one or zero, respectively.
 

 Figure 2. Graphical representation of bit set using digital transistor logic.

The bit representation from the digital transistor world of coding is no longer used. So again, we're comparing apples to quantum states. No more Apple, no more Wozniak. We literally have stepped into a completely different paradigm of thinking. A borderline mathematical-religious paradigm of thinking - quantum states! No longer is our machine bit in a state of zero or on, or on or off. We don't even have bits! The concept of binary digits is nowhere to be seen. In its place, we have unitary vectors of zeros and ones. With quantum superposition states, we can simultaneously have zero, one, or both values. The Bloch Sphere represents our qubit data.

 


 Figure 3. The qubit unitary array representation of quantum states.

As you can see, the complexity of the qubit has just increased significantly. In digital transistor logic, the bit digit was either a zero or one, on or off. The qubit is not a digit. It is a unitary vector array representing vector states in Dirac notation.

Figure 4. The state of qubit in the Bloch sphere represented in its Dirac notation.
 
 As you can see, we've gone completely off the reservation from digital-transistor logic. As a result, there is no conceptual application for machine language coding. It's an entirely new programming paradigm, and it's so weird it looks like it came from alien back engineering at Area 51. Bob Lazar, care to comment? All kidding aside, it is not intuitive in its coding practices. 

Since the quantum computer design framework is based on quantum states for information processing, all the operations on the qubit are linear algebra operations on the Dirac vectors. Hence, there is no concept of machine language coding. Instead, we build what is referred to as software "circuits." These circuits perform unitary operations on the states of the qubit. Circuits are used to entangle qubits and perform operations on them. Measurements are performed to determine the state of the qubit or entangled qubits. Circuits can be simple unitary operations or non-esoteric circuits to represent quantum teleportation, as shown in this IBM Qiskit coding example below,

Figure 5. IBM Qiskit example of circuit for quantum teleportation.
 

In the next installment of Entangled, we will start building circuits using IBM's Qiskit Quantum Computing development kit. I will also introduce the linear algebra solutions to demonstrate the circuits' actions and the operators we use on quantum states. We will also need to discuss entanglement because we need to use more than one qubit in our programming design. It's an incredible new era in computing. If we kick the can far enough down the road, I would like to discuss the coding on the quantum holographic wormhole that got a lot of hype recently. Any questions drop them in the comments below.
 
If you're new to quantum programming, some recommended reading that helped me blow the dust off the old brain was,
 

 


Until the next edition of Entangled....
Keep it classy and in superposition! 

Michael Norton is a seasoned software engineer who has worked in silicon valley since the late 80s. He has worked on various systems, from 8-bit home computers to mini-computers, such as the VAX and PDP-11, video game consoles, robotics, routers, and switches. In addition, Michael contributed to O'Reilly online and wrote books on computer game programming. He is passionate about teaching computer programming and writing on emerging technologies such as the quantum computer.
Michael earned his certification in Quantum Science, Networking, and Communications, in October 2022, from the University of Chicago.

 




 



Comments

Popular posts from this blog

Beginning Quantum Programming - The Hadamard Gate

Coding Your First Quantum Computer Program