Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
M
MeanFi
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Quantum Tinkerer
MeanFi
Commits
fe3af47b
Commit
fe3af47b
authored
1 year ago
by
Antonio Manesco
Browse files
Options
Downloads
Patches
Plain Diff
delete unused functions
parent
7a04263f
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
codes/kwant_examples.py
+1
-51
1 addition, 51 deletions
codes/kwant_examples.py
with
1 addition
and
51 deletions
codes/kwant_examples.py
+
1
−
51
View file @
fe3af47b
...
@@ -33,54 +33,4 @@ def graphene_extended_hubbard():
...
@@ -33,54 +33,4 @@ def graphene_extended_hubbard():
func_hop
=
nn_int
,
func_hop
=
nn_int
,
)
)
return
bulk_graphene
,
syst_V
return
bulk_graphene
,
syst_V
\ No newline at end of file
def
hubbard_2D
(
U
,
N_ks
):
square
=
kwant
.
lattice
.
square
(
a
=
1
,
norbs
=
2
)
# create bulk system
bulk_hubbard
=
kwant
.
Builder
(
kwant
.
TranslationalSymmetry
(
*
square
.
prim_vecs
))
bulk_hubbard
[
square
.
shape
((
lambda
pos
:
True
),
(
0
,
0
))]
=
0
*
np
.
eye
(
2
)
# add hoppings between lattice points
bulk_hubbard
[
square
.
neighbors
()]
=
-
1
# use kwant wraparound to sample bulk k-space
wrapped_fsyst
=
kwant
.
wraparound
.
wraparound
(
bulk_hubbard
).
finalized
()
# return a hamiltonian for a given kx, ky
@np.vectorize
def
hamiltonian_return
(
kx
,
ky
,
params
=
{}):
ham
=
wrapped_fsyst
.
hamiltonian_submatrix
(
params
=
{
**
params
,
**
dict
(
k_x
=
kx
,
k_y
=
ky
)})
return
ham
N_k_axis
=
np
.
linspace
(
0
,
2
*
np
.
pi
,
N_ks
,
endpoint
=
False
)
hamiltonians_0
=
np
.
array
(
[[
hamiltonian_return
(
kx
,
ky
)
for
kx
in
N_k_axis
]
for
ky
in
N_k_axis
]
)
# onsite interactions
v_int
=
U
*
np
.
ones
((
2
,
2
))
V
=
np
.
array
([[
v_int
for
i
in
range
(
N_ks
)]
for
j
in
range
(
N_ks
)])
return
hamiltonians_0
,
V
def
hubbard_1D
(
U
,
N_ks
):
chain
=
kwant
.
lattice
.
chain
(
a
=
1
,
norbs
=
2
)
# create bulk system
bulk_hubbard
=
kwant
.
Builder
(
kwant
.
TranslationalSymmetry
(
*
chain
.
prim_vecs
))
bulk_hubbard
[
chain
.
shape
((
lambda
pos
:
True
),
(
0
,))]
=
0
*
s0
# add hoppings between lattice points
bulk_hubbard
[
chain
.
neighbors
()]
=
-
1
# return a hamiltonian for a given kx, ky
@np.vectorize
def
hamiltonian_return
(
kx
,
params
=
{}):
ham
=
wrapped_fsyst
.
hamiltonian_submatrix
(
params
=
{
**
params
,
**
dict
(
k_x
=
kx
)})
return
ham
N_k_axis
=
np
.
linspace
(
0
,
2
*
np
.
pi
,
N_ks
,
endpoint
=
False
)
hamiltonians_0
=
np
.
array
(
[
hamiltonian_return
(
kx
)
for
kx
in
N_k_axis
]
)
return
hamiltonians_0
,
V
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment