Skip to content

Split op updates #249

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 10 commits into from
Jul 28, 2018
Merged

Conversation

leios
Copy link
Member

@leios leios commented Jul 15, 2018

This PR will make large-scale changes to the text of the quantum systems chapter and split-op, adding in imaginary time evolution and several important quantities to understanding quantum systems.

At this point, I will be making a pass through for revisions and also adding in a number of citations that I am missing (I cannot find too many really good ones, but I'll add what I can).

Basically, there are still some somewhat heavy revisions necessary, but I thought I would put up a PR in the case anyone saw something that I was clearly missing at this point

@leios leios added Implementation Edit This provides an edit to an algorithm implementation. (Code and maybe md files are edited.) Chapter Edit This changes the archive's chapters. (md files are edited.) Discussion This is open for a discussion. labels Jul 15, 2018
Copy link
Member

@jiegillet jiegillet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You should really use a simple spellcheck :)

In other words, our particle must exist somewhere in the known universe.

As another note: Just like position space can be parameterized by a position vector $$\textbf{x}$$, wavefunctions can also be parameterized by a _wave_ vector $$\textbf{k}$$ in frequency space.
Any wavevector $$\textbf{k}$$ has the same units as reciprocal space and is thus analogous to angular frequency $$\omega$$.
Often times, the wavevector space is called _momentum_ space, which makes sense when considering the de Broglie formula:

$$
p = \frac{h}{\lambda}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about p =\frac{h}{\lambda} = \frac{2 \pi h}{2 \pi \lambda} = \hbar k

\sigma_x \sigma_p \geq \frac{\hbar}{2}
$$

where $$\hbar$$ is Planck's constant and $$\sigma = \sqrt{\frac{1}{N}\sum_{i=1}^{N}(x_i-\mu)}$$.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

square missing => \sigma = \sqrt{\frac{1}{N}\sum_{i=1}^{N}(x_i-\μ)^2}

Actually I suggest using \sigma_q = \sqrt{\frac{1}{N}\sum_{i=1}^{N}(q_i-\μ)^2} ... , $$q_i$$ is the value for each point $$i$$, and $$q$$ stands for $$x$$ or $$p$$.


$$
\begin{align}
\hat H &= T + V \\
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Those hats render funny...

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, T and V should be hatted.

For the most part, when we are trying to solve this equation the left-hand side does not change.
It's always $$i \hbar \frac{\partial \Psi(\mathbf{r},t)}{\partial t}$$.
On the other hand, the right-hand side can change a lot depending on the situation.
That is to say that we can easily simplify the Schrodinger equation by using a notational trick called the _Hamiltonian_.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not super comfortable calling hamiltonians a trick. I would call it a formalism.

We can basically say that the Hamiltonian is a measure of the energy of our quantum system.
More specifically, we can say that the Hamiltonian is a set of energy _operators_ that act on our wavefunction.

In the case of the example provided here, we might use the following definitions:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Which example? Maybe say "In the case a 1D particle in a harmonic trap"

In fact, [quantum information theory](../quantum_information/quantum_information.md) is currently set to be the next innovation to radically change the landscape of modern computation as we know it!
Of course, because of the large-scale effects that this will likely have on the industry, it deserved it's own section.

As always, if there is something that you feel is missing from this section, please feel free to contact me or create an issue on github and we'll get to it as soon as we can!
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

github => GitHub


The truth is that until we have real quantum simulators, simulating quantum systems on classical hardware is as good as we can do.
The truth is that quantum simulators are hard to make in laboratories, so simulating quantum systems on classical hardware is as good as we can do in most cases.
This section is devoted to all the different methods currently used to solve complex quantum systems, so let's start with the Schrodinger Equation, which has many different fomulations.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fomulations => formulations

In fact, this is why one of the most common types of quantum simulation is via _diffusion monte carlo_.
There really isn't that much of a difference between the two systems in terms of classical simulation.
In fact, this is why one of the most common types of quantum simulation is sometimes called _diffusion monte carlo_.
There really isn't that much of a difference between the two systems in terms of how they are simulated on classical hardware... but we are gettign ahead of ourselves.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

gettign => getting

This is a powerful statement and should be given some thought.

To me, the most interesting part of this description is not the physical interpretation, but the fact that this act of transforming between larger and smaller gaussians is precisely what Fourier transforms do!
This further strengthens our arguement from before.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

arguement => argument

$$

In other words, we can derive a function by performing a Fourier transform on the function, multiplying by some momentum-space grid, and then inverse-transforming it back.
Because this operation inherently involves a tranform into momentum space before transformation, it is a momentum-space operator.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tranform => transform

@leios
Copy link
Member Author

leios commented Jul 21, 2018

Alright, making these changes and then pushing the chapters with images / gifs.

Copy link
Member

@jiegillet jiegillet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is real_time.xcf being used? also imaginary_time.xcf?

$$

where $$\hbar$$ is Planck's constant and $$\sigma_q = \sqrt{\frac{1}{N}\sum_{i=1}^{N}(q_i-\mu)^2}$$.
In this case, $$\sigma$$ is the standard deviation, $$\mu$$ is the statistical mean of your distribution, $$N$$ is the number of points sampled, $$q_i$$ is the value for each point $$i$$, and $$q$$ stands for $$x$$ or $$p$$..
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

