Help computing Berry phase, connection and curvature

806 views
Skip to first unread message

Azmat Habibullah

unread,
Dec 19, 2020, 1:56:49 PM12/19/20
to QuTiP: Quantum Toolbox in Python

Hi everyone,

I'm a student researching the values of Berry phase and comparing it with geometrical properties of the path traversed on the Bloch sphere. I stumbled across Qutip looking to model this situation and I'm trying to understand how to use the Berry curvature function help me understand this.

From what I can see, the Topology class contains two functions that can help: berry_curvature(eigfs) and plot_berry_curvature(eigfs). The docs say " berry_curvature(eigfs) computes the discretized Berry curvature on the two dimensional grid of parameters. The function works well for cases with no band mixing. eigfs is a 4 dimensional numpy ndarray where the first two indices are for the two discrete values of the two parameters and the third is the index of the occupied bands. The fourth dimension holds the eigenfunctions."

I'm having trouble understanding this: what do the parameters refer to? I know the definition of the Berry curvature as an antisymmetric tensor derived from the Berry connection but don't see how this fits in with this function. Could someone please help explain how this all fits together, or possibly provide an example?

Thank you!

Antonio Mariscal

unread,
Dec 19, 2020, 3:49:17 PM12/19/20
to qu...@googlegroups.com
Which system are you using? 2-level? I have code on it. I might post it in my github if yours is a 2-level system

El ds., 19 de des. 2020, 19:56, Azmat Habibullah <azmatha...@gmail.com> va escriure:
--
You received this message because you are subscribed to the Google Groups "QuTiP: Quantum Toolbox in Python" group.
To unsubscribe from this group and stop receiving emails from it, send an email to qutip+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/qutip/dd9ff2a8-bd4c-4c3f-b6a3-b9769f65a7e1n%40googlegroups.com.

Saumya biswas

unread,
Dec 19, 2020, 4:32:51 PM12/19/20
to qu...@googlegroups.com
Hi. Azmat.

I am in the dissertation phase of my phd and cannot complete the qutip job very soon. My bad.

Here is a simple example. Please look at the (freely available) thesis cited in the notebook.

I can send you another notebook with the example of two-d Haldene model ( that needs cleaning up) if you want. I never got around to getting my 2d lattice code review-ready for qutip.

Saumya

lattice- Berry Curvature of fractionally(rational) filled Charge Density Wave Insulators.ipynb

Azmat Habibullah

unread,
Dec 20, 2020, 7:02:23 AM12/20/20
to QuTiP: Quantum Toolbox in Python
I'm going to be trying it on many systems but I'd like to start with the 2-level system so if you could post the code that would be really helpful :)

Azmat Habibullah

unread,
Dec 20, 2020, 8:08:35 AM12/20/20
to QuTiP: Quantum Toolbox in Python
I am working on many systems but would like to start with a 2-level system so if you code post your code that would be very helpful :)

On Saturday, December 19, 2020 at 8:49:17 PM UTC antonio.m...@gmail.com wrote:

Azmat Habibullah

unread,
Dec 21, 2020, 8:10:04 AM12/21/20
to QuTiP: Quantum Toolbox in Python
Thank you Saumya! That's very helpful :)

Azmat Habibullah

unread,
Dec 22, 2020, 3:22:08 PM12/22/20
to QuTiP: Quantum Toolbox in Python
I've tried to code a simple script to calculate the Berry curvature for a particle in a magnetic field (the example here) but I seem to be getting 0 for the answer, whereas I should be getting 0.5 sin(theta). I would appreciate if somebody could help - here is the code I have written:

# initialise parameters
N = 50
thetas = np.linspace(0, np.pi, N)
phis = np.linspace(0, 2*np.pi, N)
eigfs = np.zeros((N, N, 2, 2), dtype=complex)
for i in range(N):
    for j in range(N):
        # H = B.sigma, sigma is vector of Pauli matrices
        H = sigmax() * np.sin(thetas[i]) * np.cos(phis[j]) + sigmay() * np.sin(thetas[i]) * np.sin(phis[j]) + np.cos(thetas[i]) * sigmaz()
        _, eigs = np.linalg.eigh(H)
        eigfs[i, j, :, :] = eigs[:, :]
berry_curvature(eigfs)

Saumya biswas

unread,
Dec 22, 2020, 8:08:50 PM12/22/20
to qu...@googlegroups.com
Hi. Azmat.

