Commit 0c4d6eea authored by Christoph Groth's avatar Christoph Groth
Browse files

include forgotten noise module in API

parent cf363628
...@@ -11,5 +11,6 @@ Leads ...@@ -11,5 +11,6 @@ Leads
Bands Bands
modes modes
selfenergy selfenergy
two_terminal_shotnoise
PropagatingModes PropagatingModes
StabilizedModes StabilizedModes
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
# Merge the public interface of all submodules. # Merge the public interface of all submodules.
__all__ = [] __all__ = []
for module in ['leads', 'dispersion']: for module in ['leads', 'dispersion', 'noise']:
exec 'from . import {0}'.format(module) exec 'from . import {0}'.format(module)
exec 'from .{0} import *'.format(module) exec 'from .{0} import *'.format(module)
exec '__all__.extend({0}.__all__)'.format(module) exec '__all__.extend({0}.__all__)'.format(module)
...@@ -7,6 +7,10 @@ ...@@ -7,6 +7,10 @@
# http://kwant-project.org/authors. # http://kwant-project.org/authors.
import numpy as np import numpy as np
from ..solvers.common import SMatrix
__all__ = ['two_terminal_shotnoise']
def two_terminal_shotnoise(smatrix): def two_terminal_shotnoise(smatrix):
"""Compute the shot-noise in a two-terminal setup. """Compute the shot-noise in a two-terminal setup.
...@@ -25,7 +29,7 @@ def two_terminal_shotnoise(smatrix): ...@@ -25,7 +29,7 @@ def two_terminal_shotnoise(smatrix):
Shot noise measured in noise quanta `2 e^3 |V| / pi hbar`. Shot noise measured in noise quanta `2 e^3 |V| / pi hbar`.
""" """
if hasattr(smatrix.lead_info[0], 'shape'): if not isinstance(smatrix, SMatrix):
raise NotImplementedError("Noise expressions in terms of Green's " raise NotImplementedError("Noise expressions in terms of Green's "
"functions are not implemented.") "functions are not implemented.")
...@@ -41,5 +45,5 @@ def two_terminal_shotnoise(smatrix): ...@@ -41,5 +45,5 @@ def two_terminal_shotnoise(smatrix):
# voltages at various leads as input. (See # voltages at various leads as input. (See
# http://arxiv.org/abs/cond-mat/9910158) It could still be based on # http://arxiv.org/abs/cond-mat/9910158) It could still be based on
# smatrix._a_ttdagger_a_inv, i.e. be also valid also for self-energy leads, # smatrix._a_ttdagger_a_inv, i.e. be also valid also for self-energy leads,
# provided that only true transmission blocks are used As long as nobody needs # provided that only true transmission blocks are used. As long as nobody needs
# it though, it does make little sense to make such a routine. # it though, it does make little sense to make such a routine.
...@@ -10,7 +10,7 @@ import numpy as np ...@@ -10,7 +10,7 @@ import numpy as np
from nose.tools import assert_raises from nose.tools import assert_raises
from numpy.testing import assert_almost_equal from numpy.testing import assert_almost_equal
import kwant import kwant
from kwant.physics.noise import two_terminal_shotnoise from kwant.physics import two_terminal_shotnoise
n = 5 n = 5
chain = kwant.lattice.chain() chain = kwant.lattice.chain()
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment