Showing posts with label quantum computing. Show all posts
Showing posts with label quantum computing. Show all posts

Sunday, May 5, 2024

Quantum Computing Realizations

I've always been highly interested in quantum computing. And, as I've mentioned before, quantum computing is not yet practical.

There are key differences between a quantum computer and a classical digital computer. Basically, quantum computers store and process data using quantum error correction to manipulate quantum particles.

Over the years, while discussing quantum computing with others, I came across two interesting realizations.

First, is that digital computer bits only store data where as quantum computer bits, called qubits, not only store data, but they also process it. And they process their data, in parallel, while entangled with other qubits – no central processing unit required to bottleneck the data flow.

Second, it is hard for someone to be interested in quantum computing without also being interested in quantum mechanics which is the overarching theory that describes the behavior of matter. If you want to know what it's like to physically entangle quantum particles, operate on them, and measure their outcome then you can run your own quantum computer "program" (circuit) for yourself using a real quantum computer.

Thursday, August 18, 2022

My First Quantum Computer Program

I ran my first program on a quantum computer, today.

I've run programs on quantum computer simulators in the past, but today was the first time I ran a program on an actual quantum computer. It wasn't anything special – my program simply simulated a coin flip. I guess that's the Hello World equivalent on a quantum computer.

About a year and a half ago, I gave a presentation on quantum computing, which has always fascinated me. However, quantum computing is a lot like nuclear fusion or bitcoin in that it's not yet practical. We can see that these technologies are real and feasible, but they'll require some more engineering, both technically and socially, for them to be in widespread use.

Currently, quantum computers are at the stage that personal computers were in the early 1970s. The design and engineering involves circuits. Next step will be programs and then practical applications.

What I Did

Today's program emulated a coin flip by passing a qubit through a Hadamard gate which puts the qubit into a superposition state. A Hadamard gate takes a qubit as input and its output has a seemingly random 50/50 chance of being |0> or |1> when measured. But what's fascinating about a Hadamard gate is that, if you take the output of from a Hadamard gate and pass it through another Hadamard gate then the qubit will always return to its original state.

My code snippet: Simulating the flip of a coin on an actual quantum computer

How I Did It

Like a true script kiddie, I followed a YouTube tutorial. I literally stopped the video when Toby showed her code, took a screen shot, imported the screen shot into the Apple Photos app, and then I copied and pasted the code from the photo into my web based text editor on IBM's Quantum Lab. The code I wrote was in Python utilizing the Qiskit SDK and it was free to run on IBM's system; a bargain at twice the price.

Saturday, January 8, 2022

I Am Not Your Guy (yet)

I am not your guy when it comes to cryptocurrencies, blockchain, NFTs, and quantum computing. At least not yet. 

I understand how these different technologies work, but I don’t yet see a very practical, revolutionary business use other than picks-and-shovels and SPACs. People seem to be confusing my knowledge of these technologies for a deep, optimistic passion to work with them on a daily basis.

Cryptocurrencies

Cryptocurrencies, like Bitcoin, aren’t yet currencies that we use on a daily basis. I've shared my thoughts in 2017 and 2018. While traders and speculators are making money investing in cryptocurrencies, it’s a closed system in that it’s all technical trading with little insight into the fundamentals that move its price. This is especially true when compared to other commodities and futures. And, a big issue with cryptocurrencies is it’s a bit too much like cash. You still need a place to store cryptocurrencies other than your hard drive (i.e. this is why we don’t store cash under our bed mattress). So, you need a “bank,” known as a wallet, to store your cryptocurrency on someone else’s computer/server. 

Blockchain

Blockchain is a computer science data structure and protocol, similar to other data structures and protocols like stacks, queues, linked lists, binary trees, hash tables, etc. However, blockchain is different in that it’s become an overhyped fad. Outside of software engineering, people don’t run around touting hash tables vs binary trees. Why is blockchain so hyped up? Because it goes hand in hand with cryptocurrencies. And while it has technical utility, both proven and projected, it’s not a business benefit, rather it’s a feature.

NFTs

Non-fungible Tokens (NFTs) are something that I’m not yet a big fan of, as I mentioned last month. As more assets move into the digital realm of cyberspace, NFTs could become the deed of authenticity and ownership.

Quantum Computers

Quantum Computing, as I've written about, is still in its infancy without a practical use that touches consumers. Currently, quantum computers are used to design quantum logic circuits, similar to analog and digital computers of the 1940s and 1950s (and, nand, or, xor, etc). The next step in quantum computing’s future will be programs followed by applications in order for it to touch our lives on a daily basis.

Wednesday, December 16, 2020

Intro to Quantum Computing (Everything I know)

Quantum computers are vastly different than digital (classical) computers. Let's start with the basics in this blog post.


1. Bits

Digital computers store information in classical bits. A bit can only be a zero or one.

Quantum computers store information in quantum bits (qubits). A qubit can be a zero or one or negative or both zero and one at the same time due to the wave nature of superposition (Yes, this is a real thing... more on this in another blog post).

2. Storage

Digital computers store bits using voltage / charge.

Quantum computers store qubits using electron spin.


3. Logic

Digital computers perform operations using logic gates governed by Boolean algebra (AND, OR, NOT, XOR, etc.).

Quantum computers perform operations using quantum logic gates (X, Y, Z, CNOT, etc) governed by linear algebra (matrix algebra).


4. Behavior

Digital computers use simulation to solve problems.

Quantum computers use imitation to solve problems.


5. Output

Digital computers are deterministic. The same input always yields the same output.

Quantum computers are probabilistic. Repetition of the same inputs gives probabilistic output.


6. Architecture 

Digital computers use a von Neumann model with a CPU, ALU, and memory to store instructions and data, all made up of transistors. Physically, bits are stored in integrated circuits (chips) at room temperature.

Quantum computers store and process data using quantum error correction to manipulate quantum objects (electrons, photons, nuclei, etc). Physically, qubits are stored in quantum objects at less than 1 Kelvin (about 0.015 Kelvin) to remove any thermal noise that could disturb them.


7. Performance

Digital computers increase performance by a factor of two for each bit added (2n).

Quantum computers increase performance exponentially for each qubit added (2ⁿ).


8. Processing

Digital computers process data in series.

Quantum computers process data in parallel.


9. Reversibility

Digital computers’ logic gates are not all reversible.

Quantum computers’ logic gates are all reversible.

There are four operations that can be performed on a single bit: NOT, Identity, Set 0, Set 1.

1. NOT: Flip zero to one or one to zero. Think: clicking on a checkbox on a web page.

2. Identity: Multiply by 1 to keep the same value (identity). Think: core memory readout, which is destructive so the bit must be saved back into memory when reading.

3. Set 0: Force a zero into memory. 

4. Set 1: Force a one into memory.

With digital computers, only the NOT and Identity are reversible gates. Quantum computers have other gates to make non-reversible operations reversible.  

Since all quantum computer operations are reversible, output from one operation can be fed back into the same circuit to recover the original input.


It seems, before 2020, researchers viewed quantum computing as primarily a scientific goal, with relatively little immediate bearing on the future commercial viability of quantum computing. However, that has quickly changed with Honeywell, Amazon, and Microsoft entering the market.