typo here: $$p$$..

In the end, we can update our Schrodinger equation to be

$$
i \hbar \frac{\partial \Psi(\mathbf{r},t)}{\partial t} = \hat H Psi(\mathbf{r},t)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Psi => \Psi

@@ -0,0 +1,19 @@
# We are calculating the energy to check <Psi|H|Psi>
function calculate_energy(par, opr)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's hard to understand what par and opr are without context. Could your give them a more explicit name and also refer to some piece fo code where they are used?

In the end, many quantum simulations are focused on the _ground_ state, which is the lowest energy state ($$\Psi_0$$); however, sometimes higher energy states are desired.

## The Future

As we proceed to add new algorithms to simulate quantum systems, I will add more and more notation to this section; however, there are already huge textbooks out there related to understanding and studying quantum systems.
We don't want to re-invent the wheel here.
Instead, we want to focus on an area that is often not considered with too much detail -- the algorithms and methods researchers use to ascertain new knowedge about quantum mechanics, like the split-operator method, DMRG, quantum monte carlo, exact diagonalization, and many more.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

-- => :
I had already pointed that out (and the Psi one) in my previous review. You may have forgotten to correct more, maybe go through it again?

@@ -1,87 +1,141 @@
# The Split-Operator Method
The Split-Operator Method (also called the Split-Step Method), was actually the primary method I used to solve the Schrodinger equation during my PhD.
It is one of the simplest and fastest methods for this purpose and is widely used throughout modern quantum research in the area -- in particular when dealing with the Non-linear Schrodinger Equation:
It is one of the simplest and fastest methods for this purpose and is widely used throughout modern quantum research in the area -- in particular when dealing with the Non-linear Schrodinger Equation (NLSE):
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Again -- => ,. This punctuation works in LaTeX but not markdown ^^

If we were to calculate the energy in real units, our simulation would output $$5.272859 \times 10^{-35}$$, which is hard to interpret.
By instead using natural units, we get precisely $$\frac{1}{2}$$ and we know that those are in units of $$\hbar\omega$$.

There is a huge debate over the utility of natural units, but there is no doubt that it makes the simulation easier to understand (albeit a little misleading in the end).
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is a huge debate maybe in the Bush Unit, but I don't think you should give the impression that natural units are controversial.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't know. I feel like a lot of experimentalists prefer to do their simulations with real units. I know my previous advisor absolutely hated the idea of using natural units and insisted that we keep all the constants in the calculation, no matter what.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

People have their preference, yes, but I'm sure no one argues the utility of natural units in general for theoretical research. Maybe you can turn it like "These units may seem very strange to an experimentalist, but there is no doubt that... "
Ultimately, it's the term "huge debate" that I don't like. A little too sensationalist.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fair enough. I'll change it. Thanks!

{% endmethod %}

Here, we use a standard harmonic potential for the atoms to sit in and a gaussian distribution for an initial guess for the probability distribution.
As a note, if we run this simulation in _imaginary time_, by simply setting $$\tau = it$$ and stepping through $$\tau$$, we will no longer see an "real-world" example of how the atoms should behave, but will instead see an exponential decay of higher-energy states.
This means that we can find the ground state of our system by running the simulation in imaginary time, which is an incredibly useful feature!
If we give either the trap or the atoms a slight offset (so the gaussian distribution of atoms does not *quite* rest at the bottom of the $$x^2$$ potential, we can see the atoms moving back and forth in the potential as we move the simulation forward in time.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Refer to the above picture.

This means that we can find the ground state of our system by running the simulation in imaginary time, which is an incredibly useful feature!
If we give either the trap or the atoms a slight offset (so the gaussian distribution of atoms does not *quite* rest at the bottom of the $$x^2$$ potential, we can see the atoms moving back and forth in the potential as we move the simulation forward in time.
This means that we can easily see the dynamics of our quantum system!
If we run the simulation in imaginary time, we will see the gaussian distribution of atoms move towards the center of the potential, which is the location with the lowest energy.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Refer to the above picture.

plot([density, real(opr.V)])
savefig("density" * string(lpad(i, 5, 0)) * ".png")
println(i)
# renormalizing for imaginary time
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it necessary to renormalize at every time step? I can't quite remember.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, I saw later you commented on this. Basically if you don't renormalize the values all fly to 0, right?

println(i)
# renormalizing for imaginary time
if (par.im_time)
sum = 0
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I know you like loops, but surely Julia has a sum function, no?

@leios
Copy link
Member Author

leios commented Jul 25, 2018

Working on these changes. It's taking some time because I'm kinda busy with work this week.

@jiegillet
Copy link
Member

Take your time man, it's your book :)

@leios
Copy link
Member Author

leios commented Jul 28, 2018

Ok. I think I addressed everything. Let me know if I missed anything. Thanks a bunch for the review, it was probably the best review we've had for a chapter so far!

@jiegillet jiegillet merged commit ef4736e into algorithm-archivists:master Jul 28, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Chapter Edit This changes the archive's chapters. (md files are edited.) Discussion This is open for a discussion. Implementation Edit This provides an edit to an algorithm implementation. (Code and maybe md files are edited.)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants