qtt.simulation package

Modules related to simulation

Submodules

qtt.simulation.classicaldotsystem module

Classical Quantum Dot Simulator

@author: lgnjanssen / eendebakpt / hensgens

class qtt.simulation.classicaldotsystem.ClassicalDotSystem(name='classicaldotsystem', ndots=3, ngates=3, maxelectrons=3, **kwargs)[source]

Bases: BaseDotSystem

Classical Quantum Dot Simulator

This class aims to be a generic classical simulator for calculating energy levels and occupancy of quantum dots. Note: interaction between the dots is treated completely classically (no tunnel coupling) resulting in faster simulations.

Parameters:
  • name (str) – name of the system

  • ndots (int) – number of dots

  • ngates (int) – number of voltage gates

  • maxelectrons (int) – maximum occupancy per dot

The user should set variables on the object :
  • capacitances and cross-capacitances between dots and gates: alphas

  • chemical potential (at zero gate voltage): mu0

  • addition energy: Eadd

  • coulomb repulsion: W

calculate_energies(gatevalues)[source]

Calculate the energies of all dot states, given a set of gate values. Returns array of energies.

calculate_ground_state(gatevalues)[source]

Calculate the ground state of the dot system, given a set of gate values. Returns a state array.

findcurrentoccupancy(exact=True)[source]

Find electron occupancy

Parameters:

exact (bool) – If True then average over all ground states

simulate_honeycomb(paramvalues2D, verbose=1, usediag=False, multiprocess=True)[source]

Simulating a honeycomb by looping over a 2D array of parameter values (paramvalues2D), resulting honeycomb is stored in self.honeycomb

Parameters:
  • paramvalues2D (array) – shape nparams x nx x ny

  • verbose (int) –

  • usediag (bool) –

  • multiprocess (bool) –

solve()[source]
class qtt.simulation.classicaldotsystem.DoubleDot(name='doubledot', maxelectrons=2, **kwargs)[source]

Bases: ClassicalDotSystem

Classical simulation of double dot

class qtt.simulation.classicaldotsystem.MultiDot(name='multidot', ndots=6, maxelectrons=3, **kwargs)[source]

Bases: ClassicalDotSystem

class qtt.simulation.classicaldotsystem.SquareDot(name='squaredot', maxelectrons=2, **kwargs)[source]

Bases: ClassicalDotSystem

class qtt.simulation.classicaldotsystem.TripleDot(name='tripledot', maxelectrons=2, **kwargs)[source]

Bases: ClassicalDotSystem

qtt.simulation.classicaldotsystem.ncr(n, r)[source]

Calculating number of possible combinations: n choose r

qtt.simulation.dotsystem module

Simulation of a coupled dot system.

class qtt.simulation.dotsystem.BaseDotSystem(name='basedotsystem', ndots=3, maxelectrons=2)[source]

Bases: object

Base class for the dot simulation classes.

Based on the arguments the system calculates the energies of the different dot states. Using the energies the ground state, occupancies etc. can be calculated. The spin-state of electrons in the dots is ignored.

The main functionality:

  • Build a Hamiltonian from the number of dots

  • Solve for the eigenvalues and eigenstates of the Hamiltonian

  • Present the results.

The model used is [reference xxx].

number_of_basis_states

number of basis states.

Type:

int

H

Hamiltonian of the system.

Type:

array

energies

calculated energy for each state (ordered).

Type:

array

states

eigenstates expressed in the basis states.

Type:

array

stateprobs

TODO.

Type:

array

stateoccs

TODO.

Type:

array

nstates

for each state the number of electrons.

Type:

array

abstract calculate_ground_state(gatevalues)[source]

Calculate ground state for a set of gate values.

findtransitions(occs)[source]

Find transitions in occupancy image.

makebasis(ndots, maxelectrons=2)[source]

Define a basis of occupancy states with a specified number of dots and max occupancy.

The basis consists of vectors of length (ndots) where each entry in the vector indicates the number of electrons in a dot. The number of electrons in the total system is specified in nbasis.

Parameters:
  • ndots (int) – number of dots to simulate.

  • maxelectrons (int) – maximum occupancy per dot.

orderstatesbyE()[source]

