Sunday, November 11, 2018

Poem by Ehsan Akbar

اک منزل پچھلے چاند کی
نت روشن جس کی لو
وہ وقت کو پیچھے چھوڑ گئی
اسے دھنّے واد کہو
دابی ہوئی پور کماد کی
جو پھوٹی مگھر پوہ
کتنوں کو یہی اک چاہ تھی
وہ صرف مخاطب ہو
اے روپ جمال وصال کے
ترا کون سا ہے شبھ ناؤں
وہ جن میں تیرے لوگ تھے
کن گھاٹوں اترے گاؤں
کن صدیوں پر تری چھاؤنی
کن نسلوں پر تری چھاؤں
کہہ کتنی نرم دہائیاں
ترا دیکھتے گذریں روپ
کن پلکوں میں تری چھاؤں تھی
کن چہروں پر تری دھوپ
تری نظر نیازیں بانٹتی
بھکشا میں روپ سروپ
تو کس سرما کی چاندنی
گرما کی شکر دوپہر
تو صبح میں سویا بالکا
تو گاؤں میں پچھلا پہر
ست رنگا خواب فقیر کا
یا بھید بھری دوپہر
اک پوری نیند کی شانتی
تری کجلے والی لہر
اے سنبھلے جسم کی نازنیں
کئی عمریں تجھ پر تنگ
تو شبد قدیم کتاب سے
اظہار سے جس کی جنگ
تو ذات حیات کے ساتھ کی
کیوں نکلی غیر کے سنگ؟
تو سینوں بیچ پدھارتی
کیوں تو نے اوڑھے رنگ
میں شاعر پچھلے جنم کا
تو میری پرانی منگ
اب جیون اوڑھ کے آئی تو
سہہ تنہائی کے ڈھنگ

Thursday, September 13, 2018

A story of quantum theory

The original question that has fascinated humans for millenia is about the nature of light and matter itself. Simply put: What is matter made of and what is light and why do they behave the way they do? Democritus said that if you take a stick and divide into two and keep on doing it, at the end you would get an indivisible unit of matter which he called "atomos" from which the modern word "atom" is derived (though atoms are divisible). On the other hand, Aristotle said that matter can be divided indefinitely. About the nature of light: Al-Hazen and Democritus both thought that light is made of particles. Al-Hazen even experimentally explained some behaviors of light such as reflection and refraction by considering light as particles. Newton also hypothesized that light is made of particles he called "corpuscles". However, Fresnel and others showed experimentally and proved mathematically that the behavior of light in reflection and refraction can be accurately modeled as a consequence of its wave nature. Young further showed, through his light double slit experiment, that light is a wave as he observed interference patterns when light is passed through two slits which is only possible if light is considered as waves and not particles. The classical physics of the time, driven primarily by Newton (for mechanics), Faraday and Maxwell (for Electromagnetics), could very well explain the nature of (most of) the universe. And it was thought that Physics has matured. However, there were certain things that could not be explained by classical physics, for example:

1. Black Body Radiation: Every physical body absorbs and emits radiation -- for example when you heat an iron rod, it emits light whose color depends upon the temperature (from red hot to white hot). However, classical Physics was unable to model the relationship between temperature and the peak wavelength of the radiation being emitted.

2. Atomic Model: According to classical electromagnetism equations, if we assume that an electron revolves around an atomic nucleus then the electron must emit electromagnetic energy which will cause it to lose energy and fall into the nucleus. But that would be the end of the universe then!

3. When light is shown on a metallic plate, it kicks out electrons in an effect called the photoelectric effect. In this effect the electrons are emitted only if the incident light has a specific frequency or higher and the average energy of electrons emitted is dependent on the frequency of the incident light and not on the intensity of the light. Furthermore, the electrons were emitted instantaneously which is also in contrast to classical theory which predicted that the emission caused by sufficient absorption of energy would require some finite amount of time.

There were other "holes" in classical theory. For example, if the Double Slit experiment was repeated for electrons, the electrons behaved like waves in that they produced an interference pattern just like waves. However, if we set up an apparatus that monitors through which slit the electron went through, the interference pattern disappeared. Thus, electrons behaved liked waves when no one was looking at them and as particles otherwise. This was very puzzling. 

