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
......@@ -10,7 +10,7 @@
# Merge the public interface of all submodules.
__all__ = []
for module in ['leads', 'dispersion']:
for module in ['leads', 'dispersion', 'noise']:
exec 'from . import {0}'.format(module)
exec 'from .{0} import *'.format(module)
exec '__all__.extend({0}.__all__)'.format(module)
......@@ -7,6 +7,10 @@
import numpy as np
from ..solvers.common import SMatrix
__all__ = ['two_terminal_shotnoise']
def two_terminal_shotnoise(smatrix):
"""Compute the shot-noise in a two-terminal setup.
......@@ -25,7 +29,7 @@ def two_terminal_shotnoise(smatrix):
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 "
"functions are not implemented.")
......@@ -41,5 +45,5 @@ def two_terminal_shotnoise(smatrix):
# voltages at various leads as input. (See
# It could still be based on
# 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.
......@@ -10,7 +10,7 @@ import numpy as np
from import assert_raises
from numpy.testing import assert_almost_equal
import kwant
from kwant.physics.noise import two_terminal_shotnoise
from kwant.physics import two_terminal_shotnoise
n = 5
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