Order the calculated states by energy.

orderstatesbyN()[source]

Order the calculated states by occupation.

showstates(n)[source]

List states of the system with energies.

class qtt.simulation.dotsystem.DotSystem(name='dotsystem', ndots=3, maxelectrons=2, **kwargs)[source]

Bases: BaseDotSystem

Class to simulate a system of interacting quantum dots.

For a full model see “Quantum simulation of a Fermi-Hubbard model using a semiconductor quantum dot array”:

https://arxiv.org/pdf/1702.07511.pdf

Parameters:
  • name (str) – name of the system.

  • ndots (int) – number of dots to simulate.

  • maxelectrons (int) – maximum occupancy per dot.

Attributes:

For the chemical potential, on site charging energy and inter site charging energy there are variables in the object. The names are given by the functions chemical_potential_name, etc.

calculate_energies(gatevalues)[source]

Calculate energies of the different states in the system.

Parameters:

gatevalues (list) – values for the chemical potentials in the dots.

calculate_ground_state(gatevalues)[source]

Calculate the ground state of the dot system, given a set of gate values.

Parameters:

gatevalues (list) – values for the chemical potentials in the dots.

Returns:

a state array.

Return type:

array

static chemical_potential_matrix(dot)[source]
static chemical_potential_name(dot) str[source]
findcurrentoccupancy(exact=True)[source]
get_chemical_potential(dot)[source]
get_on_site_charging(dot)[source]
getall(param)[source]

Return all stored values for a particular parameter.

Parameters:

param (str) – start of one of the variable names.

Returns:

values corresponding to the parameter that was queried.

Return type:

vals (list)

initSparse()[source]

Create sparse structures. Constructing a matrix using sparse elements can be faster than construction of a full matrix, especially for larger systems.

static inter_site_charging_matrix(dot1, dot2=None)[source]
static inter_site_charging_name(dot1, dot2=None)[source]

Return name for nearest - neighbour charging energy.

makeH()[source]

Create a new Hamiltonian.

makeHsparse(verbose=0)[source]

Create a new sparse Hamiltonian.

make_variables()[source]

Create value and matrix for a single variable.

makeparamvalues1D(paramnames, startend, npoints)[source]

Get a list of parameter names and [start end] values to generate dictionary self.vals1D[name] = vector of values.

makeparamvalues2D(paramnames, cornervals, npointsx, npointsy)[source]

Get a list of parameter names and [c1 c2 c3 c4] ‘corner’ values to generate dictionary self.vals2D[name] = matrix of values.

static on_site_charging_matrix(dot)[source]
static on_site_charging_name(dot)[source]
resetMu(value=0)[source]

Reset chemical potential. :param value: TODO. :type value: int

set_chemical_potential(dot, value)[source]
set_on_site_charging(dot, value)[source]
setall(param, vals)[source]

Sets all values for a particular parameter.

Parameters:
  • param (str) – start of one of the variable names.

  • vals (list) – values corresponding to the parameter to be set.

showMmatrix(name=None, fig=10)[source]
showvars()[source]
simulate_honeycomb(paramvalues2D, verbose=1, usediag=False, multiprocess=True)[source]
simulatehoneycomb(verbose=1, usediag=False, multiprocess=False)[source]

Loop over the 2D matrix of parameter values defined by makeparamvalues2D, calculate the ground state for each point, search for transitions and save in self.honeycomb.

simulatehoneycomb_original(verbose=1, usediag=False)[source]
Loop over the 2D matrix of parameter values defined by makeparamvalues2D, calculate the ground state

for each point, search for transitions and save in self.honeycomb.

Parameters:
  • verbose (int) – verbosity (0 == silent).

  • usediag (bool) – TODO.

solveH(usediag=False)[source]

Solve the system by calculating the eigenvalues and eigenstates of the Hamiltonian.

Parameters:

usediag (bool) – TODO.

static tunneling_matrix(dot_left)[source]
static tunneling_name(dot_left)[source]
visualize(fig=1)[source]

Create a graphical representation of the system (needs graphviz).

Parameters:

fig (int) – figure number, None is silent.

class qtt.simulation.dotsystem.DoubleDot(name='doubledot', maxelectrons=3)[source]

