NoisyCos2PhiQubit¶
- class scqubits.core.cos2phi_qubit.NoisyCos2PhiQubit[source]¶
Methods
NoisyCos2PhiQubit.__init__
()Return a list of noise channels that are used when calculating the effective noise (i.e. via t1_effective and t2_effective.
NoisyCos2PhiQubit.n_1_operator
([energy_esys])NoisyCos2PhiQubit.n_2_operator
([energy_esys])NoisyCos2PhiQubit.n_zeta_operator
([energy_esys])NoisyCos2PhiQubit.phi_1_operator
([energy_esys])NoisyCos2PhiQubit.phi_2_operator
([energy_esys])Show plots of coherence for various channels supported by the qubit as they vary as a function of a changing parameter.
Plot effective \(T_1\) coherence time (rate) as a function of changing parameter.
Plot effective \(T_2\) coherence time (rate) as a function of changing parameter.
NoisyCos2PhiQubit.set_and_return
(attr_name, ...)NoisyCos2PhiQubit.supported_noise_channels
()NoisyCos2PhiQubit.t1
(i, j, noise_op, ...[, ...])Calculate the transition time (or rate) using Fermi's Golden Rule due to a noise channel with a spectral density spectral_density and system noise operator noise_op.
NoisyCos2PhiQubit.t1_capacitive
([i, j, ...])\(T_1\) due to dielectric dissipation in the Josephson junction capacitances.
NoisyCos2PhiQubit.t1_charge_impedance
([i, ...])Noise due to charge coupling to an impedance (such as a transmission line).
Calculate the effective \(T_1\) time (or rate).
NoisyCos2PhiQubit.t1_flux_bias_line
([i, j, ...])Noise due to a bias flux line.
NoisyCos2PhiQubit.t1_inductive
([i, j, ...])\(T_1\) due to inductive dissipation in superinductors.
NoisyCos2PhiQubit.t1_purcell
([i, j, Q_cap, ...])\(T_1\) due to dielectric dissipation in the shunt capacitor.
Noise due to quasiparticle tunneling across a Josephson junction.
Calculate the effective \(T_2\) time (or rate).
NoisyCos2PhiQubit.tphi_1_over_f
(A_noise, i, ...)Calculate the 1/f dephasing time (or rate) due to arbitrary noise source.
Calculate the 1/f dephasing time (or rate) due to critical current noise.
Calculate the 1/f dephasing time (or rate) due to flux noise.
Calculate the 1/f dephasing time (or rate) due to charge noise.
Returns the first order and second order derivative of the nth eigenenergy
- classmethod effective_noise_channels()¶
Return a list of noise channels that are used when calculating the effective noise (i.e. via t1_effective and t2_effective.
- Return type:
List
[str
]
- plot_coherence_vs_paramvals(param_name, param_vals, noise_channels=None, common_noise_options=None, spectrum_data=None, scale=1, num_cpus=None, **kwargs)¶
Show plots of coherence for various channels supported by the qubit as they vary as a function of a changing parameter.
For example, assuming qubit is a qubit object with flux being one of its parameters, one can see how coherence due to various noise channels vary as the flux changes:
qubit.plot_coherence_vs_paramvals(param_name='flux', param_vals=np.linspace(-0.5, 0.5, 100), scale=1e-3, ylabel=r"$\mu s$");
- Parameters:
param_name (
str
) – name of parameter to be variedparam_vals (
ndarray
) – parameter values to be plugged innoise_channels (
Union
[str
,List
[str
],List
[Tuple
[str
,Dict
]]]) – channels to be plotted, if None then noise channels given by supported_noise_channels are usedcommon_noise_options (
Dict
) – common options used when calculating coherence timesspectrum_data (
SpectrumData
) – spectral data used during noise calculationsscale (float) – a number that all data is multiplied by before being plotted
num_cpus (
Optional
[int
]) – number of cores to be used for computation
- Return type:
Figure, Axes
- plot_t1_effective_vs_paramvals(param_name, param_vals, noise_channels=None, common_noise_options=None, spectrum_data=None, get_rate=False, scale=1, num_cpus=None, **kwargs)¶
Plot effective \(T_1\) coherence time (rate) as a function of changing parameter.
The effective \(T_1\) is calculated by considering a variety of depolarizing noise channels, according to the formula:
\[\frac{1}{T_{1}^{\rm eff}} = \frac{1}{2} \sum_k \frac{1}{T_{1}^{k}}\]where \(k\) runs over the channels that can contribute to the effective noise. By default all the depolarizing noise channels given by the method effective_noise_channels are included.
For example, assuming qubit is a qubit object with flux being one of its parameters, one can see how the effective \(T_1\) varies as the flux changes:
qubit.plot_t1_effective_vs_paramvals(param_name='flux', param_vals=np.linspace(-0.5, 0.5, 100), );
- Parameters:
param_name (
str
) – name of parameter to be variedparam_vals (
ndarray
) – parameter values to be plugged innoise_channels (
Union
[str
,List
[str
],List
[Tuple
[str
,Dict
]]]) – channels to be plotted, if None then noise channels given by supported_noise_channels are usedcommon_noise_options (
Dict
) – common options used when calculating coherence timesspectrum_data (
SpectrumData
) – spectral data used during noise calculationsget_rate (
bool
) – determines if rate or time should be plottedscale (
float
) – a number that all data is multiplied by before being plottednum_cpus (
Optional
[int
]) – number of cores to be used for computation
- Return type:
Figure, Axes
- plot_t2_effective_vs_paramvals(param_name, param_vals, noise_channels=None, common_noise_options=None, spectrum_data=None, get_rate=False, scale=1, num_cpus=None, **kwargs)¶
Plot effective \(T_2\) coherence time (rate) as a function of changing parameter.
The effective \(T_2\) is calculated from both pure dephasing channels, as well as depolarization channels, according to the formula:
\[\frac{1}{T_{2}^{\rm eff}} = \sum_k \frac{1}{T_{\phi}^{k}} + \frac{1}{2} \sum_j \frac{1}{T_{1}^{j}}\]where \(k\) (\(j\)) run over the relevant pure dephasing ( depolarization) channels that can contribute to the effective noise. By default all noise channels given by the method effective_noise_channels are included.
For example, assuming qubit is a qubit object with flux being one of its parameters, one can see how the effective \(T_2\) varies as the flux changes:
qubit.plot_t2_effective_vs_paramvals(param_name='flux', param_vals=np.linspace(-0.5, 0.5, 100), );
- Parameters:
param_name (
str
) – name of parameter to be variedparam_vals (
ndarray
) – parameter values to be plugged innoise_channels (
Union
[str
,List
[str
],List
[Tuple
[str
,Dict
]]]) – channels to be plotted, if None then noise channels given by supported_noise_channels are usedcommon_noise_options (
Dict
) – common options used when calculating coherence timesspectrum_data (
SpectrumData
) – spectral data used during noise calculationsget_rate (
bool
) – determines if rate or time should be plottedscale (
float
) – a number that all data is multiplied by before being plottednum_cpus (
Optional
[int
]) – number of cores to be used for computation
- Return type:
Figure, Axes
- t1(i, j, noise_op, spectral_density, T=0.015, total=True, esys=None, get_rate=False)¶
Calculate the transition time (or rate) using Fermi’s Golden Rule due to a noise channel with a spectral density spectral_density and system noise operator noise_op. Mathematically, it reads:
\[\frac{1}{T_1} = \frac{1}{\hbar^2} |\langle i| A_{\rm noise} | j \rangle|^2 S(\omega)\]We assume that the qubit energies (or the passed in eigenspectrum) has units of frequency (and not angular frequency).
The spectral_density argument should be a callable object (typically a function) of one argument, which is assumed to be an angular frequency (in the units currently set as system units.
- Parameters:
i (int >=0) – state index that along with j defines a transition (i->j)
j (int >=0) – state index that along with i defines a transition (i->j)
noise_op (
Union
[ndarray
,csc_matrix
]) – noise operatorT (
float
) – Temperature defined in Kelvinspectral_density (
Callable
) – defines a spectral density, must take two arguments: omega and T (assumed to be in units of 2 pi * <system units>)total (
bool
) – if False return a time/rate associated with a transition from state i to state j. if True return a time/rate associated with both i to j and j to i transitionsesys (
Tuple
[ndarray
,ndarray
]) – evals, evecs tupleget_rate (
bool
) – get rate or time
- Returns:
time or rate – decoherence time in units of \(2\pi ({\rm system\,\,units})\), or rate in inverse units.
- Return type:
float
- t1_capacitive(i=1, j=0, Q_cap=None, T=0.015, total=True, esys=None, get_rate=False)[source]¶
\(T_1\) due to dielectric dissipation in the Josephson junction capacitances.
References: Nguyen et al (2019), Smith et al (2020)
- Parameters:
i (int >=0) – state index that along with j defines a transition (i->j)
j (int >=0) – state index that along with i defines a transition (i->j)
Q_cap (
Union
[float
,Callable
]) – capacitive quality factor; a fixed value or function of omegaT (
float
) – temperature in Kelvintotal (
bool
) – if False return a time/rate associated with a transition from state i to state j. if True return a time/rate associated with both i to j and j to i transitionsesys (
Tuple
[ndarray
,ndarray
]) – evals, evecs tupleget_rate (
bool
) – get rate or time
- Returns:
time or rate –
- decoherence time in units of \(2\pi ({\rm system\,\,units})\), or rate
in inverse units.
- Return type:
float
- t1_charge_impedance(i=1, j=0, Z=50, T=0.015, total=True, esys=None, get_rate=False, noise_op=None)¶
Noise due to charge coupling to an impedance (such as a transmission line).
References: Schoelkopf et al (2003), Ithier et al (2005)
- Parameters:
i (int >=0) – state index that along with j defines a transition (i->j)
j (int >=0) – state index that along with i defines a transition (i->j)
Z (
Union
[float
,Callable
]) – impedance; a fixed value or function of omegaT (
float
) – temperature in Kelvintotal (
bool
) – if False return a time/rate associated with a transition from state i to state j. if True return a time/rate associated with both i to j and j to i transitionsesys (
Tuple
[ndarray
,ndarray
]) – evals, evecs tupleget_rate (
bool
) – get rate or timenoise_op (ndarray | csc_matrix | Qobj | None)
- Returns:
time or rate – decoherence time in units of \(2\pi ({\rm system\,\,units})\), or rate in inverse units.
- Return type:
float
- t1_effective(noise_channels=None, common_noise_options=None, esys=None, get_rate=False, **kwargs)¶
Calculate the effective \(T_1\) time (or rate).
The effective \(T_1\) is calculated by considering a variety of depolarizing noise channels, according to the formula:
\[\frac{1}{T_{1}^{\rm eff}} = \frac{1}{2} \sum_k \frac{1}{T_{1}^{k}}\]where \(k\) runs over the channels that can contribute to the effective noise. By default all the depolarizing noise channels given by the method effective_noise_channels are included. Users can also provide specific noise channels, with selected options, to be included in the effective \(T_1\) calculation. For example, assuming qubit is a qubit object, can can execute:
tune_tmon.t1_effective(noise_channels=['t1_charge_impedance', 't1_flux_bias_line'], common_noise_options=dict(T=0.050))
- Parameters:
noise_channels (
Union
[str
,List
[str
],List
[Tuple
[str
,Dict
]]]) – channels to be plotted, if None then noise channels given by supported_noise_channels are usedcommon_noise_options (
Dict
) – common options used when calculating coherence timesesys (
Tuple
[ndarray
,ndarray
]) – spectral data used during noise calculationsget_rate (
bool
) – get rate or time
- Return type:
float
- Returns:
- decoherence time in units of \(2\pi ({\rm system\,\,units})\), or rate
in inverse units.
- t1_flux_bias_line(i=1, j=0, M=400, Z=50, T=0.015, total=True, esys=None, get_rate=False, noise_op_method=None)¶
Noise due to a bias flux line.
References: Koch et al (2007), Groszkowski et al (2018)
- Parameters:
i (int >=0) – state index that along with j defines a transition (i->j)
j (int >=0) – state index that along with i defines a transition (i->j)
M (
float
) – Inductance in units of Phi_0 / AmpereZ (
Union
[complex
,float
,Callable
]) – A complex impedance; a fixed value or function of omegaT (
float
) – temperature in Kelvintotal (
bool
) – if False return a time/rate associated with a transition from state i to state j. if True return a time/rate associated with both i to j and j to i transitionsesys (
Tuple
[ndarray
,ndarray
]) – evals, evecs tupleget_rate (
bool
) – get rate or timenoise_op_method (Callable | None)
- Returns:
time or rate – decoherence time in units of \(2\pi ({\rm system\,\,units})\), or rate in inverse units.
- Return type:
float
- t1_inductive(i=1, j=0, Q_ind=None, T=0.015, total=True, esys=None, get_rate=False)[source]¶
\(T_1\) due to inductive dissipation in superinductors.
References: nguyen et al (2019), Smith et al (2020)
- Parameters:
i (int >=0) – state index that along with j defines a transition (i->j)
j (int >=0) – state index that along with i defines a transition (i->j)
Q_ind (
Union
[float
,Callable
]) – inductive quality factor; a fixed value or function of omegaT (
float
) – temperature in Kelvintotal (
bool
) – if False return a time/rate associated with a transition from state i to state j. if True return a time/rate associated with both i to j and j to i transitionsesys (
Tuple
[ndarray
,ndarray
]) – evals, evecs tupleget_rate (
bool
) – get rate or time
- Returns:
decoherence time in units of \(2\pi ({\rm system\,\,units})\), or rate in inverse units.
- Return type:
time or rate
- t1_purcell(i=1, j=0, Q_cap=None, T=0.015, total=True, esys=None, get_rate=False)[source]¶
\(T_1\) due to dielectric dissipation in the shunt capacitor.
References: Nguyen et al (2019), Smith et al (2020)
- Parameters:
i (int >=0) – state index that along with j defines a transition (i->j)
j (int >=0) – state index that along with i defines a transition (i->j)
Q_cap (
Union
[float
,Callable
]) – capacitive quality factor; a fixed value or function of omegaT (
float
) – temperature in Kelvintotal (
bool
) – if False return a time/rate associated with a transition from state i to state j. if True return a time/rate associated with both i to j and j to i transitionsesys (
Tuple
[ndarray
,ndarray
]) – evals, evecs tupleget_rate (
bool
) – get rate or time
- Returns:
decoherence time in units of \(2\pi ({\rm system\,\,units})\), or rate in inverse units.
- Return type:
time or rate
- t1_quasiparticle_tunneling(i=1, j=0, Y_qp=None, x_qp=3e-06, T=0.015, Delta=0.00034, total=True, esys=None, get_rate=False, noise_op=None)¶
Noise due to quasiparticle tunneling across a Josephson junction.
References: Smith et al (2020), Catelani et al (2011), Pop et al (2014).
- Parameters:
i (int >=0) – state index that along with j defines a transition (i->j)
j (int >=0) – state index that along with i defines a transition (i->j)
Y_qp (
Union
[float
,Callable
]) – complex admittance; a fixed value or function of omegax_qp (
float
) – quasiparticle density (in units of eV)T (
float
) – temperature in KelvinDelta (
float
) – superconducting gap (in units of eV)total (
bool
) – if False return a time/rate associated with a transition from state i to state j. if True return a time/rate associated with both i to j and j to i transitionsesys (
Tuple
[ndarray
,ndarray
]) – evals, evecs tupleget_rate (
bool
) – get rate or timenoise_op (ndarray | csc_matrix | Qobj | None)
- Returns:
time or rate – decoherence time in units of \(2\pi ({\rm system\,\,units})\), or rate in inverse units.
- Return type:
float
- t2_effective(noise_channels=None, common_noise_options=None, esys=None, get_rate=False)¶
Calculate the effective \(T_2\) time (or rate).
The effective \(T_2\) is calculated by considering a variety of pure dephasing and depolarizing noise channels, according to the formula:
\[\frac{1}{T_{2}^{\rm eff}} = \sum_k \frac{1}{T_{\phi}^{k}} + \frac{1}{2} \sum_j \frac{1}{T_{1}^{j}},\]where \(k\) (\(j\)) run over the relevant pure dephasing ( depolarization) channels that can contribute to the effective noise. By default all the noise channels given by the method effective_noise_channels are included. Users can also provide specific noise channels, with selected options, to be included in the effective \(T_2\) calculation. For example, assuming qubit is a qubit object, can can execute:
qubit.t2_effective(noise_channels=['t1_flux_bias_line', 't1_capacitive', ('tphi_1_over_f_flux', dict(A_noise=3e-6))], common_noise_options=dict(T=0.050))
- Parameters:
noise_channels (None or str or list(str) or list(tuple(str, dict))) – channels to be plotted, if None then noise channels given by supported_noise_channels are used
common_noise_options (dict) – common options used when calculating coherence times
esys (tuple(evals, evecs)) – spectral data used during noise calculations
get_rate (bool) – get rate or time
- Returns:
time or rate – decoherence time in units of \(2\pi ({\rm system\,\,units})\), or rate in inverse units.
- Return type:
float
- tphi_1_over_f(A_noise, i, j, noise_op, esys=None, get_rate=False, **kwargs)¶
Calculate the 1/f dephasing time (or rate) due to arbitrary noise source.
We assume that the qubit energies (or the passed in eigenspectrum) has units of frequency (and not angular frequency).
- Parameters:
A_noise (
float
) – noise strengthi (int >=0) – state index that along with j defines a qubit
j (int >=0) – state index that along with i defines a qubit
noise_op (
Union
[ndarray
,csc_matrix
]) – noise operator, typically Hamiltonian derivative w.r.t. noisy parameteresys (
Tuple
[ndarray
,ndarray
]) – evals, evecs tupleget_rate (
bool
) – get rate or time
- Returns:
time or rate – decoherence time in units of \(2\pi ({\rm system\,\,units})\), or rate in inverse units.
- Return type:
float
- tphi_1_over_f_cc(A_noise=1e-07, i=0, j=1, esys=None, get_rate=False, **kwargs)¶
Calculate the 1/f dephasing time (or rate) due to critical current noise.
- Parameters:
A_noise (
float
) – noise strengthi (int >=0) – state index that along with j defines a qubit
j (int >=0) – state index that along with i defines a qubit
esys (
Tuple
[ndarray
,ndarray
]) – evals, evecs tupleget_rate (
bool
) – get rate or time
- Returns:
time or rate – decoherence time in units of \(2\pi ({\rm system\,\,units})\), or rate in inverse units.
- Return type:
float
- tphi_1_over_f_flux(A_noise=1e-06, i=0, j=1, esys=None, get_rate=False, **kwargs)¶
Calculate the 1/f dephasing time (or rate) due to flux noise.
- Parameters:
A_noise (
float
) – noise strengthi (int >=0) – state index that along with j defines a qubit
j (int >=0) – state index that along with i defines a qubit
esys (
Tuple
[ndarray
,ndarray
]) – evals, evecs tupleget_rate (
bool
) – get rate or time
- Returns:
time or rate – decoherence time in units of \(2\pi ({\rm system\,\,units})\), or rate in inverse units.
- Return type:
float
- tphi_1_over_f_ng(A_noise=0.0001, i=0, j=1, esys=None, get_rate=False, **kwargs)¶
Calculate the 1/f dephasing time (or rate) due to charge noise.
- Parameters:
A_noise (
float
) – noise strengthi (int >=0) – state index that along with j defines a qubit
j (int >=0) – state index that along with i defines a qubit
esys (
Tuple
[ndarray
,ndarray
]) – evals, evecs tupleget_rate (
bool
) – get rate or time
- Returns:
time or rate – decoherence time in units of \(2\pi ({\rm system\,\,units})\), or rate in inverse units.
- Return type:
float
- transition_energy_derivative(ni, nf, esys, hamiltonian_derivative)¶
Returns the first order and second order derivative of the nth eigenenergy