qit.markov.MarkovianBath¶
- class qit.markov.MarkovianBath(bath_type: str, stat: str, TU: float, T: float)¶
Markovian heat bath.
Supports bosonic and fermionic canonical ensembles at absolute temperature T, with an ohmic spectral density. The bath couples to the system via a single-term coupling
.- Parameters
bath_type (str) – bath type, determines the spectral density, in {‘ohmic’, ‘photon’}.
stat (str) – bath statistics, in (‘boson’, ‘fermion’)
TU (float) – bath time unit (in s)
T (float) – bath temperature (in K)
The bath spectral density is either ohmic or photonic, with a cutoff:
Three types of cutoffs are supported:
The effects of the bath on the system are contained in the complex spectral correlation tensor
. Computing values of this tensor is the main purpose of this class. It depends on three parameters: the inverse temperature of the bath , the spectral cutoff frequency of the bath , and the system frequency . It has the following scaling property:Hence we may eliminate the dimensions by choosing a = TU:
where the hat denotes a dimensionless quantity. Since we only have one coupling term,
is a scalar. We split it into its hermitian and antihermitian parts:where
and are real, andwhere
is the Planc/Fermi function and . Since is pretty expensive to compute, we store the computed results into a lookup table which is used to interpolate nearby values.Private attributes (set automatically):
Data member
Description
cut_func
Spectral density cutoff function.
pf
Planck or Fermi function depending on statistics.
corr_int
Integral transform for the dimensionless bath correlation function.
g_func
Spectral correlation tensor, real part.
.s_func
Spectral correlation tensor, imaginary part.
g0
.s0
.omega
Lookup table.
gs_table
Lookup table.
= gs_table[k, 0].Attributes
Bath type.
Bath statistics.
Time unit (in s).
Absolute temperature of the bath (in K).
Dimensionless temperature scaling parameter
.Spectral density cutoff type, in
{'sharp', 'smooth', 'exp'}
.Spectral density cutoff angular frequency
(in ).Methods
build_LUT
([om])Build a lookup table for the spectral correlation tensor Gamma.
compute_gs
(x)Computes the spectral correlation tensor.
corr
(x)Bath spectral correlation tensor, computed or interpolated.
desc
([long])Bath description string for plots.
fit
(delta, T1, T2)Qubit-bath coupling that reproduces given decoherence times.
Plot the bath correlation function
.Plot the spectral correlation tensor components
and as a function of omega.plot_spectral_correlation_vs_cutoff
([boltz])Plot spectral correlation tensor components as a function of cutoff frequency.
set_cutoff
(cutoff_type, cut_omega)Set the spectral density cutoff.
setup
()Initializes the g and s functions, and the LUT.
- type¶
Bath type. ‘ohmic’ or ‘photon’.
- stat¶
Bath statistics. Either ‘boson’ or ‘fermion’.
- TU¶
Time unit (in s). All Hamiltonians have been made dimensionless by multiplying with
.
- T¶
Absolute temperature of the bath (in K).
- scale¶
Dimensionless temperature scaling parameter
.
- cut_type¶
Spectral density cutoff type, in
{'sharp', 'smooth', 'exp'}
.
- cut_omega¶
Spectral density cutoff angular frequency
(in ).
- desc(long: bool = True) str ¶
Bath description string for plots.
- Parameters
long (bool) –
- Return type
str
- set_cutoff(cutoff_type: Optional[str], cut_omega: Optional[float]) None ¶
Set the spectral density cutoff.
Passing
None
leaves the corresponding property unchanged.- Parameters
cutoff_type (Optional[str]) – cutoff type, in
{'sharp', 'smooth', 'exp'}
cut_omega (Optional[float]) – omega cutoff value
- Return type
None
- setup() None ¶
Initializes the g and s functions, and the LUT.
Must be called after parameters change.
- Return type
None
- _pad_LUT() None ¶
Add limits at infinity to the lookup tables.
- Return type
None
- build_LUT(om: Optional[np.ndarray[float]] = None) None ¶
Build a lookup table for the spectral correlation tensor Gamma.
- Parameters
om (Optional[np.ndarray[float]]) – vector of omegas denoting the points to compute
- Return type
None
- _plot(x, om, q, gs, odd_s, even_s, f=<function plot>)¶
Plotting utility.
- Parameters
x (array[float]) – x coordinates of the points
om (array[float]) –
q (array[float]) –
gs (array[float]) – gamma and S, the real and imaginary components of the spectral correlation tensor
odd_s (array[float]) – odd part of S
even_s (array[float]) – even part of S
f (callable) – plotting function
- Returns
the plot
- Return type
Axes
- plot_spectral_correlation() None ¶
Plot the spectral correlation tensor components
and as a function of omega.Additionally plots the even and odd parts of
, and compares them to analytical expressions. Uses the spectral correlation tensor LUT.- Return type
None
- plot_spectral_correlation_vs_cutoff(boltz: float = 0.5) None ¶
Plot spectral correlation tensor components as a function of cutoff frequency.
The angular frequency
at which the spectral correlation tensor is evaluated is fixed by giving the Boltzmann factor .- Parameters
boltz (float) – Boltzmann factor
- Return type
None
- plot_bath_correlation() None ¶
Plot the bath correlation function
.It scales as
Choosing a = TU, we obtain
- Return type
None
- compute_gs(x: float) Tuple[float, float] ¶
Computes the spectral correlation tensor. See
corr
for usage.- Parameters
x (float) – angular frequency [1/TU]
- Returns
Real and imaginary parts of the spectral correlation tensor at
x
[1/TU]- Return type
Tuple[float, float]
- corr(x: float) Tuple[float, float] ¶
Bath spectral correlation tensor, computed or interpolated.
- Parameters
x (float) – angular frequency [1/TU]
- Returns
Real and imaginary parts of the spectral correlation tensor at
x
[1/TU]- Return type
Tuple[float, float]
- fit(delta: float, T1: float, T2: float)¶
Qubit-bath coupling that reproduces given decoherence times.
- Parameters
delta (float) – qubit energy splitting (in units of
)T1 (float) – qubit decoherence times T1 and T2 (in units of
)T2 (float) – qubit decoherence times T1 and T2 (in units of
)
- Returns
qubit Hamiltonian, qubit-bath coupling operator
- Return type
array[complex], array[complex]
Returns the qubit Hamiltonian H and the qubit-bath coupling operator D that reproduce the decoherence times T1 and T2 for a single-qubit system coupled to the bath.
The bath object is not modified.