Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
K
kwant
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
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
Joseph Weston
kwant
Commits
4b2263a7
There was a problem fetching the pipeline summary.
Commit
4b2263a7
authored
8 years ago
by
Joseph Weston
Browse files
Options
Downloads
Patches
Plain Diff
fix documentation for kwant.physics.symmetry
parent
24e1ebb8
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Pipeline
#
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
doc/source/reference/kwant.physics.rst
+7
-0
7 additions, 0 deletions
doc/source/reference/kwant.physics.rst
kwant/physics/symmetry.py
+11
-11
11 additions, 11 deletions
kwant/physics/symmetry.py
with
18 additions
and
11 deletions
doc/source/reference/kwant.physics.rst
+
7
−
0
View file @
4b2263a7
...
...
@@ -14,3 +14,10 @@ Leads
two_terminal_shotnoise
PropagatingModes
StabilizedModes
Symmetry
--------
.. autosummary::
:toctree: generated/
DiscreteSymmetry
This diff is collapsed.
Click to expand it.
kwant/physics/symmetry.py
+
11
−
11
View file @
4b2263a7
...
...
@@ -25,7 +25,7 @@ _names = ['Time reversal', 'Particle-hole', 'Chiral']
_signs
=
[
1
,
-
1
,
-
1
]
class
DiscreteSymmetry
:
"""
A collection of discrete symmetries and conservation laws.
"""
A collection of discrete symmetries and conservation laws.
Parameters
----------
...
...
@@ -48,13 +48,13 @@ class DiscreteSymmetry:
More formally, consider a discrete symmetry S. The symmetry projection
that maps from block i to block j of the Hamiltonian with projectors
P_i and P_j is S_ji = P_j^+ S P_i.
If S_ji is nonzero, a symmetry
relation exists between blocks i and j. Canonical form means that for
each j, the block S_ji is nonzero at most for one i, while all other
blocks vanish.
:math:`
P_i
`
and
:math:`
P_j
`
is
:math:`
S_
{
ji
}
= P_j^+ S P_i
`
.
If :math:`S_{ji}` is nonzero, a symmetry relation exists between
blocks i and j. Canonical form means that for each j, the block
:math:`S_{ji}` is nonzero at most for one i, while all other
blocks vanish.
If the operators are not in canonical form, they can be made so by
further splitting the Hamiltonian into smaller blocks, i.
e. by adding
further splitting the Hamiltonian into smaller blocks, i.e. by adding
more projectors.
"""
def
__init__
(
self
,
projectors
=
None
,
time_reversal
=
None
,
particle_hole
=
None
,
...
...
@@ -96,7 +96,7 @@ class DiscreteSymmetry:
if
symm
is
None
:
continue
if
not
almost_identity
(
symm
.
T
.
conj
().
dot
(
symm
)):
raise
ValueError
(
"
{} symmetry should be
"
raise
ValueError
(
"
{} symmetry should be
"
"
{}unitary.
"
.
format
(
name
,
"
anti
"
*
conj
))
symm_squared
=
symm
.
dot
(
cond_conj
(
symm
,
conj
))
if
not
(
almost_identity
(
symm_squared
)
or
...
...
@@ -134,13 +134,13 @@ class DiscreteSymmetry:
def
validate
(
self
,
matrix
):
"""
Check if a matrix satisfies the discrete symmetries.
Parameters
:
===========
Parameters
----------
matrix : sparse or dense matrix
If rectangular, it is padded by zeros to be square.
Returns
:
========
Returns
-------
broken_symmetry : string or ``None``
One of
"
Conservation law
"
,
"
Time reversal
"
,
"
Particle-hole
"
,
"
Chiral
"
: the symmetry broken by the matrix. If the matrix breaks
...
...
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