The Computer and the Chocolate Cake

Issue 8.0, Apr 17, 2025

 

I can explain digital logic down to the electron in a MOSFET, but I can't come close to the same with quantum computing. This newsletter is a journal of my quest to learn the fundamentals of quantum computing and explain them on a human level.

Welcome to the Quantum Edge newsletter. Join me in my year-long journey into the weirdness that is quantum computing.

Issue 8.0, Apr 17, 2025

In today’s newsletter: A review of non-quantum (conventional) computers

So far in this newsletter I’ve been covering quantum background information that you will need in order to understand quantum computing. I’m about to dig into the “computing” half of the Quantum Computing name. But first, I need to set the stage for comparing quantum computers to conventional computers.

Quantum computers don’t work like regular computers but if you haven’t had the opportunity to study regular computers, saying that quantum is different won’t help much. I realize that some of you reading this have not only designed and programmed computers, but possibly even designed the chips that go inside computers. However, many of you have not. Regardless, keep reading because if you don’t like cake but like brownies, you may still learn something.

Computers Run Apps

You don’t need to know what is inside a computer to use it. You turn it on and (by clicking a mouse or tapping your finger) tell it to do something. If you want to turn up the heat in your house, you tap the thermostat icon. That tells your phone (which is really just a computer with radios) to run the thermostat app.

An app (back in my day, we called them “programs”) is a set of instructions that a computer understands and follows. The computer is built around hardware - the chips circuit boards, controls, displays, etc. You laptop is a computer. so is a desktop, a tablet and a smartphone.

Apps act on data and do something based on the instructions. For example, say that the temperature in the house is 66 degrees (19 degrees for those who think in C) and you want it to be 2 degrees warmer. The data is “66” and “2”. The computer runs the app, which is a set of instructions that goes more or less as follows:

Figure 1. Instructions give to a computer to control a heater

As long as the temperature is lower than 68, the app will keep looping back up to line 2 and repeating. Once the room temperature is found to be high enough in the state machine in step 4, the app will turn off the heater and keep checking to see if the temperature has dropped below 68. Almost all apps work something like the above. They just have more lines of instructions. We call those lines of instructions “code” and people who write the instructions are called coders or computer programmers.

But You Said There Would Be Cake

Yes. I said there would be cake and then I launched into describing a computer program (app) for setting the temperature in your house. I didn’t forget cake. I just wanted a more simple example first.

By the way… The code example in Figure 1 is an example of an algorithm. If you actually have a phone app for setting your room temperature, it has at its core, an algorithm like the code above. It also has interface code used to talk to the temperature sensors, the heater, and your phone screen. Interface code is required, but the meat of the app is the algorithm shown in figure 1. The algorithm is the set of logical instructions that solves problems, answers questions, or performs work.

A Baker as a Metaphor for a Computer

Computers are multipurpose devices. They can do almost anything as long as someone somewhere has written an app for the purpose and made the data available. A baker also has a multipurpose role. They can make many different tasty treats as long as someone has written up a recipe for it and they can get the ingredients.

Computers that you use everyday seem incredibly complex. But go down a few layers and they are really just a collection of simple devices. As shown above in the heater app, computers work by following instructions in a step by step manner. An example of a non-computer that uses data, follows instructions and does something would be a baker following a recipe.

Figure 2. A chocolate cake recipe containing both data and instructions, with edits in red

Take a chocolate cake recipe. A cake recipe has a list of ingredients (butter, sugar, vanilla, eggs…) and a set of instructions that you must perform with those ingredients (Generously grease and flour two 9-inch cake pans…). It requires hardware (measuring cups, pans, an oven…).

Would you still bake if you knew how complex the chemistry is?

I’ve always thought of baking as a chemistry experiment. Follow the recipe and you get what the recipe supplier promised. Change a few things up and you may not. Even with the same set of ingredients, changing a value (the amount of an ingredient time, or temperature) can give you a different result. These things that can change are called variables, because they can vary (1 teaspoon vs. 1 ½ teaspoons, etc.).

