From 58b86e1b8fe334fb6600e5c01d6aa818486ecfb9 Mon Sep 17 00:00:00 2001 From: Toshinari Itoko <15028342+itoko@users.noreply.github.com> Date: Fri, 2 Dec 2022 12:24:23 +0900 Subject: [PATCH] Fix incorrect computation of excited state population (#1672) This commits fixed a bug in NoiseModel.from_backend where using the temperature kwarg with a non-default value would incorrectly compute the excited state population for the specified temperature. Previously, there was an additional factor of 2 in the Boltzman distribution calculation leading to an incorrect smaller value for the excited state population. * Fix a bug in computation of excited population * Improve reno * Reword reno --- qiskit_aer/noise/device/models.py | 14 ++++++++------ .../notes/fix-temperature-a9c51c4599af3a49.yaml | 8 ++++++++ 2 files changed, 16 insertions(+), 6 deletions(-) create mode 100644 releasenotes/notes/fix-temperature-a9c51c4599af3a49.yaml diff --git a/qiskit_aer/noise/device/models.py b/qiskit_aer/noise/device/models.py index ad0b8ba836..ec67dc7d84 100644 --- a/qiskit_aer/noise/device/models.py +++ b/qiskit_aer/noise/device/models.py @@ -378,17 +378,19 @@ def _truncate_t2_value(t1, t2): def _excited_population(freq, temperature): - """Return excited state population""" + """Return excited state population from freq [GHz] and temperature [mK].""" population = 0 if freq != inf and temperature != 0: - # Compute the excited state population from qubit - # frequency and temperature - # Boltzman constant kB = 8.617333262-5 (eV/K) + # Compute the excited state population from qubit frequency and temperature + # based on Maxwell-Boltzmann distribution + # considering only qubit states (|0> and |1>), i.e. truncating higher energy states. + # Boltzman constant kB = 8.617333262e-5 (eV/K) # Planck constant h = 4.135667696e-15 (eV.s) # qubit temperature temperatue = T (mK) # qubit frequency frequency = f (GHz) - # excited state population = 1/(1+exp((2*h*f*1e9)/(kb*T*1e-3))) - exp_param = exp((95.9849 * freq) / abs(temperature)) + # excited state population = 1/(1+exp((h*f*1e9)/(kb*T*1e-3))) + # See e.g. Phys. Rev. Lett. 114, 240501 (2015). + exp_param = exp((47.99243 * freq) / abs(temperature)) population = 1 / (1 + exp_param) if temperature < 0: # negative temperate implies |1> is thermal ground diff --git a/releasenotes/notes/fix-temperature-a9c51c4599af3a49.yaml b/releasenotes/notes/fix-temperature-a9c51c4599af3a49.yaml new file mode 100644 index 0000000000..b83388bfb0 --- /dev/null +++ b/releasenotes/notes/fix-temperature-a9c51c4599af3a49.yaml @@ -0,0 +1,8 @@ +--- +fixes: + - | + Fixed a bug in :meth:`NoiseModel.from_backend` where using the ``temperature`` kwarg with + a non-default value would incorrectly compute the excited state population for + the specified temperature. Previously, there was an additional factor of 2 in + the Boltzman distribution calculation leading to an incorrect smaller value + for the excited state population.