Planck, who was working on Black Body Radiation modeling, hypothesized that any physical body can emit radiation only in discrete packets of energy he called quanta and not continusously. Furthermore, the energy of a quanta is dependent upon its frequency by the relation E=hf. This implied that the minimum amount of energy emitted at a certain frequency will be one quanta (at a certain frequency). This allowed Planck to model the change in peak emission wavelength with respect to temperature and verify the observations in the lab.

Einstein took Planck's idea and reversed it -- Einstein hypothesized that energy is not only emitted in quanta but it is also absorbed in discrete quanta and this can explain why we need specific frequency of incident light to emit electrons in the Photoelectric effect and why the energy of the emitted electrons depends on the frequency (or in other words) energy of incident light. Einstein modeled the incident light in the form of particles he called Photons such that the energy of the photon is given by E=hf. The physical existence of photons was proven by Compton in the Compton effect which occurs when high energy X-rays are shone on metal and the emitted X-rays have lower energies in comparison.

Bohr also used the concept of "quantized or discretized or packetized energy" to build a model of the atom in which he hypothesized the nucleus at the center and electrons rotate around it in fixed, discrete orbits. When an electron absorbs an energy packet it can move to a higher orbit and when it emits the extra energy as a packet, it falls down to a lower energy orbit. However, the electron orbit change occurs in zero time as its "movement" from one orbit to another would imply continuous energy dissipation. Continuous energy levels imply that the electron can fall into the nucleus but the discretization of energy explains why this is not the case (because an electron can only have fixed energy orbits).

This gave significant support to the idea of "discretized energy" as it explained the behavior of atoms and the photoelectric effect.

However, this got Einstein thinking -- if light can be viewed as photons and have a wavelength, which is an inherently wave property, too, then what does it mean for a particle to have a wavelength?

While Einstein was busy thinking about this. De-Broglie got another idea -- if light (which we can easily think of as a wave) can behave as a particle, then, can particles also behave as waves? He based this on his observations about the electron double slit experiment. It was known that the distance between two highs (peaks) of the interference pattern produced as a result of light double slit experiment changes with respect to the wavelength of the incident light. So if light's wavelength change can cause this distance to change, then, can the distance between peaks of electron density regions in the electron double slit experiment, be used to infer that electrons (and other particles) have an associated wavelength? He used this idea to find a relation that essentially said that every particle has an "associated" wavelength inversely proportional to its momentum. He used this equation to explain the distances between the fringes of the electron double slit experiment. He reasoned that we cannot observe such waves for large particles because their associated wavelength is too small. However, this effect is significant for small-sized objects.

Although de Broglie inferred that particles have wave-like behavior due to their associated wavelength, but what exactly is "waving" in the wave associated with the particle. This was taken up by Shrodinger: He developed an equation that models the wave associated with a particle as a "wavefunction" which is essentially a function that gives the behavior of the particle in terms of space and time. His 2nd order differential equation models how the wave function of a particle would change through time and space when it is acted upon by a force similar to how Netwon's famous equation $$F=m\frac{\partial^2 x}{\partial t^2}$$ that also relates space, time, force and matter. The significance of his wavefunction was described physically by Max Born who said that the magnitude (squared) of the wavefunction of a particle is proportional to the probability of its occurrence at a certain time at a certain position in space. His wavefunction could explain why we get interference patterns for the electron double slit experiment: when an electron's wave function encounters the slits, its behavior can be described by two separate wavefunctions which can interfere each other and render alternating bands of high and low probabilities on the target screen. The calculations by the wavefunction equation match the pattern produced exactly, i.e., the number of electrons in a certain region on the target screen observed experimentally are in agreement with the probabilities predicted by the wavefunction solution of the equation.

One of the most interesting implications of the wavefunction concept is that, due to the probabilisitc nature of the wavefunction, we can only infer the probabilities of occurrence of an object at a certain time and position in space. This is in contrast to classical theories which had no such "undeterministic" implications. However, the equation could explain anything that the classical theory could and everything beyond that as well.

