<jupyter_start><jupyter_text>continuum dispersion<jupyter_code>import kwant
import numpy as np
import scipy.linalg as la

import matplotlib.pyplot as plt
%matplotlib inline
def plot(bands, style, new_gamma_0=None):
    
    model = semicon.models.ZincBlende(
        bands=bands,
        components=('foreman',),
        default_databank='winkler'
    )
    
    if new_gamma_0 is not None:
        params = model.parameters(material='InAs').renormalize(new_gamma_0=1)
    else:
        params = model.parameters(material='InAs')
        
    disp = kwant.continuum.lambdify(str(model.hamiltonian), locals=params)
    h_k = lambda kx, ky, kz: disp(k_x=kx, k_y=ky, k_z=kz)
    
    k = np.linspace(-.5, .5, 101)
    e = np.array([la.eigvalsh(h_k(ki, 0, 0)) for ki in k])
    
    plt.plot(k, e, style)
    plt.plot([], [], style, label=bands)
    
    
plt.figure(figsize=(12, 10))

plot(bands=('gamma_6c',), style='C0')
plot(bands=('gamma_8v', 'gamma_7v'), style='C1')
plot(bands=('gamma_6c', 'gamma_8v', 'gamma_7v'), style='k--')

plt.legend(prop={'size': 18})<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.1613198900091659, 'fraction_numerical': 0.022914757103574702, 'mean_word_length': 3.727272727272727, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '1', 'dir': 'jupyter-structured-clean-dedup', 'id': '110569', 'license': 'BSD-2-Clause', 'n_tokens_mistral': 447, 'n_tokens_neox': 432, 'n_words': 78, 'path': 'notebooks/hamiltonian_and_bulk_bands.ipynb', 'repo_name': 'quantum-tinkerer/semicon', 'size': '1091'}