Bases: DotSystem

class qtt.simulation.dotsystem.FourDot(name='fourdot', use_tunneling=True, maxelectrons=2, **kwargs)[source]

Bases: DotSystem

class qtt.simulation.dotsystem.GateTransform(Vmatrix, sourcenames, targetnames)[source]

Bases: object

transformGateScan(vals2D, nn=None)[source]

Get a list of parameter names and [c1 c2 c3 c4] ‘corner’ values to generate dictionary self.vals2D[name] = matrix of values.

Parameters:
  • vals2D (dict) – keys are the gate names, values are matrices with the gate values.

  • nn – TODO.

Returns:

tranformed gate values.

Return type:

dict

class qtt.simulation.dotsystem.OneDot(name='onedot', maxelectrons=3)[source]

Bases: DotSystem

class qtt.simulation.dotsystem.TripleDot(name='tripledot', maxelectrons=3)[source]

Bases: DotSystem

class qtt.simulation.dotsystem.TwoXTwo(name='2x2', maxelectrons=2)[source]

Bases: DotSystem

qtt.simulation.dotsystem.isdiagonal(HH)[source]

Return True if matrix is diagonal.

qtt.simulation.dotsystem.showGraph(dot, fig=10)[source]

Show graphviz object in matplotlib window.

qtt.simulation.dotsystem.static_var(varname, value)[source]

Helper function to create a static variable.

qtt.simulation.dotsystem.tprint(string, dt=1, output=False)[source]

Print progress of a loop every dt seconds.

qtt.simulation.virtual_dot_array module

Virtual version of a linear dot array

The system consists of:

  • a linear array of dots

  • a magic top gate that always works

  • 2 barriers gates and 1 plunger gate for each dot

  • a sensing dot that always works

There are virtual instruments for

  • DACs: several virtual IVVIs

  • Virtual Keithleys (1 and 2 for the SDs, 4 for the ohmic)

  • A virtual gates object

class qtt.simulation.virtual_dot_array.DotModel(*args: Any, **kwargs: Any)[source]

Bases: Instrument

Simulation model for linear dot array

The model is intended for testing the code and learning. It does _not_ simulate any meaningful physics.

compute(random: float = 0.02) float[source]

Compute output of the model

computeSD(usediag=True, verbose=0)[source]
gate2ivvi(g: str) Tuple[str, str][source]
gate2ivvi_value(g: str) float[source]
get_gate(g: str) float[source]
get_idn()[source]

Overrule because the default get_idn yields a warning

keithley1_get(param: str) float[source]
keithley2_get(param: str) float[source]
keithley3_get(param: str) float[source]
keithley4_get(param: str) float[source]
qtt.simulation.virtual_dot_array.bottomBarrierGates()[source]
qtt.simulation.virtual_dot_array.bottomGates()[source]
qtt.simulation.virtual_dot_array.boundaries()[source]
qtt.simulation.virtual_dot_array.close(verbose=1)[source]

Close all instruments

qtt.simulation.virtual_dot_array.gate_boundaries(gate_map: Mapping[str, Any]) Mapping[str, Tuple[float, float]][source]

Return gate boundaries

Parameters:

gate_map – Map from gate names to instrument handle

Returns:

Dictionary with gate boundaries

qtt.simulation.virtual_dot_array.gate_settle(gate)[source]

Return gate settle times

qtt.simulation.virtual_dot_array.generate_configuration(ndots: int)[source]

Generate configuration for a standard linear dot array sample

Parameters:

ndots (int) – number of dots

Returns:

number_dac_modules (int) gate_map (dict) gates (list) bottomgates (list)

qtt.simulation.virtual_dot_array.getStation()[source]
qtt.simulation.virtual_dot_array.get_one_dots(full=1, sdidx=None)[source]

return all possible simple one-dots

Each dot objects holds the gates, the name of the channel and the instrument measuring over the channel.

qtt.simulation.virtual_dot_array.get_two_dots()[source]

return all possible simple two-dots

qtt.simulation.virtual_dot_array.initialize(reinit=False, nr_dots=2, maxelectrons=2, verbose=2, start_manager=False)[source]