qiskit-aer icon indicating copy to clipboard operation
qiskit-aer copied to clipboard

Kraus decompostion of phase amplitude damping error is not appropriate

Open smiserman opened this issue 2 years ago • 4 comments

What is the expected behavior?

The phase_amplitude_damping_error(param_amp, param_phase, excited_state_population=0, canonical_kraus=True) in Qiskit allows only the parameter range $p_a + p_p \le 1$, although all parameters $p_a, p_p \in [0,1]$ must be valid and this restriction is not necessary. Furthermore one should relate the phase parameter $p_p$ to the pure phase relaxation time $T_\phi$ by $p_p = 1- e^{t/T_\phi}$ with $T_\phi = T_1 T_2/(2T_1-T_2)$ where $T_1, T_2$ are the relaxation time constants of a specific qubit and the constants of the thermal_relaxation_error(t1, t2, time, excited_state_population=0). All this can be achieved by choosing the appropriate Kraus matrices.

For a minimal and appropriate set please see my blog in stackexchange

And furthermore there is a bug in the function _excited_population(freq, temperature). The Boltzmann equilibrium distribution for the excited state is given by $$p_1 =\frac{1}{1+e^{\Delta E/k_B T}} \simeq e^{-h f/k_B T}$$ where $h,, k_B$ are the Planck and Boltzmann constants and $f=\Delta E/h,, T$ are the frequency (energy gap) and temperature of the qubit. The source code shows an incorrect factor of 2, resulting in a population probability of $O(10^{-14})$ instead of $O(10^{-7})$ with $f \approx 5 \mathrm{Ghz}$ and $T \approx 15 \mathrm{mK}$. The error is certainly negligible in the simulations, but should still be corrected!

smiserman avatar Oct 30 '22 23:10 smiserman

These are equivalent, it's just a difference in convention. The convention for Aer's combined phase and amplitude damping was taken from Joseph Emerson's lecture notes on Open Quantum Systems and is equivalent to thermal_relaxation_error if you set param_amp = 1 - exp(-t/T1) and param_phase = exp(-t/T1) - exp(-2t/T2), or in terms of T_phi, phase_param = exp(-t/T1) * (1-exp(-t/T_phi). If you want to use a different convention you can always write your own functions for your research.

For the _excited_population function I believe you are correct, 5GHz @ 50 mK should be around ~1%, which would be the case if the 2 was removed, good catch!

chriseclectic avatar Nov 01 '22 19:11 chriseclectic

Yes, sure, you can transform this into each other but not for all parameter values (if $p_{amp} + p_{phase} > 1$ you will not find a solution for $t/T_1$ and $t/T_2$, but of course there is one! That is, for every $p_{amp}, p_{phase} \in [0,1]$, there is also a $t/T_1, t/T_2 \in [0,\infty]$). In addition one expects of course that phase_damping_error(p_phase).compose(amplitude_damping_error(p_amp,pop) (or vice versa) = phase_amplitude_damping_error(p_amp,p_phase,pop), which is definitely not the case here with the chosen parameterization!

The next point is that phase_amplitude_damping_error(0.5,0.5) projects the Bloch vector directly onto the Z axis. But this is also not what you would expect from a phase damping that goes with $\sqrt{1-p_{phase}}$!

Of course you can choose the Kraus matrices this way, but then I would not call the channel phase amplitude damping channel. At least I think this is didactically unwise and I would also tell Joseph Emerson so! Therefore I still recommend to choose appropriate Kraus matrices and not to confuse the users here.

smiserman avatar Nov 01 '22 23:11 smiserman

As Chris suggested above, Aer's definition of param_phase (exp(-t/T1) * (1-exp(-t/T_phi)) and your definition of param_phase ((1-exp(-t/T_phi)) is different. I think param_amp + param_phase <= 1 in Aer’s definition is equivalent with param_amp, param_phase in [0, 1] in your definition. Both are saying T1 in [0, ∞], T2 in [0, ∞] and T2 <= 2*T1 (equivalently, T1 in [0, ∞] and Tφ in [0, ∞] as 0 <= T1, Tφ implies T2 <= 2*T1). Both are spanning the same region in the space of quantum channel. Note that param_amp + param_phase > 1 in Aer’s definition is equivalent with considering negative T2 (no physical channel).

itoko avatar Nov 02 '22 03:11 itoko

Yes, that's absolutely right and I'm already aware of the relations (see my answer to a related question in Stackexchange 3 months ago). The only thing I want to say is that it is a rather strange parameterization of the channel with unnecessary restriction and dependence of the parameters in Aer, while the natural parameterization is obvious and given by me.

In addition, of course, one needs only 4 instead of 6 Kraus matrices for the phase amplitude channel as well as for the thermal relaxation channel, which I have also specified. And of course, that's just a recommendation, albeit a strong one.

smiserman avatar Nov 02 '22 10:11 smiserman