Not all changes in the recipe are bad. One of the key ingredients in a cake is the emulsifier. In our example, eggs are the emulsifier and the number of eggs is the variable value. An emulsifier helps incompatible things (like oil and water) to mix evenly. Oil molecules and water molecules don’t mix because there isn’t any place on either molecule that will easily connect to the other type. Without the emulsifier, they just slide off each other and clump in their own separated spaces.

An emulsifier is a two sided molecule. One side looks a bit like oil and will stick easily to oil. The other side looks a bit like water sticks easily to water. In a cake, an emulsifier holds the water and oil together and keeps them from separating. This allows the cake ingredients to hold together as the cake rises to become light and airy.

Fun fact: The amount of egg is a variable. If you vary the amount by adding more egg to your cake recipe, the oil and water will bind better allowing for more air to be captured during baking. This will result in a lighter and fluffier cake. If you add less egg, you will get a denser cake much more like a brownie. There are limits though - too much egg or too little and you may just end up with an inedible mess. Again, the amount of egg can vary, which makes it a variable.

Baker is the Computer

In the above analogy, the baker is the computer brain (called the processing unit).

  • The baker has access to the data - a list of ingredients to be found in the pantry

  • The baker has access to hardware - the pans, spoons, cups, and ovens

  • The baker reads the program - the baking instructions

  • The baker runs the program on the data - following the algorithm to bake the cake

In addition to baking a cake, the baker could get and follow a recipe for a cookies or pie. The same baker could also get instructions and materials and build a backyard deck. As long as there is a set of instructions (AKA a program) and the right data (AKA the ingredients/materials), the baker/computer can probably perform the task.

Multipurpose Computer vs. Custom Hardware

Most tasks performed by a computer can also be performed by designing and building a set of custom hardware. Before small computer chips became inexpensive, companies could still build and sell automated temperature controls, but they would be single purpose devices. The thermostat controls would have electronics components that would be wired up to do the same thing as the algorithm, but that would be all they could do.

Going back to the baking analogy, contrast a human baker making a cake with a factory that has a manufacturing line to automatically make cakes. The manufacturing line has bins for each ingredient. It has pipes and conveyors that mix and move in the right order and pass the cakes through an oven. The manufacturing line can make a lot of cakes but it can only make cakes. If the factory owners want to make cookies, they disassemble the manufacturing line and rebuild it to make cookies.

Dedicated hardware manufacturing line for making cakes (unifiller-europe.com)

A multipurpose computer/baker can make just about anything as long as there is a program/recipe and the data/ingredients. The manufacturing line uses custom built dedicated hardware that must be discarded and replaced or rebuilt before it can produce something different. The custom electronics temperature control can only control the temperature and can do nothing else.

In future issues of this newsletter, I may refer to conventional computers and apps. When I do, think about the baker, recipes and ingredients. If I refer to dedicated hardware, think about the factory cake making manufacturing line that can only make cakes.

Stay tuned. We’re getting closer.

In Summary…

Check your email box Thursday. And, feel free to reach out to me along the way for clarification or detail. I’ve set up the email address [email protected] for Quantum Edge feedback.

If you received this newsletter as a forward and wish to subscribe yourself, you can do so at quantumedge.today/subscribe.

Quantum Computing Archive

Below are a few articles on developments in quantum computing:

Independent Resources

Developments in quantum computing from the sources

Following are some of the quantum computing resources that I regularly visit or have found to be useful:

  • Quantum computing at Intel. Read about Intel’s take on quantum computing

  • IBM Quantum Platform. Information about and access to IBM's quantum computing resources. quantum.ibm.com

  • Google Quantum AI. Not as practical as the IBM site, but a good resource none the less. quantumai.google.com

  • IONQ developer resources and documentation. docs.ionq.com

Positive Edge LLC

About Positive Edge LLC

Positive Edge is the consulting arm of Duane Benson, Tech journalist, Futurist, Entrepreneur. Positive Edge is your conduit to decades of leading-edge technology development, management and communications expertise.