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
Merge requests
!6
Documentation
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
Documentation
documentation
into
main
Overview
16
Commits
28
Pipelines
19
Changes
19
Merged
Kostas Vilkelis
requested to merge
documentation
into
main
10 months ago
Overview
16
Commits
28
Pipelines
19
Changes
13
Expand
Construct the documentation for the release of the package.
0
0
Merge request reports
Compare
version 5
version 16
abc2e688
10 months ago
version 15
fe00fad7
10 months ago
version 14
1194fdf1
10 months ago
version 13
396802da
10 months ago
version 12
ce285fdc
10 months ago
version 11
849b41f6
10 months ago
version 10
84971514
10 months ago
version 9
23f4b5d8
10 months ago
version 8
06ee3d62
10 months ago
version 7
7e07f78a
10 months ago
version 6
5904b9ac
10 months ago
version 5
f750ade0
10 months ago
version 4
ff709ebe
10 months ago
version 3
5b30eda8
10 months ago
version 2
a7d0f6f3
10 months ago
version 1
661bea6a
10 months ago
main (base)
and
version 10
latest version
d18ddc5b
28 commits,
10 months ago
version 16
abc2e688
27 commits,
10 months ago
version 15
fe00fad7
26 commits,
10 months ago
version 14
1194fdf1
25 commits,
10 months ago
version 13
396802da
21 commits,
10 months ago
version 12
ce285fdc
18 commits,
10 months ago
version 11
849b41f6
17 commits,
10 months ago
version 10
84971514
16 commits,
10 months ago
version 9
23f4b5d8
11 commits,
10 months ago
version 8
06ee3d62
10 commits,
10 months ago
version 7
7e07f78a
9 commits,
10 months ago
version 6
5904b9ac
8 commits,
10 months ago
version 5
f750ade0
5 commits,
10 months ago
version 4
ff709ebe
4 commits,
10 months ago
version 3
5b30eda8
3 commits,
10 months ago
version 2
a7d0f6f3
2 commits,
10 months ago
version 1
661bea6a
1 commit,
10 months ago
Show latest version
13 files
+
354
−
275
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
13
Search (e.g. *.vue) (Ctrl+P)
pymf/kwant_helper/utils.py
+
35
−
23
Options
import
inspect
from
copy
import
copy
from
itertools
import
product
from
typing
import
Callable
from
pymf.tb.tb
import
tb_type
import
kwant
import
numpy
as
np
from
scipy.sparse
import
coo_array
def
builder_to_tb
(
builder
,
params
=
{},
return_data
=
False
):
"""
Construct a tight-binding model dictionary from a `kwant.Builder`.
def
builder_to_tb
(
builder
:
kwant
.
Builder
,
params
:
dict
=
{},
return_data
:
bool
=
False
)
->
tb_type
:
"""
Construct a tight-binding dictionary from a `kwant.Builder` system.
Parameters
----------
builder :
`kwant.Builder`
Either builder for non-interacting system or interacting Hamiltonian
.
params :
dict
Dictionary of parameters to evaluate the
Hamiltonia
n.
return_data :
bool
builder :
system to convert to tight-binding dictionary
.
params :
Dictionary of parameters to evaluate the
builder o
n.
return_data :
Returns dictionary with sites and number of orbitals per site.
Returns
-------
h_0 :
dict
Tight-binding
model of non-interacting systems
.
data :
dict
h_0 :
Tight-binding
dictionary that corresponds to the builder
.
data :
Data with sites and number of orbitals. Only if `return_data=True`.
"""
builder
=
copy
(
builder
)
@@ -124,27 +128,35 @@ def builder_to_tb(builder, params={}, return_data=False):
return
h_0
def
build_interacting_syst
(
builder
,
lattice
,
func_onsite
,
func_hop
,
max_neighbor
=
1
):
"""
Construct an auxiliary `kwant` system to build Hamiltonian matrix.
def
build_interacting_syst
(
builder
:
kwant
.
Builder
,
lattice
:
kwant
.
lattice
,
func_onsite
:
Callable
,
func_hop
:
Callable
,
max_neighbor
:
int
=
1
,
)
->
kwant
.
Builder
:
"""
Construct an auxiliary `kwant` system that encodes the interactions.
Parameters
----------
builder :
`kwant.Builder`
builder :
Non-interacting `kwant` system.
func_onsite : function
Onsite function.
func_hop : function
Hopping function.
max_neighbor : int
Maximal nearest-neighbor order.
lattice :
Lattice of the system.
func_onsite :
Onsite interactions function.
func_hop :
Hopping/inter unit cell interactions function.
max_neighbor :
The maximal number of neighbouring unit cells (along a lattice vector)
connected by interaction. Interaction goes to zero after this distance.
Returns
-------
int_builder :
`kwant.Builder`
Dumm
y `kwant.Builder` t
o compute interaction matrix
.
int_builder :
Auxiliar
y `kwant.Builder` t
hat encodes the interactions of the system
.
"""
# lattice_info = list(builder.sites())[0][0]
# lattice = kwant.lattice.general(lattice_info.prim_vecs, norbs=lattice_info.norbs)
int_builder
=
kwant
.
Builder
(
kwant
.
TranslationalSymmetry
(
*
builder
.
symmetry
.
periods
))
int_builder
[
builder
.
sites
()]
=
func_onsite
for
neighbors
in
range
(
max_neighbor
):
Loading