Commit 61b288a7 authored by Anton Akhmerov's avatar Anton Akhmerov Committed by Christoph Groth
Browse files

add script to calculate moments of conductance in class D billiard

parent f2acce4f
#! /usr/bin/env python
from __future__ import division
import numpy as np, numpy.matlib as ml
from scipy import linalg as la
from guts import run, sm, matrix
def variance(n, samples):
"""Calculate first moments of conductance of a class D chaotic billiard.
n --- number of modes in the leads
samples --- number of samples to use for averaging.
condo, condso = [], []
for i in xrange(samples):
r = matrix.make_some_circular_s(n,
if la.det(r) > 0:
condo += [cond(r)]
condso += [cond(r)]
condo = np.array(condo)
condso = np.array(condso)
print np.mean(condo), np.var(condo), np.mean(condo**3), len(condo)
print np.mean(condso), np.var(condso), np.mean(condso**3) , len(condso)
def cond(r):
"""Calculate conductance from a reflection matrix in class D."""
n = r.shape[0] // 2
return np.trace(r * matrix.sigma_y(n) * r.H * matrix.sigma_y(n))
if __name__ == '__main__':
run.exec_argv('class_d_variance', globals())
Supports Markdown
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