This equation also explained radioactivity, or the ejection of alpha particles from the nucleus of radioactive nuclei: based on the wavefunction concept an alpha particle which is a part of a heavy or unstable nucleus, has a probability of occurrence outside the nucleus. This is why an unstable nucleus will eventually decay spontaneously if we wait long enough but it is impossible to predict when a particular one would decay. This is analogous to saying that the probability of getting heads for a particular coin is 0.1 but predicting that the next coin toss will result in heads is not possible. Similarly, the concept of half-life (the time it takes half of radioactive atoms to decay) is only meaningful when dealing with a large (statistically significant) number of atoms.

To summarise, we have seen that the consequence of discretization of energy into quanta or packets is that both particles and waves can be described in terms of wavefunctions which model their probability of having certain properties (e.g., occurrence at a certain position at a certain time) and their behavior (e.g., how would the probability of occurrence at a certain position and time would change over time when acted upon by certain forces). Thus, we have agreed that apparently both waves (light) and quantum sized objects (electrons, photons) can behave as both waves and particles. This also tells us that we can only measure probabilities and not exact positions or other properties and this has the implication that it is impossible to predict the future even when all variables are accounted for. However, we are yet to understand the following:

1. Why does the interference pattern disappear when we observe which slit a particular electron went through in the double slit experiment?

2. How can these concepts be used for computing?

3. Why does the act of observation change the behavior?

4. How can we explain the three-polarizer paradox?

5. We do not see quantum effects in macroscopic objects. Why?

6. Are there any examples of macroscopic quantum effects? 

More on these later. Inspired from:Khalili, Quantum: A guide for the perplexed. As part of my course on "Quantum Programming".

Saturday, May 19, 2018

Any Questions?

"Any Questions?" by Fayyaz Minhas.
--
In our world...
People who question the direction of science are called unenlightened by the intellectuals.
Intellectuals who question the direction of faith are called heretics by the faithful.
The faithful who question the direction of modern morals are called backward by the modern.
The modern folk who question the direction of politics are called separatists by the politicians.
The politicians who question the direction of the military are called traitors by the patriots.
The patriots who question the direction of justice are called criminals by the law-givers.
The law-givers who question the direction of inequality are called out of line by the law-makers.
And so goes on the people's labeling of other people...
But most questions are left unanswered.

Grave love

While we live, Let's love each other!
You can curse me for all my 
shortcomings, mistakes, misdeeds
one grave to another!
-Fayyaz
"لا اله الا ھو!"
--
او فراموش' مدہوش سن!
حقیقت مَیں!
نکتہ مَیں ' دائرہ بھی مَیں 
کُل؟ مَیں
جزو؟ مَیں!
آسمان اور زمیں کے بیچ
اسکی مرضی' مَیں!
اس اکیلے کے ساتھ ساتھی' مَیں!
اسکی آنکھوں میں خود کو دیکھنے والا' مَیں!
مَیں کے رستے اس کا متلاشی' مَیں!
مدہوش مَیں! فراموش مَیں!
اسکی محبّت میں محبّت' مَیں!
مَیں!
میں اپنے تخیل کا قیدی
دو دھڑکنوں بیچ مردہ' میں
دو سانسوں کا طول میں!
گوشت کا ایک لوتھڑا میں
خون کا ایک قطرہ میں!
مٹی میں بھری روح میں!
روح سے نکلی خاک میں!
عکس مَیں
عکاس وہ!
آیینہ وہ! روشنی وہ!
آنکھ وہ!
بینائی وہ!
بصارت وہ!
میں حرکت میں ایک سایہ!
وقت وہ!
تنہا میں' دوست وہ!
میں اور تو کی تکرار
وہ!
(فیاض منہاس)

To be

"To be" by Fayyaz Minhas.
--
A multi-sourced income that pays
for a black dress that shows just the right amount
of a girl who tastes like strawberries
nestled in your arms in a
A car that warms your butt on a cold night
and drives on both octane and electricity
From a house with an infinite pool
on a street that has just the right shade
of tarmac and leads to a
cafe that serves a brownie and coffee
in the price of a week's groceries
Where you could find people
Talking seriously
about sending their kids to boarding schools abroad
to fulfill "their dreams"
of being entrepreneurs with their ingenious
scheme of making an app for monitoring
the soakedness of organically sterilized tampons
For women empowerment
And scale Everest
or sail around the globe in a soap bubble
towards the end of their corporate lives
and be remembered as the greatest humans
to have ever died!

