Monday, August 1, 2022

A quantum aha moment

 Last year my friend forwarded an article which talked about advances made in 3nm technology. I remember studying that when process node reaches 3nm, each transistor could contain just 2-3 atoms and quantum effects become more prominent. As someone carrying a huge mortgage, this news worried me. What happens after 3nm? Will my job remain secure? So, I started thinking what other fields I could venture in. I thought, I am currently working on processors, so I should switch to a job of making quantum processors. How different can it be? Well, they are as different as a wormhole and an earthworm. 

 

An year since, I now realized that my field might not really end and I shouldn't have worried. Also, quantum processors and in extension quantum physics are really cool. I will describe an aha moment which made me fall in love with the subject. I came across a line which said, functions are points in an infinite dimensional space. Usually, if I don't understand a line, I just skip to the next line and try to get the gist of what the author is saying. That day, I made a resolution that I will try to understand every word and every line. So, I stopped. What does this mean?

 

So, let us take an example. Let us imagine a class of 40 students. We can now define a function which takes the name of kid as an input and gives the weight of the kid as an output. The normal way to visualize this is, you plot kids names on X-axis and their weights on Y-axis. If we do that, we get 40 points in a 2 dimensional plane. Imagine a 40 dimensional plane where each axis represents a kid. Let's say first kid's name is Rohit and his weight is 40KG. Then, x-coordinate is 40. Second kid name is Rahul and his weight is 35. Then y-coordinate is 35 and so on. So, the entire function now becomes a point in this 40 dimensional plane. If we extend this concept to real functions, each function becomes a point(vector) in an infinite dimensional space and each point in that space represents one function. This was such an aha moment for me. It's a beautiful way of looking at things. If this space of functions satisfies some special properties, it becomes a Hilbert space in which quantum mechanics operates(if you add two functions, the resultant function should be in the same space, if you multiply the function by scalar, it should belong to the space, additive identity should be part of the space, existence of norm. Fourier series is a well known example of Hilbert space. Why should it satisfy these properties? If these properties are not defined, we can never apply linear operations like addition on these functions and never logically prove anything).  

 

Okay, what did we achieve by doing this? Well, now let's take a function sin(x). It is a point in this space. If you differentiate sin(x), it becomes cos(x) which is another point in the same space. We know that we can transform any point(vector) to any other point(vector) in the space by multiplying it with a matrix. And boom! These matrices are called operators. If you multiply a function with a matrix, you get it's first differential. If you multiply it with same matrix n times, you get it's nth differential. Differentiation becomes an operator, integration becomes an operator and so on. Instead of dealing with functions, suddenly, we landed in Linear Algebra. 

 

Once a transformation becomes a matrix, it makes a lot of cool results possible. For example, quantum mechanics states that every entity can be represented by wavefunction which is some kind of oracle which contains all the information about the particle(entity). Now, if we want to find a measurable corresponding to this particle(momentum, position, energy etc), we find corresponding operator, find its eigen vectors and write the wavefunction as a linear combination of these eigen vectors. Corresponding eigen values become the allowed values for that measurable and the square of coefficients of these eigen vectors become the probabilities of the measurable being that eigen value.

 

I tried explaining the same thing in a different post on blog is much more shabby way. Please take a look if interested. Hopefully, I will explain more interesting concepts in more lucid way in future!