Good work so far. Please look a little into the ideas of bands and band-gaps. Chern numbers are calculated in band-gaps only. For two bands, like in the spinor example you are doing, the chern-number of 1 would be found if you calculate it in the gap between the two bands. So you will have one-filled band (max_occ=1).

The CDW example I sent you before is a 3by3 system with 3 bands and 2 gaps. I show the chern number in the two gaps in that example.

If you compute chern numbers for all bands filled, you will always get 0.

In the attached file, I appended your code with a segment that calculates the chern number in the gap between the two bands, i.e. max_occ = 1.

I did it really fast, please figure out why I had to take th negative of your Hamiltonian.

Hope it helps.

Saumya




spinor_B.py

Azmat Habibullah

unread,
Dec 26, 2020, 6:22:20 PM12/26/20
to QuTiP: Quantum Toolbox in Python
Hi Saumya,

That's incredibly helpful, thanks so much! Your point regarding chern number makes sense. Is taking the negative of the Hamiltonian to fix the gauge to get a positive sin plot? I also noticed you wrote that the plot is proportional to sin, and not equal to sin. Why is this the case? Is there a way to determine the scaling? My plan was to use the Berry curvature to compute the Berry phase but now I am unsure how to do this.

Thanks!

Saumya biswas

unread,
Dec 26, 2020, 9:03:36 PM12/26/20
to qu...@googlegroups.com
Hi. Azmat.

Great work till now!

Taking the negative switches the two eigenvalues(and eigenvectors), lower band becomes upper band and vice-versa! Why don't you work it out analytically completely? One of the eigen-vectors will give a chern number of -1, and the other +1.

I remember an issue of clock-wise vs counter-clockwise traversing while writing topology.py. See page 29 of the attached thesis. ("Disregarding a minus sign, the result is in agreement with the values known from the literature [14]") I had a plan of revisiting that convention at some point. You just prompted the process. Thanks.

We need to double check it against a few examples (a CDW one), a Haldene model example. Let's compare what the code gives and what the analytical answer is.

The second point is the gauge independent-ness of the Berry curvature. The eigenvectors can be given an arbitrary phase (i.e. if u is an eigenvector, then so is e^{i\phi}u ); however the berry curvature plot will not change in any way. It's gauge independent.

I negated the Hamiltonian to switch the two bands.

Please work out the problem beginning to end analytically, the wiki-page gave the eigenvectors too. Please share with me. I am very curious too. 

You can study the analytical chern number calculation in the thesis I just sent as well. (pages Around page 29).

Saumya





A_topo_approach2_CDW.pdf

Ravi Roy

unread,
Jan 18, 2022, 12:25:18 PM1/18/22
to QuTiP: Quantum Toolbox in Python
Hello Saumya . 

This thread has really helped me in understanding the concepts beautifully. May I ask a query regarding the same. I am trying a to find Berry curvature for a 4x4 Hamiltonian (Arxiv Paper Page 3) with parameter space kx,ky,kz. Everything seems fine but I do not get the similar plot. How do I put one parameter like kx =0 and use the other two like in the paper?. I understand when there are only two parameters theta and phi but I am in cartesian coordinate and want to get berry curvature in space of ky and kz. 

I am attaching my notebook where I have tried this. Any help or bit of guidance would be so helpful.

Ravi.
Test.ipynb

Dhruv sharma

unread,
Jul 17, 2023, 9:03:08 AM7/17/23
to QuTiP: Quantum Toolbox in Python
Hi Antonio,
    I am trying to solve for a two-level system. Can you share your code.
Cheers

Saumya biswas

unread,
Jul 31, 2023, 11:15:44 PM7/31/23
to qu...@googlegroups.com
Hi. Ravi. Sorry for taking forever to reply. Your paper looks interesting(and complicated haha). I'll give it a try when possible. But if you solved it yourself, please share the method on the examples?

Hi. Dhruv. Can you install the code in this PR:   https://github.com/qutip/qutip-lattice/pull/7?
The example usages can be found in 1) https://github.com/qutip/qutip-notebooks/pull/152

You are maybe looking for a notebook like "lattice- Spin Half in a magnetic field.ipynb" https://github.com/sbisw002/qutip.lattice-notebooks/blob/master/lattice-%20Spin%20Half%20in%20a%20magnetic%20field.ipynb
?

Saumya


Reply all
Reply to author
Forward
0 new messages