bofin package

Submodules

bofin.heom module

This module provides exact solvers for a system-bath setup using the hierarchy equations of motion (HEOM).

class bofin.heom.BosonicHEOMSolver(H_sys, coup_op, ckAR, ckAI, vkAR, vkAI, N_cut, options=None)[source]

Bases: object

This is a class for solvers that use the HEOM method for calculating the dynamics evolution. There are many references for this. A good introduction, and perhaps closest to the notation used here is: DOI:10.1103/PhysRevLett.104.250401 A more canonical reference, with full derivation is: DOI: 10.1103/PhysRevA.41.6676 The method can compute open system dynamics without using any Markovian or rotating wave approximation (RWA) for systems where the bath correlations can be approximated to a sum of complex exponentials. The method builds a matrix of linked differential equations, which are then solved used the same ODE solvers as other qutip solvers (e.g. mesolve)/

H_sys

System Hamiltonian Or Liouvillian Or QobjEvo Or list of Hamiltonians with time dependence

Format for input (if list): [time_independent_part, [H1, time_dep_function1], [H2, time_dep_function2]]

Type:Qobj or list
coup_op : Qobj or list
Operator describing the coupling between system and bath. Could also be a list of operators, which needs to be the same length as ck’s and vk’s.
ckAR, ckAI, vkAR, vkAI : lists
Lists containing coefficients for fitting spectral density correlation
N_cut : int
Cutoff parameter for the bath
options : qutip.solver.Options
Generic solver options. If set to None the default options will be used
boson_grad_n(he_n)[source]

Get the gradient term for the hierarchy ADM at level n

boson_grad_next(he_n, k, next_he)[source]

Get the next gradient

boson_grad_prev(he_n, k, prev_he)[source]

Get the previous gradient

boson_rhs()[source]

Make the RHS for bosonic case

configure(H_sys, coup_op, ckAR, ckAI, vkAR, vkAI, N_cut, options=None)[source]

Configure the solver using the passed parameters The parameters are described in the class attributes, unless there is some specific behaviour

Parameters:options (qutip.solver.Options) – Generic solver options. If set to None the default options will be used
populate(heidx_list)[source]

Given a Hierarchy index list, populate the graph of next and previous elements

process_input(H_sys, coup_op, ckAR, ckAI, vkAR, vkAI, N_cut, options=None)[source]

Type-checks provided input Merges same gammas

reset()[source]

Reset any attributes to default values

run(rho0, tlist)[source]

Function to solve for an open quantum system using the HEOM model.

Parameters:
  • rho0 (Qobj) – Initial state (density matrix) of the system.
  • tlist (list) – Time over which system evolves.
Returns:

results – Object storing all results from the simulation.

Return type:

qutip.solver.Result

steady_state(max_iter_refine=100, use_mkl=False, weighted_matching=False)[source]

Computes steady state dynamics

max_iter_refine : Int
Parameter for the mkl LU solver. If pardiso errors are returned this should be increased.
use_mkl : Boolean
Optional override default use of mkl if mkl is installed.
weighted_matching : Boolean
Setting this true may increase run time, but reduce stability (pardisio may not converge).
class bofin.heom.FermionicHEOMSolver(H_sys, coup_op, ck, vk, N_cut, options=None)[source]

Bases: object

Same as BosonicHEOMSolver, but with Fermionic baths.

H_sys

System Hamiltonian Or Liouvillian Or QobjEvo Or list of Hamiltonians with time dependence

Format for input (if list): [time_independent_part, [H1, time_dep_function1], [H2, time_dep_function2]]

Type:Qobj or list
coup_op

Operator describing the coupling between system and bath. Could also be a list of operators, which needs to be the same length as ck’s and vk’s.

Type:Qobj or list
ck, vk

Lists containing spectral density correlation

Type:lists
N_cut

Cutoff parameter for the bath

Type:int
options

Generic solver options. If set to None the default options will be used

Type:qutip.solver.Options
configure(H_sys, coup_op, ck, vk, N_cut, options=None)[source]

Configure the solver using the passed parameters The parameters are described in the class attributes, unless there is some specific behaviour

Parameters:options (qutip.solver.Options) – Generic solver options. If set to None the default options will be used
fermion_grad_n(he_n)[source]

Get the gradient term for the hierarchy ADM at level n

fermion_grad_next(he_n, k, next_he, idx)[source]

Get next gradient

fermion_grad_prev(he_n, k, prev_he, idx)[source]

Get next gradient

fermion_rhs()[source]

Make the RHS for fermionic case

populate(heidx_list)[source]

Given a Hierarchy index list, populate the graph of next and previous elements

process_input(H_sys, coup_op, ck, vk, N_cut, options=None)[source]

Type-checks provided input Merges same gammas

reset()[source]

Reset any attributes to default values

run(rho0, tlist)[source]

Function to solve for an open quantum system using the HEOM model.

Parameters:
  • rho0 (Qobj) – Initial state (density matrix) of the system.
  • tlist (list) – Time over which system evolves.
Returns:

results – Object storing all results from the simulation.

Return type:

qutip.solver.Result

steady_state(max_iter_refine=100, use_mkl=False, weighted_matching=False)[source]

Computes steady state dynamics

max_iter_refine : Int
Parameter for the mkl LU solver. If pardiso errors are returned this should be increased.
use_mkl : Boolean
Optional override default use of mkl if mkl is installed.
weighted_matching : Boolean
Setting this true may increase run time, but reduce stability (pardisio may not converge).
bofin.heom.add_at_idx(seq, k, val)[source]

Add (subtract) a value in the tuple at position k

bofin.heom.nexthe(current_he, k, ncut)[source]

Calculate the next heirarchy index for the current index n.

bofin.heom.prevhe(current_he, k, ncut)[source]

Calculate the previous heirarchy index for the current index n.

Module contents