Download 1 Model and Parameters. 2 Hilbert space in a Hubbard model.

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts

Capelli's identity wikipedia , lookup

Linear algebra wikipedia , lookup

Cartesian tensor wikipedia , lookup

Tensor operator wikipedia , lookup

Determinant wikipedia , lookup

Quadratic form wikipedia , lookup

Oscillator representation wikipedia , lookup

Bra–ket notation wikipedia , lookup

Basis (linear algebra) wikipedia , lookup

Matrix (mathematics) wikipedia , lookup

Symmetry in quantum mechanics wikipedia , lookup

Eigenvalues and eigenvectors wikipedia , lookup

Four-vector wikipedia , lookup

Singular-value decomposition wikipedia , lookup

Non-negative matrix factorization wikipedia , lookup

Jordan normal form wikipedia , lookup

Perron–Frobenius theorem wikipedia , lookup

Orthogonal matrix wikipedia , lookup

Cayley–Hamilton theorem wikipedia , lookup

Matrix calculus wikipedia , lookup

Matrix multiplication wikipedia , lookup

Transcript
Guide to the Programming Exercise.
1
Model and Parameters.
1.) Hubbard Model
X
X
X
µj njσ
Uj nj↑ nj↓ +
tij c†iσ cjσ + h.c. +
H=
2
(1)
jσ
j
ijσ
Hilbert space in a Hubbard model.
We will consider the Hilbert space of a system with two sites (1,2) and two
electrons. It has three different sectors.
2nd quantization
c†2↑ c†1↑ |0i
c†1↓ c†1↑ |0i
c†1↓ c†2↑ |0i
c†2↓ c†1↑ |0i
c†2↓ c†2↑ |0i
c†1↓ c†2↓ |0i
graphical N↑
↑
N↓
↑
2
0
↑↓
↑ ↓
↓ ↑
↑↓ 1
1
1
1
1
1
1
1
↓
0
2
↓
(2)
1. |0i ≡ Vacuum
2. c†iσ (ciσ ): Creation(anihilation) of one electron on site i = 1, 2 and spin
σ =↑, ↓
3. |φi = c†iσ c†i′ σ′ |0i: States of the basis The basis of the whole Hilbert space
is |φl i l = 0, 4L − 1
4. niσ : Occupation number operator of site i and spin σ It is diagonal in
the basis states we use. hniσ iφl = aiσ . Electrons are fermions and thus
aiσ = 0, 1. Therefore aiσ is a binary digit and we will make use of this
fact.
P
5. Nσ = j hnjσ iΨ : Expectation value (in state Ψ) of the total number of
electrons with spin σ (up or down). It is always a well defined quantum
number if Ψ is one of the basis states we use.
P
P
Nσ = j hnjσ iφ = j ajσ
6. Sector ≡ Subspace with well-defined numbers N↑ and N↓
3
Efficient Representation of the Hilbert space.
Since the occupation operators are diagonal in the basis φl we can write each
element of the basis in a binary representation. We only have to concatenate
the binary digits.
State in binary notation:
|φi = |aL↓ aL−1↓ aL−2↓ · · · a3↓ a2↓ a1↓ i|aL↑ aL−1↑ aL−2↑ · · · a3↑ a2↑ a1↑ i
(3)
• By translating the two binary mumbers to integer numbers, we can also
express each basis state in an integer representation:
|φl i = |a↓ i|a↑ i
(4)
i.e. each basis state is assigned a pair of integer numbers
• The translation from binary to integer is:
aσ =
L
X
ajσ 2j−1
(5)
j=1
• Furthermore each basis state can be assigned a single integer number
l = a↓ × 2L + a↑ . Therefore l = 0, . . . , 4L − 1
Write a subroutine to transform from binary to integer representation.
Write a subroutine to transform from integer to binary representation.
Write a subroutine which takes as an argument a↑ (a↓ ) and computes N↑ (N↓ )
4
Classify basis states in sectors with well defined occupation numbers
Let us collect the different representations of {φl }
2nd quantization
c†2↑ c†1↑ |0i
c†1↓ c†1↑ |0i
c†1↓ c†2↑ |0i
c†2↓ c†1↑ |0i
c†2↓ c†2↑ |0i
c†1↓ c†2↓ |0i
graphical
binary
a↓
a↑
N↑
N↓
l
k
↑
|00i↓ |11i↑
0
3
2
0
3
1
↑↓
↑ ↓
↓ ↑
↑↓ |01i↓ |01i↑
|01i↓ |10i↑
|10i↓ |01i↑
|10i↓ |10i↑
1
1
2
2
1
2
1
2
1
1
1
1
1
1
1
1
5
6
9
10
1
2
3
4
↓
|11i↓ |00i↑
3
0
0
2
12
1
↑
↓
(6)
• Array storing the states of the Hilbert space in each sector
List_States(k,s)=is
s here represents σ
Write the part of the code which selects all the states belonging
to a given sector and constructs the list List States(k,s) in the
sector with N↑ = N↑∗ and N↓ = N↓∗
k=0;
for (a_up=0; i_up<2^L;a_up++)
for (a_dw=0; i_dw<2^L;a_dw++)
{
N_up=number_of_electrons(a_up); // count electron number given i
N_dw=number_of_electrons(a_dw);
if ((N_up==N*_up) && (i_dw==N*_dw))// if it belongs to selected sector
{
k=k+1;
List_States(k,0)=a_up
List_States(k,1)=a_dw
}
}
• Check that the number of different sectors in a system with size L and
total number of electrons N is N+1.
N↓
N↓
···
···
N↓
N↓
= 0, N↑ = N
= 1, N↑ = N − 1
= N − 1, N↑ = 1
= N, N↑ = 0
• Size of a sector. Check that the size of a sector is:
Nk (L, N↑ , N↓ ) = kmax =
L!
L!
(L − N↑ )!N↑ ! (L − N↓ )!N↓ !
(7)
where L is the size of the system.
• Size of biggest sector: N↓ = L/2, N↑ = L/2
Nk =
L!
(L/2)!2
2
Example: L = 8 Nk = 4900 Compare with 48 = 65536
(8)
5
Generate the matrix elements of the Hamiltonian.
• Consider how to initialize the physical parameters in each site of the system.
• Consider boundary conditions, dimensions and shape of the system.
Write a subroutine to initialize and display the physical parameters
in each site of the system.
5.1
Diagonal Terms
Write a subroutine to compute the chemical potential term in the
Hamiltonian.
X
njσ
(9)
Hµ = µj
jσ
Write a subroutine to compute an onsite energy term in the Hamiltonian.
X
εj njσ
(10)
H=
jσ
Write a subroutine to compute the interaction term in the Hamiltonian.
X
Uj nj↑ nj↓
(11)
HU =
j
Write a subroutine to compute the coupling to a magnetic field.
X
Sjz
(12)
HB = B
j
5.2
Off-diagonal terms
1. Example L = 2 N = 2. Let us consider the state:
|φ0 i = c†1↓ c†1↑ |0i
and we are going to compute the matrix elements corresponding to the
hopping term between sites 1 and 2 (both spins):
Ht = −t c†2↑ c1↑ + c†2↓ c1↓
Let us act with the hopping term in the state:
Ht |φ0 i = −t c†2↑ c1↑ + c†2↓ c1↓ c†1↓ c†1↑ |0i
= −t c†2↑ c1↑ c†1↓ c†1↑ + c†2↓ c1↓ c†1↓ c†1↑ |0i
= −t −c†2↑ c†1↓ c1↑ c†1↑ |0i + c†2↓ c†1↑ c1↓ c†1↓ |0i
= −t −c†2↑ c†1↓ |0i + c†2↓ c†1↑ |0i
= −t c†1↓ c†2↑ |0i + c†2↓ c†1↑ |0i
2. We have used:
cα , c†β = cα c†β + c†β cα = δα,β
(13)
cα c†α = (1 − nα )
(14)
3. Therefore this hopping connects |φ0 i with these two states:
c†1↓ c†2↑ |0i, c†2↓ c†1↑ |0i
(15)
and the matrix element is −t.
4. It is easy to generalize this result for arbitrary L and N Let us consider
another example L > 2 N > 2 and let us call:
|F i =
Y
c†jσ |0i
(16)
j̄ σ̄
j̄ a few j’s different from i We are going to use |F i as a reference instead
of |0i.
|φ0 i = c†iσ |F i
Note that |F i cannot have the site i occupied. Now we apply the hopping
term on |φ0 i
Ht |φ0 i = −t c†i+1σ ciσ (c†iσ |F i)
we get
Ht |φ0 i = −t c†i+1σ |F i
if we call |φ1 i = c†i+1σ |F i, the matrix element is:
hφ1 |Ht |φ0 i = −thF |ci+1σ c†i+1σ |F i = −t
(17)
Very important: If the ordering of the creation operators changes with
respect to the initial convention, we have to take into account a phase
factor.
Example: If we apply the hopping term −t c†1σ cLσ
state :
−t c†1σ cLσ c†Lσ c†5σ c†4σ c†2σ |0i
to a many-particle
(18)
we get
−t c†1σ c†5σ c†4σ c†2σ |0i(19)
the new state is not written in the same convention than the original, c†1σ
should be on the rightmost position. We can shift the creation operator
to the right using the anticommutation relations. If we do that:
−t(−1)nL,...,1σ c†5σ c†4σ c†2σ c†1σ |0i
(20)
where nL,...,1 is the number of occupied states in between the sites 1 and
L
5.3
Bitwise Implementation of the hopping term .
5. Example of two states connected by nearest-neighbor hopping expressed
in bit-level representation:
0
0
1 0
1 0
0
0
0
1
1
0
1
1
0
0
(21)
6. State manipulations with bit operations. Let a[j] be the j:th bit of an
integer i
7. Exclusive OR= XOR Logic gate . Let C and D two bits. XOR Flips C if
D=1. XOR keeps C unchanged if D=0
C
0
0
1
1
D
0
1
0
1
C XOR D
0
1
1
0
(22)
8. In Fortran 90 the bit-level intrinsic function ieor(a,2**j) can be used to
flip bit j of integer i
a
0 1
2j
0 0
ieor(a, 2 ∗ ∗j) 0 1
0 0
0 0
0 0
0
1
1
1 1
0 0
1 1
0
0
0
(23)
a
0 1
2j
0 0
ieor(a, 2 ∗ ∗j) 0 1
0 0
0 0
0 0
1
1
0
1 1
0 0
1 1
0
0
0
(24)
9. Bits j and j+1 can be flipped using ieor(a,2**j+2**(j+1))
a
0
2j + 2j+1
0
ieor(a, 2 ∗ ∗j + 2 ∗ ∗(j + 1)) 0
1
0
1
0 0
0 0
0 0
0
1
1
1
1
0
1
0
1
0
0
0
(25)
10. Check if the following intrinsic functions are available in your FORTRAN
compiler:
11. IBSET(i,j) sets the j bit of integer i as 1
12. IBCLR(i,j) sets the j bit of integer i as 0
13. BTEST(i,j) returns the value of the j bit of i ( watch! BTEST resturns a
boolean variable)
5.4
Boundary Conditions.
14. The kinetic term in a 1D tight-binding model with L sites and with nearestneighbor hopping only is: Open Boundary Conditions (OBC).
H=−
L−1
X
tj (c†jσ cj+1σ + c†j+1σ cjσ )
(26)
j=1;σ
15. alternatively we can label the L sites j = 0, · · · L − 1
H =−
L−2
X
···
(27)
j=0;σ
16. Consider Periodic Boundary Conditions (PBC).
H=−
L−1
X
j=0;σ
tj (c†jσ cj+1σ + c†j+1σ cjσ )
(28)
Note that we start labeling from j = 0 (i.e. j = 0, · · · L − 1). Site j = L
must be j = 0 (like in a ring).
17. Which is the neighbor of site j?
j+1
for
1<j <L−2
(29)
0
for
j =L−1
(30)
i.e. we can use mod(j+1,L)
18. Using the labeling j = 0, · · · L − 1, we recover OBC we can set tj=L−1 = 0
19. The matrix elements can be labeled hφk1 |H|φk2 i = H(k1 , k2 ). k1 k2 The
indices k (and thus the correspondence with the two-particle state) are
given in the following table:
k
1
2
3
4
2nd quantization
c†1↓ c†1↑ |0i
c†1↓ c†2↑ |0i
c†2↓ c†1↑ |0i
c†2↓ c†2↑ |0i
graphical
↑↓
↑ ↓
↓ ↑
↑↓ binary
|01i↓ |01i↑
|01i↓ |10i↑
|10i↓ |01i↑
|10i↓ |10i↑
i↓
1
1
2
2
i↑
1
2
1
2
N↑
1
1
1
1
N↓
1
1
1
1
(31)
20. Matrix elements of the Hamiltonian for L = 2 N ∗↑ = 1 N ∗dw = 1.
Using the convention above, the matrix elements of the Hamiltonian are:

U + 2µ −t −t
 −t
2µ 0
H =
 −t
0 2µ
0
−t −t U

0
−t 

−t 
+ 2µ
(32)
21. A one-dimensional Hamiltonian with a topological phase:
H0
=
X
(M + 2B)Ψ†j σz Ψj −
X
sgn(x̂)iAΨ†j σx Ψj+x̂
j
−
X
BΨ†j σz Ψj+x̂
(33)
j,x̂
j,x̂
where σx , σz are Pauli matrices and Ψi = (ci↑ , ci↓ )T with ci↑ (ci↓ ) electron
annihilating operator at the site ri . The first two terms represent the
differences of the on-site potentials and the hopping amplitudes between
the up- and down- electrons, and the third term is due to the spin-orbit
coupling.
Let us expand the spin-orbit coupling term.
X
HSO −
sgn(x̂)iAΨ†j σx Ψj+x̂ =
j,x̂
− iA
X
c†j↑ cj+1↓ + c†j↓ cj+1↑ − c†j↑ cj−1↓ − c†j↓ cj−1↑
j
Write a subroutine to implement one hopping term in HS0 above
22. Role of the kinetic term: In momentum space Eq.(33) becomes H0 =
P †
T
k Ψk H(k)Ψk with Ψk = (ck↑ , ck↓ ) the Fourier partner of Ψi and
H(k) = [M + 2B − 2B cos(k)]σz + 2A sin(k)σx .
The spectrum of H(k) consists of two bands,
p
(1,2)
Ek
= ± [M + 2B − 2B cos(k)]2 + [2A sin(k)]2 .
23. Note that, in this model, the total number of electrons is conserved, but
N↑ and N↓ are not preserved independently. :
24. Size of a sector with L sites and N electrons:
Nk =
(2L)!
(N )!(L − N )!
(34)
25. Determine UC (M ) for
26. Let us connect OBC and PBC by taking tj=L = ǫt with ǫ in [0,1] . Do the
edge states survive for finite value of ǫ?. Do they preserve the topological
character?.
0
0
27. Postulate a variational wavefunction for: ∆nj = hψn+1
|nj |ψn+1
i−hψn0 |nj |ψn0 i,
†
†
where nj = cj↑ cj↑ + cj↓ cj↓ is the electron number operator on site j and
ψn0 is the ground-state wave function of the system with n electrons.
6
Numerical diagonalization of H
An efficient way to diagonalize a symmetric matrix is
1. Convert the original matrix in a tridiagonal matrix by using the Householder transformation.
2. Diagonalize the tridiagonal resulting matrix by using QR (o QL) algorithm
Examples: Subroutines in Numerical Recipes. Tridiagonalization :tred2 QL
algorithm :tqli
The number of operations involved in the diagonalization of a tridiagonal
matrix is about nop ∼ 30N 2 . If eigenvectors are needed nop ∼ 3N 3 .
Header of tred2 subroutine
subroutine tred2(nm,n,a,d,e,z)
c
integer i,j,k,l,n,ii,nm,jp1
double precision a(nm,n),d(n),e(n),z(nm,n)
double precision f,g,h,hh,scale
c
c
this subroutine is a translation of the algol procedure tred2,
c
num. math. 11, 181-195(1968) by martin, reinsch, and wilkinson.
c
handbook for auto. comp., vol.ii-linear algebra, 212-226(1971).
c
c
this subroutine reduces a real symmetric matrix to a
c
symmetric tridiagonal matrix using and accumulating
c
orthogonal similarity transformations.
c
c
on input
c
c
nm must be set to the row dimension of two-dimensional
c
array parameters as declared in the calling program
c
dimension statement.
c
c
n is the order of the matrix.
c
c
a contains the real symmetric input matrix. only the
c
lower triangle of the matrix need be supplied.
c
c
on output
c
c
d contains the diagonal elements of the tridiagonal matrix.
c
c
e contains the subdiagonal elements of the tridiagonal
c
matrix in its last n-1 positions. e(1) is set to zero.
c
c
z contains the orthogonal transformation matrix
c
produced in the reduction.
c
c
a and z may coincide. if distinct, a is unaltered.
c
Header for a tqli subroutine
SUBROUTINE tqli(d,e,n,np,z)
C***********************************************************
C
QL method for finding eigenvalues of symmetric
C
tridiagonal matrix
C
C
Ref.: W.H.Press et al., Numerical Recipes in FORTRAN,
C
2nd. ed. (Cambridge, 1992), p.473-474.
C
C NOTE that all input real variables are in double
C
precision !
C
C QL algorithm with implicit shifts, to determine the
C
eigenvalues and eigenvectors of a real, symmetric,
C
tridiagonal matrix, or of a real, symmetric matrix
C
previously reduced by tred2 (sec.11.2).
C d is a vector of length np.
C On input, its first n elements are the diagonal elements
C
of the tridiagonal matrix.
C On output, it returns the eigenvalues.
C The vector e inputs the subdiagonal elements of the
C
tridiagonal matrix, with e(1) arbitrary.
C On output e is destroyed.
C When finding only the eigenvalues, several lines may be
C
omitted, as noted in the comments.
C
C
If the eigenvectors of a tridiagonal matrix are desired,
C
the matrix z (n by n matrix stored in np by np array)
C
is input as the identity matrix.
C
C If the eigenvectors of a matrix that has been reduced
C
by tred2 are required, then z is input as the matrix
C
output by tred2.
C In either case, the k-th column of z returns the
C
normalized eigenvector corresponding to d(k).
C
C***********************************************************
7
Examples of functions in C++
void convert_bin(LABEL_STATE state,short int *conf)
{ // a is the number of states per site and spin a=2
occ/empt
LABEL_STATE state_new=state;
for (int j=L-1; j>-1 ; j--) // from L-1 to 0 in reverse order
{
conf[L-1-j]=0;
// initialize the conf of site to zero
long int a_to_j=pow(a,j); // compute 2^i
if (state_new < a_to_j)
// if the integer is smaller 2^i
{
conf[L-1-j]=0;
// then the site remain epty
}
else
{
conf[L-1-j]=1;
// otherwise is occupied
state_new-=a_to_j;
// substract 2^j and repeat
assert(state_new>-1);
}
}
}
Improve the code
8
Apendix.
List of FORTRAN intrinsic functions for bitwise operations with integers:
Operation
Number of arguments Intrisic Function
Bitwise AND
2
IAN D
Bitwise inclusive OR
2
IOR
Bitwise complement
1
N OT
Bitwise exclusive OR
2
IEOR
Bitwise logical shift
2
ISHF T
Bitwise circular shift
2
ISHF T C
Bit extraction
3
IBIT S
Bit set
2
IBIT SET
Bit test
2
BT EST
Bit clear
2
IBCLR