Tuesday, February 13, 2018

Installing Java 8 on Ubuntu 14.04

Here are the commands

sudo add-apt-repository ppa:webupd8team/java -y
sudo apt-get update
sudo apt-get install oracle-java8-installer
To automatically set up the Java 8 environment variables
sudo apt-get install oracle-java8-set-default

if the first command fails try:

sudo -E add-apt-repository ppa:webupd8team/java -y

Saturday, February 3, 2018

ہک گھڑی

اے وقت دیا خالقا' ہک گھڑی بنا 
جس تے ہر آن وقت وصال ہووے

-Fayyaz

A note

She wants to be a composer, 
an instrument maker
Or a pianist 
Sometimes all she wants is just listen
Sometimes to do all these all at once
My soul yearns to be music
Free, beautiful, without a past or a future
Not a Symphony
A mere note that can't be played again.
Unless she wants that.
-fayyaz7

Crazy Life

I need to let go of living 
And be alive. 
In this Valley of the dead
I need to free my soul of the meat I carry around 
And climb up to see the morning sun
Maybe lose a few hundred pounds in the process.
In this civilized house of sanity
I need to lose my mind
To make some sense of how to save myself from death.
-fayyaz

تہمت

تیری من کے میں بہہ تے جاواں 
تیرے کول رہ تے جاواں 
جان تے دل میرا وی نہیں کردا 
لیکن تہمت لگ جاندی ایہہ

Run!

Sometimes I just want to 
Run, go away, hide!
And then I look at you
And I still want to run, go away, hide!

-Fayyaz

Tattoo

You are tattooed on my heart in red...
Nuff said!

-Fayyaz

Cat

Curiosity keeps the cat alive in the cat
It may kill it too
but that would mean it lived one life out of many!

-Fayyaz

Sleepless

Every day I wake up
Join a herd of people fulfilling their empty lives
With the conformationist "ba ba" of others!
What if I don't sleep one night?
-Fayyaz

The cross-eyed painter

I am a cross-eyed painter
I draw everything the way I see it
And then wonder why did I draw the same thing four times?

-Fayyaz

Identification Friend or Foe

For once, switch off your IFF,
And meet everyone you see,
As if its the first time and the last!

-Fayyaz

Smoking kills

You
are like that musky cigar we shared
with a strong aftertaste
that just won't go away.

-Fayyaz

Divorce

You say you wanna go?
That it's no longer working between us
I have one last wish, my love
please take the trash on the way out!

-Fayyaz

A line for you

You say I never wrote
A single line for you
Here's three
And four!

-Fayyaz

No more demons jumping in the head

One little demon jumping in the head!
I called the doctor And the doctor said
"Two little demons jumping in ma head"!
I put the phone down and went to bed!
-Fayyaz

In the jungle...

He farted on the couch 
in front of the TV
watching a lion 
mark its territory!

-Fayyaz

Penguins of Antarctica

O God! make me a bird
So I can escape all this
He listened and turned me
Into a penguin in Antarctica!
-Fayyaz

Posthumous Union

When we die and turn to earth
And I rise again as a tree
I will wait for your bird version
To sing in my arm branches!

-Fayyaz

Soul Mirror

I kept looking into the mirror
But couldn't see myself 
no matter how hard I tried
Until she came and let some light in.

-Fayyaz

The wanderings of sanity

The wanderings of sanity
---
Go
Live in the huts
vacated by shepherds during winters
Near lake Latbo
At feet of the Nanga Parbat
Or
Jump to the abyss
of the Mariana trench
Spend a day in the International Space Station
Watching all silly 7 billion of your kind
Or ride Voyager-I out of the solar system
In search of intelligent life
Spend a night nestled in your lover's bosom
Or dig a ditch
and bury yourself
Eat cement
Melt steel and pour it into a red wine glass
drink it down with some fine caviar
Run naked in the snow
Walk on your head
And think with your feet
Place your mind on a golf tee
And strike it with a sledgehammer
Pull your heart out and put it into
A horse's behind
Just never
go crazy!
-Fayyaz

Cola men

They were wise
Soft-Spoken, Composed
Settled
Like flat cola!

-Fayyaz