# Optimal charging of a superconducting quantum battery

Chang-Kang Hu  Shenzhen Insititute for Quantum Science and Engineering,
Southern University of Science and Technology, Shenzhen 518055, China
Guangdong Provincial Key Laboratory of Quantum Science and Engineering,
Southern University of Science and Technology, Shenzhen 518055, China
Shenzhen Key Laboratory of Quantum Science and Engineering, Southern
University of Science and Technology, Shenzhen 518055, China  Jiawei Qiu
Shenzhen Insititute for Quantum Science and Engineering, Southern University
of Science and Technology, Shenzhen 518055, China  Department of Physics,
Southern University of Science and Technology, Shenzhen 518055, China  Paulo
J. P. Souza  Departamento de Física, Universidade Federal de São Carlos,
Rodovia Washington Luís, km 235 - SP-310, 13565-905 São Carlos, SP, Brazil
Jiahao Yuan  Shenzhen Insititute for Quantum Science and Engineering, Southern
University of Science and Technology, Shenzhen 518055, China  Department of
Physics, Southern University of Science and Technology, Shenzhen 518055, China
Yuxuan Zhou  Shenzhen Insititute for Quantum Science and Engineering, Southern
University of Science and Technology, Shenzhen 518055, China  Department of
Physics, Southern University of Science and Technology, Shenzhen 518055, China
Libo Zhang  Shenzhen Insititute for Quantum Science and Engineering, Southern
University of Science and Technology, Shenzhen 518055, China  Guangdong
Provincial Key Laboratory of Quantum Science and Engineering, Southern
University of Science and Technology, Shenzhen 518055, China  Shenzhen Key
Laboratory of Quantum Science and Engineering, Southern University of Science
and Technology, Shenzhen 518055, China  Ji Chu  Shenzhen Insititute for
Quantum Science and Engineering, Southern University of Science and
Technology, Shenzhen 518055, China  Xianchuang Pan  Shenzhen Insititute for
Quantum Science and Engineering, Southern University of Science and
Technology, Shenzhen 518055, China  Ling Hu  Shenzhen Insititute for Quantum
Science and Engineering, Southern University of Science and Technology,
Shenzhen 518055, China  Guangdong Provincial Key Laboratory of Quantum Science
and Engineering, Southern University of Science and Technology, Shenzhen
518055, China  Shenzhen Key Laboratory of Quantum Science and Engineering,
Southern University of Science and Technology, Shenzhen 518055, China  Jian Li
Shenzhen Insititute for Quantum Science and Engineering, Southern University
of Science and Technology, Shenzhen 518055, China  Guangdong Provincial Key
Laboratory of Quantum Science and Engineering, Southern University of Science
and Technology, Shenzhen 518055, China  Shenzhen Key Laboratory of Quantum
Science and Engineering, Southern University of Science and Technology,
Shenzhen 518055, China  Yuan Xu  Shenzhen Insititute for Quantum Science and
Engineering, Southern University of Science and Technology, Shenzhen 518055,
China  Guangdong Provincial Key Laboratory of Quantum Science and Engineering,
Southern University of Science and Technology, Shenzhen 518055, China
Shenzhen Key Laboratory of Quantum Science and Engineering, Southern
University of Science and Technology, Shenzhen 518055, China  Youpeng Zhong
Shenzhen Insititute for Quantum Science and Engineering, Southern University
of Science and Technology, Shenzhen 518055, China  Guangdong Provincial Key
Laboratory of Quantum Science and Engineering, Southern University of Science
and Technology, Shenzhen 518055, China  Shenzhen Key Laboratory of Quantum
Science and Engineering, Southern University of Science and Technology,
Shenzhen 518055, China  Song Liu<EMAIL_ADDRESS>Shenzhen Insititute for
Quantum Science and Engineering, Southern University of Science and
Technology, Shenzhen 518055, China  Guangdong Provincial Key Laboratory of
Quantum Science and Engineering, Southern University of Science and
Technology, Shenzhen 518055, China  Shenzhen Key Laboratory of Quantum Science
and Engineering, Southern University of Science and Technology, Shenzhen
518055, China  Fei Yan  Shenzhen Insititute for Quantum Science and
Engineering, Southern University of Science and Technology, Shenzhen 518055,
China  Guangdong Provincial Key Laboratory of Quantum Science and Engineering,
Southern University of Science and Technology, Shenzhen 518055, China
Shenzhen Key Laboratory of Quantum Science and Engineering, Southern
University of Science and Technology, Shenzhen 518055, China  Dian Tan
<EMAIL_ADDRESS>Shenzhen Insititute for Quantum Science and Engineering,
Southern University of Science and Technology, Shenzhen 518055, China
Guangdong Provincial Key Laboratory of Quantum Science and Engineering,
Southern University of Science and Technology, Shenzhen 518055, China
Shenzhen Key Laboratory of Quantum Science and Engineering, Southern
University of Science and Technology, Shenzhen 518055, China  R. Bachelard
Departamento de Física, Universidade Federal de São Carlos, Rodovia Washington
Luís, km 235 - SP-310, 13565-905 São Carlos, SP, Brazil  C. J. Villas-Boas
Departamento de Física, Universidade Federal de São Carlos, Rodovia Washington
Luís, km 235 - SP-310, 13565-905 São Carlos, SP, Brazil  Alan C. Santos
<EMAIL_ADDRESS>Departamento de Física, Universidade Federal de São
Carlos, Rodovia Washington Luís, km 235 - SP-310, 13565-905 São Carlos, SP,
Brazil  Dapeng Yu  Shenzhen Insititute for Quantum Science and Engineering,
Southern University of Science and Technology, Shenzhen 518055, China
Guangdong Provincial Key Laboratory of Quantum Science and Engineering,
Southern University of Science and Technology, Shenzhen 518055, China
Shenzhen Key Laboratory of Quantum Science and Engineering, Southern
University of Science and Technology, Shenzhen 518055, China  Department of
Physics, Southern University of Science and Technology, Shenzhen 518055, China

###### Abstract

Quantum batteries are miniature energy storage devices and play a very
important role in quantum thermodynamics. In recent years, quantum batteries
have been extensively studied, but limited in theoretical level. Here we
report the experimental realization of a quantum battery based on
superconducting qubits. Our model explores dark and bright states to achieve
stable and powerful charging processes, respectively. Our scheme makes use of
the quantum adiabatic brachistochrone, which allows us to speed up the battery
ergotropy injection. Due to the inherent interaction of the system with its
surrounding, the battery exhibits a self-discharge, which is shown to be
described by a supercapacitor-like self-discharging mechanism. Our results
paves the way for proposals of new superconducting circuits able to store
extractable work for further usage.

_Introduction –_ In the past few decades, the miniaturization technology of
integrated circuits has developed rapidly. In their micro-structures, heat
exchanged with the environment and their own quantum nature have begun to
affect the functioning of devices, so one must start to consider the influence
of quantum effects on future machines Pekola (2015); Brandner  _et al._
(2015); Roßnagel  _et al._ (2016); Halbertal  _et al._ (2016); Partanen  _et
al._ (2016); Dutta  _et al._ (2020). When we deal with these devices working
in the quantum regime, we need to carefully consider some thermodynamic
concepts, such as work, heat, and entropy, which urge people to think about
how to extend the laws of thermodynamics to quantum systems far away from the
equilibrium state. On the other hand, the rapid development of quantum physics
has made it possible to manufacture and precisely control large and complex
quantum systems, such as trapped ions Leibfried  _et al._ (2003); Wineland
(2013); Monroe  _et al._ (2021), Bose-Einstein condensation Griffin  _et al._
(1996); Dalfovo  _et al._ (1999), superconducting circuits You and Nori
(2011); Devoret and Schoelkopf (2013), and many others. Recent efforts have
been focused on the study of a few particle system and how some of its
characteristics can be transformed into a statistical theory, thus resulting
in new macroscopic thermodynamic laws (such as Landauer’s principle Landauer
(1961)), giving rise to the new and exciting field of quantum thermodynamics
Partovi (1989); Vinjanampathy and Anders (2016); Alicki and Kosloff (2018).

Due to the development of quantum thermodynamics, there is an increasing
interest in developing new quantum devices that are applied to emerging
quantum technologies, such as those based on quantum information processing,
including components of quantum transistors and quantum diodes. In the context
of quantum batteries (QBs), quantum phenomena, such as phase coherence Monsel
_et al._ (2020); Kamin  _et al._ (2020) and entanglement Ferraro  _et al._
(2018); Crescente  _et al._ (2020); Rossini  _et al._ (2020); Andolina  _et
al._ (2019a); Santos  _et al._ (2020), constitute important resources, which
can improve the performance of future scientific and technological equipments.
In this direction, the development of storing quantum devices has been
investigated in different systems Andolina  _et al._ (2019b, 2018); Rossini
_et al._ (2019); Cruz  _et al._ (2021). Yet the characterization of the
charging process and energy storing performance due to the interactions with
the environment is still largely unexplored Gherardini  _et al._ (2020); Barra
(2019); Kamian  _et al._ (2020), even when no consumption center is connected
to them Santos (2021).

Figure 1: Schematic of the three-level quantum battery. (a) Three lowest
levels of a transmon define the qutrit system used in our experiment. Two
microwave fields are resonantly coupled to the $\ket{0}$ $\leftrightarrow$
$\ket{1}$ and $\ket{1}$ $\leftrightarrow$ $\ket{2}$ transitions to implement
the charging processor. (b) Experimental pulse sequence. A tomography XY pulse
and the resonant cavity readout pulse come after the charging pulse, to
implement the qutrit’s full state tomography. (c) Simplified diagram of the
experimental setup. The transmon superconducting qubit sample is installed in
the mixed chamber of a dilution cryostat to get the low temperature below 8
mK. The amplitude and phase controlled microwave pulses are generated with a
quadrature IF (IQ) mixer, which is driven by a local oscillator (LO) and
sideband modulated by a commercial arbitrary waveform generator (AWG). The
readout pumping signal is generated in the same way and then is applied to the
input port of the readout transmission line. In the following, the
transmission signal is amplified by a high electron-mobility transistor (HEMT)
amplifier, and is down-converted to the IQ signal, which will be digitized by
an analog-to-digital converter (ADC) for further data analysis. (d) Single-
shot readout performance measurements, three IQ clouds correspond to three
energy level states. (e) The three dimension diagram of the transmon and the
Josephson junction. (f) The schematic representation of a stable (dashed line)
and unstable (continuum line) charging process. The choose of how we charge
the battery is initially set in the external charging fields $\Omega_{1}(t)$
and $\Omega_{2}(t)$.

In this paper we present the first experimental implementation of a QB,
demonstrating the charging and self-discharging process of a three-level
quantum cell composed by a superconducting device with a superconducting
transmon qutrit. We also present a new approach to determine the optimal
charging process based on quantum brachistocrone for closed systems Rezakhani
_et al._ (2009), which allows us to determine the optimal interpolation
functions for the time-dependent driving fields. Two distinct charging
processes are implemented here: Firstly, a stable charge is achieved, we make
use of the stimulated Raman adiabatic passage (STIRAP), by controlling the
time-dependent evolution of the driving field, to perform the adiabatic
elimination of an intermediate level and bypass unwanted spontaneous discharge
or attenuation Santos  _et al._ (2019, 2020). Secondly, by accurately
controlling the evolution parameters and time of the driving fields, one
enhances the charging power driving the QB through a fast and non-stable path
with high fidelity. Finally, we investigate the loss of ergotropy of the
battery due to its inevitable coupling to the environment (without any
consumption center coupled to it), and show that, due to the particular decay
rates of our system, it exhibits a super-capacitor behaviour.

_The superconducting device –_ As sketched in Fig. 1a, we encoded our qutrit
in the three lowest energy levels of the superconducting transmon circuit. The
corresponding transition frequencies between the neighboring energy levels are
$\omega_{01}\\!=\\!2\pi\times 6.266$ GHz and $\omega_{12}\\!=\\!2\pi\times
6.011$ GHz. The device energy level structure defines the QB energy levels
from the bare Hamiltonian

$\displaystyle
H_{0}=\sum\nolimits_{n=1}^{2}\hbar\omega_{(n-1)n}\ket{n}\bra{n},$ (1)

$\ket{n}$ being the QB states with energy splittings
$\epsilon_{n}\\!=\\!\hbar\omega_{(n-1)n}$, $\ket{0}$ the zeroth energy level.
The relaxation and coherence times, extracted with standard state tomography
measurements, are $T_{01}^{relax}\\!=\\!19.4$ $\mu$s,
$T_{12}^{relax}\\!=\\!12.5$ $\mu$s, $T_{01}^{coher}\\!=\\!26.7$ $\mu$s and
$T_{12}^{coher}\\!=\\!9.9$ $\mu$s, respectively. We used two programmed
microwave pulses, with time-dependent Rabi frequencies $\Omega_{1}(t)$ and
$\Omega_{2}(t)$, to resonantly drive the qutrit and implement the expected
charging time-dependent Hamiltonian. Then, to reconstruct the full density
matrix of the qutrit, the standard quantum state tomography technology has
been used, by performing a complete set of nine independent rotations between
the charging and measurement pulses. Here, we rotate the quantum measurement
bases $\ket{\psi_{i}}$ to the ground state with the pulses as shown in Table.
1. The two microwave pulses are generated by analog IQ mixer down-conversion
with a local oscillator with $\omega_{LO}\\!=\\!2\pi\times 6.360$ GHz and AWG
programmed microwave, and then they are applied to the qutrit through the XY
control port, as shown in Fig. 1b and 1c. The qutrit is capacitively coupled
to a wandering readout resonator with a coupling strength of about
$g_{r}\\!=\\!2\pi\times 23$ MHz. The readout frequency is
$\omega_{r}\\!=\\!2\pi\times 5.015$ GHz. The corresponding effective
dispersive shift, $\chi\\!=\\!2\pi\times 430$ KHz, is very close to the cavity
linewidth, and meets the optimal dispersive readout conditions. The IQ clouds
corresponding to the three energy levels of our system are shown in Fig. 1d.
More details about the superconducting circuit experimental setup can be found
in the Supplementary Material Sup .

Table 1: Set of tomography measurement bases $|\psi_{i}\rangle$ and corresponding rotations $U_{i}$ sufficient to reconstruct any arbitrary quantum density matrix of a qutrit.  i | $U_{i}$ | $|\psi_{i}\rangle$ |
---|---|---|---
1 | $I$ | $\ket{0}$ |
2 | $(\pi)_{x}^{01}$ | $\ket{1}$ |
3 | $(\pi)_{x}^{01}(\pi)_{x}^{12}$ | $\ket{2}$ |
4 | $(\pi/2)_{y}^{01}$ | $(\ket{0}-\ket{1})/\sqrt{2}$ |
5 | $(\pi/2)_{x}^{01}$ | $(\ket{0}+j\ket{1})/\sqrt{2}$ |
6 | $(\pi)_{x}^{01}(\pi/2)_{y}^{12}$ | $(\ket{1}-\ket{2})/\sqrt{2}$ |
7 | $(\pi)_{x}^{01}(\pi/2)_{x}^{12}$ | $(\ket{1}+j\ket{2})/\sqrt{2}$ |
8 | $(\pi/2)_{x}^{01}(\pi)_{x}^{12}$ | $(\ket{0}-\ket{2})/\sqrt{2}$ |
9 | $(\pi/2)_{y}^{01}(\pi)_{x}^{12}$ | $(\ket{0}+j\ket{2})/\sqrt{2}$ |

_Optimal charging process –_ An optimal charging process takes into account
both stability and charging speed. In our system, the energy is introduced in
a stable way by employing an adiabatic dynamics with time-varying external
fields to inject energy into the system, in which the driving Hamiltonian
reads

$\displaystyle
H(t)=\hbar\Omega_{1}(t)(\ket{0}\bra{1}+\ket{1}\bra{0})+\hbar\Omega_{2}(t)(\ket{1}\bra{2}+\ket{2}\bra{1}).$
(2)

Due to the adiabatic theorem validity conditions, the charging speed is
negatively impacted leading to a loss of power (energy per time) Moraes  _et
al._ (2020). To bypass this issue, we explore the optimization process through
adiabatic quantum brachistochrone (QAB) Rezakhani  _et al._ (2009) in order to
speed up the QB ergotropy loading in context of adiabatic dynamics. The
optimal trajectory is obtained through a variational formalism, where we find
the set of differential equations for the Rabi frequencies of the driving
fields $\Omega_{\ell}(t)$ (see Sup  for further details):

$\displaystyle(\Omega_{1}^{2}+\Omega_{2}^{2})\ddot{\Omega}_{1}^{2}-2\left(2{\Omega}_{2}\dot{\Omega}_{1}\dot{\Omega}_{2}+{\Omega}_{1}(\dot{\Omega}_{1}^{2}-\dot{\Omega}_{2}^{2})\right)$
$\displaystyle=0,$ (3a)
$\displaystyle(\Omega_{1}^{2}+\Omega_{2}^{2})\ddot{\Omega}_{2}^{2}-2\left(2{\Omega}_{1}\dot{\Omega}_{1}\dot{\Omega}_{2}-{\Omega}_{2}(\dot{\Omega}_{1}^{2}-\dot{\Omega}_{2}^{2})\right)$
$\displaystyle=0,$ (3b)

where the boundary conditions depends on the kind of charging process. In
order to achieve a stable drive, the system is driven through a dark state,
which imposes $\Omega_{1}(0)\\!=\\!\Omega_{2}(\tau)\\!=\\!0$ and
$(\Omega_{1}(\tau),\Omega_{2}(0))\\!\neq\\!(0,0)$, which corresponds to a
stable adiabatic charging Santos  _et al._ (2019). Guaranteeing the stability
of a QB is an important task to avoid backflow of charge from the QB to the
charger, leading to a loss of efficiency when the external fields are not
precisely controlled. On the other hand, as we shall see, when a high control
of the charging fields is possible, the unstable process can enhance the
charging performance of the QB, which can be reached by setting
$\Omega_{1}(\tau)\\!=\\!\Omega_{2}(0)\\!=\\!0$ and
$(\Omega_{1}(0),\Omega_{2}(\tau))\\!\neq\\!(0,0)$.

In scenarios in which the external driving fields present physical limitations
(e.g., maximum available intensity or controllability), one needs to
incorporate some constraints in the above equations. For example, our system
has a single constraint associated with the maximum admissible amplitude for
the independent fields $\Omega_{\ell}$ as given by
$\Omega_{1}^{2}(t)+\Omega_{2}^{2}(t)\\!\leq\\!\Omega_{\text{max}}^{2}$, for
all $t\in[0,\tau]$. Motivated by this limitation of a maximum field intensity,
one can consider some specific classes of constraints, which lead to different
solutions for Eqs. (3). Since the strongest fields are desirable to achieve a
fast adiabatic charging process, this leads to the following constraint:
$\Omega_{1}^{2}(t)+\Omega_{2}^{2}(t)\\!=\\!\Omega_{\text{max}}^{2}$. From this
assumption and considering the stable process, one obtains the solution

$\displaystyle\Omega_{1}^{\text{opt}}(t)$
$\displaystyle=\Omega_{\text{max}}\sin\left(\frac{\pi
t}{2\tau}\right),\leavevmode\nobreak\ \leavevmode\nobreak\
\Omega_{2}^{\text{opt}}(t)=\Omega_{\text{max}}\cos\left(\frac{\pi
t}{2\tau}\right).$ (4)

It is worth mentioning that since any adiabatic trajectory obtained here from
Eqs. (3) comes from a first derivative of the adiabatic functional time, then
there is no any information whether the solutions presented here are in fact
optimal (minimum) curves. However, by using an approach via second derivative
functional analysis (see Sup  for more details), we show that the above
solution minimizes the functional time, so it is indeed the optimal adiabatic
brachistochrone of the problem.

For the sake of comparison we consider the linear combination written as
$\Omega_{1}(t)+\Omega_{2}(t)\\!=\\!\Omega_{\text{max}}$, whose brachistochrone
solution is the arc of cycloid
$\Omega_{1}^{\text{cyc}}(t)=\Omega_{\text{max}}\left[1-\tan\left(\pi\left(1-2t/\tau\right)/4\right)\right]/2$,
and
$\Omega_{2}^{\text{cyc}}(t)\\!=\\!\Omega_{\text{max}}-\Omega_{1}^{\text{cyc}}(t)$.
We also consider the case where the relation between the fields is set by the
maximum admissible amplitude
$\Omega_{1}^{2}(t)+\Omega_{2}^{2}(t)\\!\leq\\!\Omega_{\text{max}}^{2}$,
leading to a solution different from that given in Eq. (4). In this situation,
Eq. (3) admits only numerical solutions. As a fourth case, we consider the
linear ramp $\Omega_{1}^{\text{cyc}}(t)\\!=\\!\Omega_{\text{max}}(1-t/\tau)$
and $\Omega_{2}^{\text{cyc}}(t)\\!=\\!\Omega_{\text{max}}t/\tau$. The shape
for each Rabi frequency implemented is shown in Figs. 2a–2d for the maximum
power (which also corresponds to the minimum total evolution time for unstable
dynamics).

The charging process is realized by connecting the QB to the charger (time-
dependent external fields). In a quantum battery, the stored charge is called
ergotropy Allahverdyan  _et al._ (2004), which quantifies the maximum amount
of available work that can be extracted through unitary processes. It is given
by
$\mathcal{E}(t)\\!=\\!\mbox{Tr}[\rho(t)H_{0}]-\min_{V\in\mathcal{V}}\\{\mbox{Tr}[V\rho(t)V^{\dagger}H_{0}]\\}$,
where the minimization is taken over the set $\mathcal{V}$ of all unitary
operators acting on the system. From the ordered set of eigenenergies
$\epsilon_{1}\\!\leq\\!\epsilon_{2}\\!\leq\\!\cdots\\!\leq\\!\epsilon_{N}$,
with eigenstates $\ket{n}$, of the internal battery Hamiltonian $H_{0}$ and
the instantaneous spectral decomposition
$\varrho_{1}(t)\\!\geq\\!\varrho_{2}(t)\\!\geq\\!\cdots\\!\geq\\!\varrho_{N}(t)$
of the instantaneous battery state $\rho(t)$, associated to eigenvectors
$\ket{\varrho_{n}(t)}$ Sup , the ergotropy can be rewritten as

$\displaystyle\mathcal{E}(t)=\sum\nolimits_{i,n}^{N,N}\varrho_{n}(t)\epsilon_{i}\left(|\langle\varrho_{n}(t)|i\rangle|^{2}-\delta_{ni}\right),$
(5)

where we note that this definition is associated with a specific ordering of
the eigenvalues of $\rho(t)$ and $H_{0}$, due to the $\delta_{ni}$ term.

Figure 2: (a–d) Time dependence for the realized $\Omega_{1}$ (continuum line)
and $\Omega_{2}$ (dashed line) for (a) a linear ramp, (b) linear and (c)
quadratic constraints, and (d) no constraint. (e–f) Experimental result for
the ergotropy as a function of the total evolution time $\tau$ (as a multiple
of $\mathcal{E}_{\text{max}}\\!\approx\\!51$ $\mu$eV) for (e) stable and (f)
unstable charging processes. In the experiment we have set
$\Omega_{\text{max}}\\!=\\!2\pi\times 10$ MHz.

Given the reference Hamiltonian of the system as defined in Eq. (1), the
instantaneous ergotropy for the stable process is shown in Fig. 2e. The QB
energy level spacing leads to a maximum storable ergotropy
$\mathcal{E}_{\text{max}}\\!\approx\\!51$ $\mu$eV. One can see that the QAB
curve associated with the maximum intensity field provides the highest
charging power for the QB. It means that, in a scenario in which physical
constraints only impose a maximum value for the field intensity, the QAB
allows us to get the optimal charging process by setting maximum power of the
external fields at any instant of time.

One of the criteria for the high stability of a QB is its robustness against
instantaneous discharging process Santos  _et al._ (2019), which occur
whenever systematic errors affect the external field control, leading then to
an undesired energy leakage from battery. We now show how to enhance the QB
performance, while keeping a high control to suppress energy backflow. To this
end we change the field setup previously used, where now use a sequence in
which $\Omega_{1}(\tau)\\!=\\!\Omega_{2}(0)\\!=\\!0$ and
$(\Omega_{1}(0),\Omega_{2}(\tau))\\!\neq\\!(0,0)$. The adiabatic stability is
lost due to coherent superpositions of the eigenstates of the adiabatic
Hamiltonian (see Sup  for a detailed proof). Then, we compute the adiabatic
brachistochrone for each case considered in Fig. 2a–d, but now each
$\Omega_{1}$ is represented by the dotted curve, while plain curves stand for
$\Omega_{2}$. The instantaneous ergotropy is shown in Fig. 2f. As a first
result, one notes a power enhancement of more than $100\%$ of the unstable
approach in comparison with the stable one for all cases considered here. In
some cases, as in the ramp profile, this advantage is close to $300\%$. In
particular, it is worth highlighting the performance of the brachistochrone
associated to the constant maximum power. Indeed, the performance of the QAB
is the fastest in the ’stable’ category ($\tau_{\text{c}}\\!\approx\\!190$
ns), approximately $100\%$ better than the unstable approach for the ramp case
($\tau_{\text{c}}\\!\approx\\!85$ ns). In conclusion, the high control of the
charging fields allows to suppress the instantaneous energy backflow: The
adiabatic approach thus offers a greater stability, at the cost of speed.

_Self-discharging –_ The characterization of the Transmon QB is completed by
discussing its self-discharging behavior. The system is started in its fully
charged state, without any external field or consumption center connected to
it. The system is then governed by a cascade-like relaxation phenomenon which
brings the system from its excited state to the ground state through a process
in which state coherence is lost. The energy dissipation of the system is
described by the master equation Peterer  _et al._ (2015)

$\displaystyle\dot{\rho}(t)=\left[\frac{H_{0}}{i\hbar},\rho(t)\right]+\sum_{n,m}\frac{\Gamma_{nm}}{2}\left[2\sigma_{nm}\rho(t)\sigma_{mn}-\\{\sigma_{nn},\rho(t)\\}\right],$
(6)

with $\sigma_{nm}\\!=\\!\ket{n}\bra{m}$, the terms $\Gamma_{nn}$ and
$\Gamma_{n(m\neq n)}$ being the dephasing rates and the crossed decay rates
from state $\ket{n}$ to $\ket{m}$, respectively. By solving the above equation
we can analytically compute the instantaneous stored ergotropy decay’s law as

$\displaystyle\mathcal{E}(t)$
$\displaystyle=\left\\{\begin{matrix}\varepsilon_{1}(\varrho_{1}-\varrho_{0})+\varepsilon_{2}(\varrho_{2}-\varrho_{1})&\text{if}\leavevmode\nobreak\
\varrho_{2}\\!>\\!\varrho_{1}\\!>\\!\varrho_{0}\\\
(\varrho_{2}-\varrho_{1})(\varepsilon_{2}-\varepsilon_{1})&\text{if}\leavevmode\nobreak\
\varrho_{2}\\!>\\!\varrho_{0}\\!\geq\\!\varrho_{1}\\\
\varepsilon_{2}(\varrho_{2}-\varrho_{0})&\text{if}\leavevmode\nobreak\
\varrho_{0}\\!>\\!\varrho_{2}\\!>\\!\varrho_{1}\\\
0&\text{if}\leavevmode\nobreak\
\varrho_{0}\\!>\\!\varrho_{1}\\!>\\!\varrho_{2}\end{matrix}\right.,$ (7)

with $\varepsilon_{1}\\!=\\!\epsilon_{1}$ and
$\varepsilon_{2}\\!=\\!\epsilon_{1}+\epsilon_{2}$, and the quantities
$\varrho_{n}\\!=\\!\varrho_{n}(t)$ being the instantaneous population in the
battery state $\ket{n}$, given by

$\displaystyle\varrho_{1}(t)$
$\displaystyle=\frac{\Gamma_{21}}{\Gamma_{10}-\Gamma_{21}}\left[e^{-t\Gamma_{21}}-e^{-t\Gamma_{10}}\right],\leavevmode\nobreak\
\leavevmode\nobreak\ \varrho_{2}(t)=e^{-t\Gamma_{21}}\text{ , }$ (8)

and $\varrho_{0}\\!=\\!1-\varrho_{1}(t)-\varrho_{2}(t)$. As an immediate
consequence, there is a set of three crossing times $\tau^{\text{c}}_{n}$,
which depend on the specific values of the relaxation rates $\Gamma_{21}$ and
$\Gamma_{32}$. In fact, as highlighted in Eq. (7) and sketched in Fig. 3, the
complete process is described by a sequence of incoherent population
inversion, so that each time $\tau^{\text{c}}_{n}$ is obtained from conditions
$\varrho_{3}\\!=\\!\varrho_{2}$, $\varrho_{3}\\!=\\!\varrho_{1}$ and
$\varrho_{2}\\!=\\!\varrho_{1}$, respectively. Using a dynamics presented in
Fig. (2), the system is initially prepared in a fully charged state with
ergotropy $\mathcal{E}_{\text{max}}\\!\approx\\!51$ $\mu$eV, then we let it
decay and we compute its instantaneous ergotropy. The experimental decay curve
is shown in Fig. 3, where we highlight the time intervals in which the
inversion population affects the ergotropy decay (see insets).

Differently from conventional classical batteries Babu and Balducci (2020) and
two-level QBs Santos (2021), which present an Ohmic decay behavior (i.e.,
characterized by a single time scale decay $\sim e^{-t/\tau_{\text{ohm}}}$
Babu and Balducci (2020); Santos (2021)), it is not possible to describe the
self-discharging of transmon QBs using an Ohmic approach. In fact, the decay
observed in the transmon QB needs to be explained through at least two
mechanisms with two different time constants $\tau_{\text{1}}$ and
$\tau_{\text{2}}$ as $\sim a_{1}e^{-t/\tau_{1}}+a_{2}e^{-t/\tau_{2}}$. Such a
self-discharging behavior is the main characteristic of supercapacitors Kowal
_et al._ (2011); Zhang  _et al._ (2018). In the transmon QB, we understand
this supercapacitor-like behavior as a consequence of both the multilevel
nature of the system, and the asymmetry for the sequential decay rates
$\Gamma_{21}$ and $\Gamma_{10}$.

Figure 3: Instantaneous ergotropy (as a multiple of
$\mathcal{E}_{\text{max}}$) in the self-discharging process. The change of
population is sketched in each step of the discharging. Inset we highlight the
time interval in which the ergotropy changes due to the population inversion,
as predicted from Eq. (7). The decay rates are $\Gamma_{21}\\!\approx\\!51.4$
KHz and $\Gamma_{32}\\!\approx\\!79.7$ KHz.

_Conclusions –_ In this paper we presented the first experimental realization
of a quantum battery concerning the charging and self-discharging processes.
By exploring the coherent coupling of a transmon three-level system with the
external field, the battery can be coherently charged until its maximal
charge. To enhance the battery charging speed while preserving its stability,
the adiabatic process is optimized using the quantum brachistochrone theory,
where the physical limitations of the external microwave pulses used to charge
the battery are taken into account as constraints in the theory. Our results
show that the optimal scheme to charge the battery comes from a joint
adjustment of the kind of charging (stable or unstable) and the constraints on
the fields used to inject energy in the system. The full characterization of a
transmon three-level QB is studied by considering the self-discharging
phenomena, which brings a fully charged battery into an empty charge final
state. By computing the instantaneous ergotropy we verified that our transmon
QB present a non-Ohmic discharging, therefore our single-cell QB is understood
as a supercapacitor concerning such loss-energy phenomena.

Our work constitutes a timely proposal of QB with potential applications in
superconducting quantum computation, in which the stored work can be useful
for quantum information processing, using, for example, the QB stored
ergotropy to implement quantum gates. Our results are also applicable to any
physical system, in which the dynamics of the three-level is driven by time-
dependent external fields. The theory behind the optimal QAB studied here can
also be adapted for other technologies that use three-level systems and STIRAP
Vitanov  _et al._ (2017), such as single-photon generation Hijlkema  _et al._
(2007).

_Acknowledgments –_ This work was supported by the Key-Area Research and
Development Program of Guang-Dong Province (Grant No. 2018B030326001), the
National Natural Science Foundation of China (U1801661, 12004167, 11934010),
the China Postdoctoral Science Foundation (Grant No. 2020M671861,
2021T140648), the Guangdong Innovative and Entrepreneurial Research Team
Program (2016ZT06D348), the Guangdong Provincial Key Laboratory (Grant
No.2019B121203002), the Natural Science Foundation of Guangdong Province
(2017B030308003), and the Science, Technology and Innovation Commission of
Shenzhen Municipality (JCYJ20170412152620376, KYTDPT20181011104202253), and
the NSF of Beijing (Grants No. Z190012). A.C.S., C.J.V.-B., and R.B.
acknowledge the financial support of the São Paulo Research Foundation
(FAPESP) (Grants No. 2018/15554-5, No. 2019/22685-1, No. 2019/11999-5, and No.
2019/13143-0) and the Coordenação de Aperfeiçoamento de Pessoal de Nível
Superior (CAPES/STINT), Grant No. 88881.304807/2018-01. R.B. and C.J.V.-B.
benefitted from the support of the National Council for Scientific and
Technological Development (CNPq) Grants No. 302981/2017-9, No. 409946/2018-4,
and No. 307077/2018-7. C.J.V.-B. is also thankful for the support from the
Brazilian National Institute of Science and Technology for Quantum Information
(INCTIQ/CNPq) Grant No. 465469/2014-0.

## References

  * Pekola (2015) J. P. Pekola, Nature Physics 11, 118 (2015).
  * Brandner  _et al._ (2015) K. Brandner, K. Saito, and U. Seifert, Phys. Rev. X 5, 031019 (2015).
  * Roßnagel  _et al._ (2016) J. Roßnagel, S. T. Dawkins, K. N. Tolazzi, O. Abah, E. Lutz, F. Schmidt-Kaler, and K. Singer, Science 352, 325 (2016).
  * Halbertal  _et al._ (2016) D. Halbertal, J. Cuppens, M. B. Shalom, L. Embon, N. Shadmi, Y. Anahory, H. Naren, J. Sarkar, A. Uri, Y. Ronen, _et al._ , Nature 539, 407 (2016).
  * Partanen  _et al._ (2016) M. Partanen, K. Y. Tan, J. Govenius, R. E. Lake, M. K. Mäkelä, T. Tanttu, and M. Möttönen, Nature physics 12, 460 (2016).
  * Dutta  _et al._ (2020) B. Dutta, D. Majidi, N. W. Talarico, N. Lo Gullo, H. Courtois, and C. B. Winkelmann, Phys. Rev. Lett. 125, 237701 (2020).
  * Leibfried  _et al._ (2003) D. Leibfried, R. Blatt, C. Monroe, and D. Wineland, Rev. Mod. Phys. 75, 281 (2003).
  * Wineland (2013) D. J. Wineland, Rev. Mod. Phys. 85, 1103 (2013).
  * Monroe  _et al._ (2021) C. Monroe, W. C. Campbell, L.-M. Duan, Z.-X. Gong, A. V. Gorshkov, P. W. Hess, R. Islam, K. Kim, N. M. Linke, G. Pagano, P. Richerme, C. Senko, and N. Y. Yao, Rev. Mod. Phys. 93, 025001 (2021).
  * Griffin  _et al._ (1996) A. Griffin, D. W. Snoke, and S. Stringari,  _Bose-einstein condensation_ (Cambridge University Press, 1996).
  * Dalfovo  _et al._ (1999) F. Dalfovo, S. Giorgini, L. P. Pitaevskii, and S. Stringari, Rev. Mod. Phys. 71, 463 (1999).
  * You and Nori (2011) J. You and F. Nori, Nature 474, 589 (2011).
  * Devoret and Schoelkopf (2013) M. H. Devoret and R. J. Schoelkopf, Science 339, 1169 (2013).
  * Landauer (1961) R. Landauer, IBM journal of research and development 5, 183 (1961).
  * Partovi (1989) M. H. Partovi, Physics Letters A 137, 440 (1989).
  * Vinjanampathy and Anders (2016) S. Vinjanampathy and J. Anders, Contemporary Physics 57, 545 (2016).
  * Alicki and Kosloff (2018) R. Alicki and R. Kosloff, “Introduction to quantum thermodynamics: History and prospects,” in  _Thermodynamics in the Quantum Regime: Fundamental Aspects and New Directions_, edited by F. Binder, L. A. Correa, C. Gogolin, J. Anders, and G. Adesso (Springer International Publishing, Cham, 2018) pp. 1–33.
  * Monsel  _et al._ (2020) J. Monsel, M. Fellous-Asiani, B. Huard, and A. Auffèves, Phys. Rev. Lett. 124, 130601 (2020).
  * Kamin  _et al._ (2020) F. H. Kamin, F. T. Tabesh, S. Salimi, and A. C. Santos, Phys. Rev. E 102, 052109 (2020).
  * Ferraro  _et al._ (2018) D. Ferraro, M. Campisi, G. M. Andolina, V. Pellegrini, and M. Polini, Phys. Rev. Lett. 120, 117702 (2018).
  * Crescente  _et al._ (2020) A. Crescente, M. Carrega, M. Sassetti, and D. Ferraro, Phys. Rev. B 102, 245407 (2020).
  * Rossini  _et al._ (2020) D. Rossini, G. M. Andolina, D. Rosa, M. Carrega, and M. Polini, Phys. Rev. Lett. 125, 236402 (2020).
  * Andolina  _et al._ (2019a) G. M. Andolina, M. Keck, A. Mari, M. Campisi, V. Giovannetti, and M. Polini, Phys. Rev. Lett. 122, 047702 (2019a).
  * Santos  _et al._ (2020) A. C. Santos, A. Saguia, and M. S. Sarandy, Phys. Rev. E 101, 062114 (2020).
  * Andolina  _et al._ (2019b) G. M. Andolina, M. Keck, A. Mari, V. Giovannetti, and M. Polini, Phys. Rev. B 99, 205437 (2019b).
  * Andolina  _et al._ (2018) G. M. Andolina, D. Farina, A. Mari, V. Pellegrini, V. Giovannetti, and M. Polini, Phys. Rev. B 98, 205423 (2018).
  * Rossini  _et al._ (2019) D. Rossini, G. M. Andolina, and M. Polini, Phys. Rev. B 100, 115142 (2019).
  * Cruz  _et al._ (2021) C. Cruz, M. F. Anka, M. S. Reis, R. Bachelard, and A. C. Santos, (2021), arXiv:2104.00083 [quant-ph] .
  * Gherardini  _et al._ (2020) S. Gherardini, F. Campaioli, F. Caruso, and F. C. Binder, Phys. Rev. Research 2, 013095 (2020).
  * Barra (2019) F. Barra, Phys. Rev. Lett. 122, 210601 (2019).
  * Kamian  _et al._ (2020) F. H. Kamian, F. T. Tabesh, S. Salimi, F. Kheirandish, and A. C. Santos, New J. Phys. 22, 083007 (2020).
  * Santos (2021) A. C. Santos, Phys. Rev. E 103, 042118 (2021).
  * Rezakhani  _et al._ (2009) A. T. Rezakhani, W.-J. Kuo, A. Hamma, D. A. Lidar, and P. Zanardi, Phys. Rev. Lett. 103, 080502 (2009).
  * Santos  _et al._ (2019) A. C. Santos, B. Çakmak, S. Campbell, and N. T. Zinner, Phys. Rev. E 100, 032107 (2019).
  * (35) See Supplemental Material .
  * Moraes  _et al._ (2020) L. F. C. Moraes, A. Saguia, A. C. Santos, and M. S. Sarandy, arXiv e-prints , arXiv:2012.05855 (2020), arXiv:2012.05855 [quant-ph] .
  * Allahverdyan  _et al._ (2004) A. E. Allahverdyan, R. Balian, and T. M. Nieuwenhuizen, Europhys. Lett. 67, 565 (2004).
  * Peterer  _et al._ (2015) M. J. Peterer, S. J. Bader, X. Jin, F. Yan, A. Kamal, T. J. Gudmundsen, P. J. Leek, T. P. Orlando, W. D. Oliver, and S. Gustavsson, Phys. Rev. Lett. 114, 010501 (2015).
  * Babu and Balducci (2020) B. Babu and A. Balducci, Journal of Power Sources Advances 5, 100026 (2020).
  * Kowal  _et al._ (2011) J. Kowal, E. Avaroglu, F. Chamekh, A. Å enfelds, T. Thien, D. Wijaya, and D. U. Sauer, Journal of Power Sources 196, 573 (2011).
  * Zhang  _et al._ (2018) L. Zhang, X. Hu, Z. Wang, F. Sun, and D. G. Dorrell, Renewable and Sustainable Energy Reviews 81, 1868 (2018).
  * Vitanov  _et al._ (2017) N. V. Vitanov, A. A. Rangelov, B. W. Shore, and K. Bergmann, Rev. Mod. Phys. 89, 015006 (2017).
  * Hijlkema  _et al._ (2007) M. Hijlkema, B. Weber, H. P. Specht, S. C. Webster, A. Kuhn, and G. Rempe, Nature Physics 3, 253 (2007).
  * Virtanen  _et al._ (2020) P. Virtanen, R. Gommers, T. E. Oliphant, M. Haberland, T. Reddy, D. Cournapeau, E. Burovski, P. Peterson, W. Weckesser, J. Bright, S. J. van der Walt, M. Brett, J. Wilson, K. J. Millman, N. Mayorov, A. R. J. Nelson, E. Jones, R. Kern, E. Larson, C. J. Carey, İ. Polat, Y. Feng, E. W. Moore, J. VanderPlas, D. Laxalde, J. Perktold, R. Cimrman, I. Henriksen, E. A. Quintero, C. R. Harris, A. M. Archibald, A. H. Ribeiro, F. Pedregosa, P. van Mulbregt, and SciPy 1.0 Contributors, Nature Methods 17, 261 (2020).

Supplemental Material for:
Optimal charging of a superconducting quantum battery Chang-Kang Hu,1,2,3
Jiawei Qiu,1,4 Paulo J. P. Souza,5 Jiahao Yuan,1,4 Yuxuan Zhou,1,4 Libo
Zhang,1,2,3

Ji Chu,1 Xianchuang Pan,1 Ling Hu,1,2,3 Jian Li,1,2,3 Yuan Xu,1,2,3 Youpeng
Zhong,1,2,3 Song Liu,1,2,3,∗

Fei Yan,1,2,3 Dian Tan,1,2,3,† R. Bachelard,5 C. J. Villas-Boas,5 Alan C.
Santos,5,‡ Dapeng Yu1,2,3,4

1Shenzhen Insititute for Quantum Science and Engineering,
Southern University of Science and Technology, Shenzhen 518055, China
2Guangdong Provincial Key Laboratory of Quantum Science and Engineering,
Southern University of Science and Technology, Shenzhen 518055, China

3Shenzhen Key Laboratory of Quantum Science and Engineering,
Southern University of Science and Technology, Shenzhen 518055, China

4Department of Physics, Southern University of Science and Technology,
Shenzhen 518055, China

5Departamento de Física, Universidade Federal de São Carlos,
Rodovia Washington Luís, km 235 - SP-310, 13565-905 São Carlos, SP, Brazil
<EMAIL_ADDRESS><EMAIL_ADDRESS><EMAIL_ADDRESS>
##  Appendix A Experimental setup

The transmon superconducting qutrit device is installed inside a dilution
refrigerator system and cooled down to under 8 mK. Electronics, cryogenics,
and sample diagram are shown in Fig. S1. The qubit drive pulses are generated
with a quadrature IF (IQ) mixer. The local oscillator (LO) is supported by a
commercial Mulitichannel coherence microwave generator Sinolink SLFS20. The IQ
signals are generated by a QuantumCTek arbitrary waveform generator (AWG),
with a 2 GHz sampling rate. The IQ signal amplitude is directly proportional
to Rabi frequency, while the control signal phase determines the rotation
axis. So, we could program the AWG to implement our targeted Hamiltonian. The
readout pumping signal is generated in the same way and then is applied to the
input port of the readout transmission line. After being amplified by a high
electron-mobility transistor (HEMT) amplifier at the 4K stage and a low noise
room temperature amplifier, the readout signal is downconverted to the IQ
signals with the same LO microwave source. Finally, the demodulated IQ signals
will be digitized by analog-to-digital converters (ADC).

Figure S1: Electronics, cryogenics, and sample schematic of our experimental
setup

##  Appendix B The Brachistochorne

By using the definition of the Lagrangian in Ref. Rezakhani  _et al._ (2009)
we identify the Lagrangian for our quantum battery charging process as

$\mathcal{L}(\Omega,\dot{\Omega})=\left(\frac{||\dot{H}(t)||}{\Delta^{2}(t)}\right)^{2}=\frac{\dot{\Omega}_{1}^{2}(t)+\dot{\Omega}_{2}^{2}(t)}{\left(\Omega_{1}^{2}(t)+\Omega_{2}^{2}(t)\right)^{2}},$
(S1)

where $\Omega=(\Omega_{1},\Omega_{2})$, dot denotes $d/dt$,
$||A||=\sqrt{\mathrm{Tr}(A^{\dagger}A)}$ is the Frobenius norm, $\Delta(t)$ is
the (minimum) instantaneous energy gap among all the eigenstates of $H(t)$.
Further, after applying the Euler-Lagrange equations

$\displaystyle\frac{\partial\mathcal{L}(\Omega,\dot{\Omega})}{\partial\Omega_{n}}-\frac{d}{dt}\left(\frac{\partial\mathcal{L}(\Omega,\dot{\Omega})}{\partial\dot{\Omega}_{n}}\right)=0,\leavevmode\nobreak\
\leavevmode\nobreak\ n\in\\{1,2\\},$ (S2)

we find the system of coupled second order differential equations,

$\begin{split}(\Omega_{1}^{2}+\Omega_{2}^{2})\ddot{\Omega}_{1}-2\left(2\Omega_{2}\dot{\Omega_{1}}\dot{\Omega_{2}}+\Omega_{1}(\dot{\Omega}_{1}^{2}-\dot{\Omega}_{2}^{2})\right)&=0\text{,
}\\\
(\Omega_{1}^{2}+\Omega_{2}^{2})\ddot{\Omega}_{2}-2\left(2\Omega_{2}\dot{\Omega_{1}}\dot{\Omega_{2}}-\Omega_{2}(\dot{\Omega}_{1}^{2}-\dot{\Omega}_{2}^{2})\right)&=0\text{,
}\end{split}$ (S3)

where $\Omega_{1}$ and $\Omega_{2}$ are expressed in function of $t$. In the
case where the above equation does not admit a analytical solution, we
numerically solve this system of differential equations using the algorithms
in the SciPy library Virtanen  _et al._ (2020).

###  B.1 Adiabatic interpolations

In general, it is not possible to find the analytical solution of Eq. (S3).
Nonetheless, we can impose constraints to the canonical variables,
$\Omega_{1}(t)$ and $\Omega_{2}(t)$, which allows for an analytical treatment.
Firstly, we can impose the linear constraint,
$\Omega_{1}(t)+\Omega_{2}(t)=\Omega_{\text{max}}$. So, from Eq. (S1) and
imposing the boundary conditions $\Omega_{1}(0)\\!=\\!\Omega_{\text{max}}$ and
$\Omega_{1}(\tau)\\!=\\!0$ of the stable process, we get the solution for the
Euler-Lagrange equation as

$\Omega_{1}^{\text{sta}}(t)=\Omega_{\text{max}}\left\\{\frac{1}{2}-\frac{1}{2}\tan\left[\frac{\pi\left(1-2t/\tau\right)}{4}\right]\right\\}.$
(S4)

Conversely, in the case where the charging process is unstable, we have the
conditions $\Omega_{1}(0)\\!=\\!0$ and
$\Omega_{1}(\tau)\\!=\\!\Omega_{\text{max}}$ and the solution is then

$\Omega_{1}^{\text{uns}}(t)=\Omega_{\text{max}}\left\\{\frac{1}{2}+\frac{1}{2}\tan\left[\frac{\pi\left(1-2t/\tau\right)}{4}\right]\right\\}.$
(S5)

Now, we consider the class of constraints in which
$\Omega_{1}^{2}(t)+\Omega_{2}^{2}(t)=\Omega_{\text{max}}^{2}$, so that the
Euler-Lagrange equation provides

$\ddot{\Omega}_{1}\left(\Omega_{1}^{2}-\Omega_{\text{max}}^{2}\right)-\Omega_{1}\dot{\Omega}^{2}_{1}=0,$
(S6)

whose the solution for the stable process reads

$\Omega_{1}(t)=\Omega_{\text{max}}\sin\left(\frac{\pi t}{2\tau}\right).$ (S7)

It is possible to show that for the unstable charging we have
$\Omega_{1}(t)\\!=\\!\Omega_{\text{max}}\cos(\pi t/(2\tau))$.

##  Appendix C The second Derivative test

Let us start by considering the functional $A[q]$ given by the equation

$\displaystyle A[q]=\int_{t_{0}}^{\tau}\mathcal{L}(q,\dot{q})dt.$ (S8)

We are interested in obtaining the critical “points” for $A[q]$. Since the
generalized coordinates and velocities, $q$ and $\dot{q}$, define a vector in
phase space of the system, it is reasonable to assume that the elements $q$ of
the vector space $\mathcal{F}$ satisfy

$\displaystyle
A=\\{q:[t_{0},\tau]\rightarrow\mathbbm{R}^{n}\leavevmode\nobreak\
|\leavevmode\nobreak\ q_{n}\in C^{2},q(t_{0})=q_{0},q(\tau)=q_{\tau}\\},$ (S9)

where $C^{2}$ is the class of twice-differentiable functions. The physical
meaning of the above equation is that the position and momentum of a particle
are functions with well-defined mathematical behavior. As we shall see, the
such condition for the QAB means the external fields that act on the system
are experimentally feasible. Because $A[q]$ is defined from a vector space,
the derivative of $A[q]$ is defined from the Gateaux’s derivative

$\displaystyle
D_{\eta}A[q]=\left.\frac{dA[q+\epsilon\eta]}{d\epsilon}\right|_{\epsilon=0}=\lim_{\epsilon\rightarrow
0}\frac{A[q+\epsilon\eta]-A[q]}{\epsilon},$ (S10)

where $\epsilon\in\mathbbm{R}$ and the parameter $\eta\in\mathcal{F}$,
satisfying the boundary conditions $\eta(t_{0})\\!=\\!\eta(\tau)\\!=\\!0$, are
the admissible $\eta$’s. Because $\eta$ is a vector, the derivative in Eq.
(S10) is also known as directional derivative along direction $\eta$. The
condition $\eta(t_{0})\\!=\\!\eta(\tau)\\!=\\!0$ needs to be satisfied in
order to guarantee that the solutions will keep the initial and final
conditions of the physical system. Again, in the QAB case such conditions are
associated with initial and final values of the fields used to drive the
system. Then, after some calculations we find

$\displaystyle
D_{\eta}A[q]=\sum_{j=1}^{n}\int_{t_{0}}^{\tau}\left[\frac{\partial\mathcal{L}}{\partial
q_{j}}-\frac{d}{dt}\left(\frac{\partial\mathcal{L}}{\partial\dot{q}_{j}}\right)\right]\eta_{j}dt,$
(S11)

where $q_{j}$ (resp. $\dot{q}_{j}$ and $\eta_{j}$) denotes the $j$-th
component of the generalized coordinate $q$ (resp. $\dot{q}$ and $\eta$). By
following the standard procedure, the critical “points” of $A[q]$ are obtained
by imposing $D_{\eta}A[q]\\!=\\!0$, and once such equality should be satisfied
for any admissible $\eta$, we find the well-known Euler-Lagrange (EL)
equations

$\displaystyle\frac{\partial\mathcal{L}}{\partial
q_{j}}-\frac{d}{dt}\left(\frac{\partial\mathcal{L}}{\partial\dot{q}_{j}}\right)=0.$
(S12)

In classical mechanics, the above equation sets the classical trajectory
followed by a system as stated by the stationary action principle, or
principle of least action in Hamilton’s formulation of the classical
mechanics. In context of QAB, the above equation leads us to a criticality
condition of the adiabaticity parameter, providing then a critical length of
the adiabatic trajectory followed by the system in its Hilbert space. The
solutions of Eq. (S12) allows us to predict the dynamics of the system in the
phase space, but it does not mean that this trajectory is the optimal one.
Such analysis is done by using the second derivative test of the functional
$A[q]$ as follows

$\displaystyle
D_{\eta}^{2}A[q]=D_{\eta}\left(D_{\eta}A[q]\right)=\left.\frac{d\left(D_{\eta}A[q+\epsilon\eta]\right)}{d\epsilon}\right|_{\epsilon=0}.$
(S13)

From Eq. (S12), it is important to highlight here that the parameter $\eta$
does not play any role in the system dynamics. However, we will now show how
such parameter is relevant when we compute the criticality of $A[q]$. To this
end, we expand the above equation, which leads to

$\displaystyle
D_{\eta}^{2}A[q]=\sum_{j=1}^{n}\int_{t_{0}}^{\tau}\left[\frac{\partial^{2}\mathcal{L}}{\partial
q_{j}^{2}}\eta^{2}_{j}+2\frac{\partial^{2}\mathcal{L}}{\partial
q_{j}\dot{q}_{j}}\eta_{j}\dot{\eta}_{j}+\frac{\partial^{2}\mathcal{L}}{\partial\dot{q}_{j}^{2}}\dot{\eta}^{2}_{j}\right]dt,$
(S14)

where we find a new condition on the parameter $\eta$ as
$\dot{\eta}(t_{0})\\!=\\!\dot{\eta}(\tau)\\!=\\!0$ needs to be satisfied. Now,
we remark that the value of $D_{\eta}^{2}A[q]$ is constrained to a suitable
choice of the parameter $\eta$. Due to the evident influence of $\eta$ on the
criticality of $A[q]$, we define
$\mathcal{A}\\!=\\!\\{\eta:[t_{0},\tau]\rightarrow\mathbbm{R}^{n},\eta(t_{0})\\!=\\!\eta(\tau)\\!=\\!0\\}$
as the set of admissible $\eta$’s in the criticality study for $A[q]$.
Therefore, given the solution $q_{\text{sol}}$ of the Eq. (S12), the Taylor’s
formula allows us to see that:

  * 1)

if $D_{\eta}^{2}A[q_{\text{sol}}]>0$ for any admissible $\eta$, then the
solution of $q_{\text{sol}}$ is (at least) a local minimum of
$A[q_{\text{sol}}]$

  * 2)

if $D_{\eta}^{2}A[q_{\text{sol}}]<0$ for any admissible $\eta$, then the
solution of $q_{\text{sol}}$ is (at least) a local maximum of
$A[q_{\text{sol}}]$

  * 3)

if there are admissible $\eta_{1}$ and $\eta_{2}$, so that
$D_{\eta}^{2}A[q_{\text{sol}}]<0$ for $\eta_{1}$ and $A[q_{\text{sol}}]>0$ for
$\eta_{2}$, then the solution of $q_{\text{sol}}$ is a “saddle point” of
$A[q]$.

In general, the analysis on all possible values of $\eta$ is a hard task, but
we can simplify the process by using its properties. For example, the boundary
conditions $\eta(t_{0})\\!=\\!\eta(\tau)\\!=\\!0$ implies that components of
$\eta$ can be written as periodic functions with semi-period $\tau$ and,
therefore, it can be described in terms of the Fourier series

$\displaystyle\eta_{n}=\sum_{n=1}^{\infty}\alpha_{n}\sin\left(n\pi
s\right),\leavevmode\nobreak\ \leavevmode\nobreak\ s=t/\tau\in[0,1].$ (S15)

###  C.1 Second Derivative test application

Here we study the aspects of critically of the quantum adiabatic
brachistochrone solution. To this end, the analysis is done by using the
second derivative test of the functional $A[q]$ as follows

$\displaystyle
D_{\eta}^{2}A[q]=D_{\eta}\left(D_{\eta}A[q]\right)=\left.\frac{d\left(D_{\eta}A[q+\epsilon\eta]\right)}{d\epsilon}\right|_{\epsilon=0}.$
(S16)

It is important to highlight here that the parameter $\eta$ does not develop
any role in the system dynamics. However, now we will show how such parameter
is relevant when we compute the critically of $A[q]$. To this, we develop the
above equation and it is possible to show that

$\displaystyle
D_{\eta}^{2}A[q]=\sum_{j=1}^{n}\int_{t_{0}}^{\tau}\left[\frac{\partial^{2}\mathcal{L}}{\partial
q_{j}^{2}}\eta^{2}_{j}+2\frac{\partial^{2}\mathcal{L}}{\partial
q_{j}\dot{q}_{j}}\eta_{j}\dot{\eta}_{j}+\frac{\partial^{2}\mathcal{L}}{\partial\dot{q}_{j}^{2}}\dot{\eta}^{2}_{j}\right]dt,$
(S17)

where we then find new conditions on the parameter $\eta$ as
$\dot{\eta}(t_{0})\\!=\\!\dot{\eta}(\tau)\\!=\\!0$, which need to be
satisfied. Now, we remark that the value of $D_{\eta}^{2}A[q]$ is constrained
to a suitable choice of the parameter $\eta$. Due to the evident influence of
$\eta$ on the critically of $A[q]$, we define

$\displaystyle\mathcal{A}=\\{\eta:[t_{0},\tau]\rightarrow\mathbbm{R}^{n},\eta(t_{0})=\eta(\tau)=\dot{\eta}(t_{0})=\dot{\eta}(\tau)=0\\},$
(S18)

as the set of admissible $\eta$’s in the criticality study for $A[q]$. Then,
we have

$\displaystyle D_{\eta}^{2}A[q]=\int_{0}^{\tau}\sum_{j=1}^{2}$
$\displaystyle\left[\Xi_{1}^{(j)}(t)\dot{\eta}^{2}_{j}(t)+\Xi_{2}^{(j)}(t)\dot{\eta}_{j}(t)\eta_{j}(t)\right.$
$\displaystyle+\left.\Xi_{3}^{(j)}(t)\eta^{2}_{j}(t)\right]dt,$ (S19)

where,

$\displaystyle\Xi_{1}^{(j)}(t)=\frac{\partial^{2}\mathcal{L}}{\partial\Omega_{j}^{2}},\leavevmode\nobreak\
\leavevmode\nobreak\
\Xi_{2}^{(j)}(t)=2\frac{\partial^{2}\mathcal{L}}{\partial\Omega_{j}\partial\dot{\Omega}_{j}},\leavevmode\nobreak\
\leavevmode\nobreak\
\Xi_{3}^{(j)}(t)=\frac{\partial^{2}\mathcal{L}}{\partial\dot{\Omega}^{2}_{j}}.$
(S20)

Now, given the boundary conditions on the function $\eta(t)$, we can write an
arbitrary function $\eta(t)$ as

$\displaystyle\eta_{j}(t)=\sum_{n=1}^{\infty}\alpha_{n}^{(j)}\sin\left(\frac{n\pi
t}{\tau}\right),\leavevmode\nobreak\ \leavevmode\nobreak\ t\in[0,\tau],$ (S21)

for arbitrary real numbers $\alpha_{n}$, so that

$\displaystyle\dot{\eta}_{j}(t)=\sum_{n=1}^{\infty}n\pi\alpha_{n}^{(j)}\cos\left(\frac{n\pi
t}{\tau}\right),\leavevmode\nobreak\ \leavevmode\nobreak\ t\in[0,\tau].$ (S22)

By using these two equations, we can rewrite $D_{\eta}^{2}A[q]$ as

$\displaystyle D_{\eta}^{2}A[q]=\sum_{j=1}^{2}\Lambda_{j},$ (S23)

in which

$\displaystyle\Lambda_{j}$
$\displaystyle=\sum_{n,k=1}^{\infty}\alpha_{n}^{(j)}\alpha_{k}^{(j)}\int_{0}^{\tau}\Xi_{1}^{(j)}(t)\sin\left(\frac{n\pi
t}{\tau}\right)\sin\left(\frac{k\pi t}{\tau}\right)dt$
$\displaystyle+\sum_{n,k=1}^{\infty}n\pi\alpha_{n}^{(j)}\alpha_{k}^{(j)}\int_{0}^{\tau}\Xi_{2}^{(j)}(t)\cos\left(\frac{n\pi
t}{\tau}\right)\sin\left(\frac{k\pi t}{\tau}\right)dt$
$\displaystyle+\sum_{n,k=1}^{\infty}kn\pi^{2}\alpha_{n}^{(j)}\alpha_{k}^{(j)}\int_{0}^{\tau}\Xi_{3}^{(j)}(t)\cos\left(\frac{n\pi
t}{\tau}\right)\cos\left(\frac{k\pi t}{\tau}\right)dt.$ (S24)

Then, from above equation we can study the criticality of the brachistochrone
solutions considered here.

###  C.2 Criticality of the braquistochrone in Eq. (S7)

By using the Eq. (S7) in Eqs. (S20), we find that

$\displaystyle\Xi_{1}^{(j)}(t)$
$\displaystyle=\pi^{2}\left[2+3(-1)^{j}\cos\left(\frac{\pi
t}{\tau}\right)\right],\leavevmode\nobreak\
\Xi_{2}^{(j)}(t)=4\pi(-1)^{j}\sin\left(\frac{\pi t}{\tau}\right),$

and $\Xi_{3}^{(j)}(t)\\!=\\!2$. Then, we have

$\displaystyle\Lambda_{j}$
$\displaystyle=\sum_{n,k=1}^{\infty}\alpha_{n}^{(j)}\alpha_{k}^{(j)}\pi^{2}\delta_{nk}+\sum_{n,k=1}^{\infty}kn\pi^{2}\alpha_{n}^{(j)}\alpha_{k}^{(j)}\delta_{nk}$
$\displaystyle=\sum_{n}^{\infty}\left(\alpha_{n}^{(j)}\pi\right)^{2}(1+n^{2}).$
(S25)

Therefore, we conclude that

$\displaystyle D_{\eta}^{2}A[q]$
$\displaystyle=\sum_{n}^{\infty}\left(\alpha_{n}^{(j)}\pi\right)^{2}(1+n^{2})\geq
0,\leavevmode\nobreak\ \leavevmode\nobreak\
\forall\;\alpha_{n}\in\mathbbm{R}.$ (S26)

This proves that the Brachistochrone given in Eq. (S7) is a minimum of the
functional adiabatic time.

##  Appendix D The Quantum Battery Charging process

In our work, the quantum battery is represented by the three-level Hamiltonian
$H_{0}=\sum_{n=1}^{2}\hbar\omega_{(n-1)n}\outerproduct{\epsilon_{i}}{\epsilon_{i}}$,
with $\omega_{01}<\omega_{12}<\omega_{23}$ Santos  _et al._ (2019). The
charging process is expressed as a time-dependent Hamiltonian that will drive
$H_{0}$ from the ground state, $\ket{\epsilon_{0}}$, to the second excited
one, $\ket{\epsilon_{2}}$,

$H(t)=\hbar\Omega_{1}(t)\outerproduct{\epsilon_{0}}{\epsilon_{1}}+\hbar\Omega_{2}(t)\outerproduct{\epsilon_{1}}{\epsilon_{2}}+h.c.,$
(S27)

where $\Omega_{1}$ and $\Omega_{2}$ are identified as the generalized
coordinates. Since they represent the physical Rabi frequencies, they will be
considered real functions. Note that we are considering resonance between
$\Omega_{i}$ and the energy gaps of the system.

The eigenvectors of $H(t)$ are

$\displaystyle\ket{E_{\pm}(t)}$
$\displaystyle=\frac{1}{\sqrt{2}}\left[\frac{\Omega_{1}(t)}{\Delta(t)}\ket{\epsilon_{0}}\pm\ket{\epsilon_{1}}+\frac{\Omega_{2}(t)}{\Delta(t)}\ket{\epsilon_{2}}\right],$
(S28) $\displaystyle\ket{E_{0}(t)}$
$\displaystyle=\frac{\Omega_{2}(t)}{\Delta(t)}\ket{\epsilon_{0}}-\frac{\Omega_{2}(t)}{\Delta(t)}\ket{\epsilon_{2}},$
(S29)

with the energies $E_{\pm}(t)=\pm\Delta(t)$ and $E_{0}(t)=0$, with
$\Delta^{2}(t)=\Omega_{1}^{2}(t)+\Omega_{2}^{2}(t)$ also being the minimum
energy gap between subsequent eigenvectors. We call $\ket{E_{\pm}}$ bright
states and $\ket{E_{0}}$ dark state.

Moreover, one can perform the adiabatic passage from the $\ket{\epsilon_{0}}$
to $\ket{\epsilon_{2}}$ in two distinct ways. Firstly, by setting the boundary
conditions, $\left\\{\Omega_{1}(0),\Omega_{2}(\tau)\right\\}\neq 0$ and
$\left\\{\Omega_{1}(\tau),\Omega_{2}(0)\right\\}=0$, the initial state
$\ket{\epsilon_{0}}$ is written as a symmetric superposition of the bright
states,

$\ket{\Psi(0)}=\ket{\epsilon_{0}}=\frac{\ket{E_{+}(0)}+\ket{E_{-}(0)}}{\sqrt{2}}.$
(S30)

Secondly, we can the set $\left\\{\Omega_{1}(\tau),\Omega_{2}(0)\right\\}\neq
0$ and $\left\\{\Omega_{1}(0),\Omega_{2}(\tau)\right\\}=0$, thereby having the
ground state expressed as the dark state,

$\ket{\Psi(0)}=\ket{\epsilon_{0}}=\ket{E_{0}(0)}.$ (S31)

In the main text, the population inversion process through above equation is
refereed as stable charging process, and through Eq. (S30) refers to an
unstable charging process. Let us examine by looking at the system ergotropy.

First, we calculate the ergotropy when performing an adiabatic evolution using
the Eq. (S30). By applying the Schrödinger evolution we find that the evolved
state is

$\begin{split}\ket{\psi^{\textnormal{ad}}_{\textnormal{bright}}(t)}&=\frac{1}{\sqrt{2}}\left\\{e^{-i\int
E_{+}(t^{\prime})dt^{\prime}}\ket{E_{+}(t)}+e^{-i\int
E_{-}(t^{\prime})dt^{\prime}}\ket{E_{-}(t)}\right\\}\\\ &=\frac{e^{-i\int
E_{+}(t^{\prime})dt^{\prime}}}{\sqrt{2}}\left[\frac{\Omega_{1}(t)}{\Delta(t)}\ket{\epsilon_{0}}+\ket{\epsilon_{1}}+\frac{\Omega_{2}(t)}{\Delta(t)}\ket{\epsilon_{2}}\right]\\\
&+\frac{e^{-i\int
E_{-}(t^{\prime})dt^{\prime}}}{\sqrt{2}}\left[\frac{\Omega_{1}(t)}{\Delta(t)}\ket{\epsilon_{0}}-\ket{\epsilon_{1}}+\frac{\Omega_{2}(t)}{\Delta(t)}\ket{\epsilon_{2}}\right],\end{split}$
(S32)

and, regrouping the terms,

$\begin{split}\ket{\psi^{\textnormal{ad}}_{\textnormal{bright}}(t)}&=\frac{\cos\left(\tilde{\theta}(t)\right)}{\Delta(t)}\left[\Omega_{1}(t)\ket{\epsilon_{0}}+\Omega_{2}(t)\ket{\epsilon_{2}}\right]\\\
&-i\sin\left(\tilde{\theta}(t)\right)\ket{\epsilon_{1}},\end{split}$ (S33)

where $\tilde{\theta}(t)=\int_{0}^{t}\Delta(t^{\prime})dt^{\prime}$, and we
used that our system satisfies the parallel transport condition, $\langle
E_{n}(t)|\dot{E}_{n}(t)\rangle=0$. Further, the system ergotropy when
performing the bright passage is

$\begin{split}C(t)=&\matrixelement{\psi^{\textnormal{ad}}(t)}{H_{0}}{\psi^{\textnormal{ad}}(t)}-\matrixelement{\epsilon_{0}}{H_{0}}{\epsilon_{0}}\\\
&=\frac{\cos^{2}\left(\tilde{\theta}(t)\right)}{\Delta^{2}(t)}\left[\omega_{01}\Omega_{1}^{2}(t)+\omega_{12}\Omega_{2}^{2}(t)\right]+\sin^{2}\left(\tilde{\theta}(t)\right)-\omega_{01}.\end{split}$
(S34)

From Eq. (S34) we can see that the stored energy has an oscillating term,
which means that the battery will not remain fully charged after the times
$t>\tau$.

On the other hand, we can use the stimulated Raman adiabatic passage protocol
in order to perform the population transfer. Considering an adiabatic
evolution stating with the dark state, Eq. (S31), we have the evolved state

$\ket{\Psi^{\textnormal{ad}}(t)}=\ket{E_{0}(t)}=\frac{\Omega_{2}(t)}{\Delta(t)}\ket{\epsilon_{0}}-\frac{\Omega_{1}(t)}{\Delta(t)}\ket{\epsilon_{2}},$
(S35)

where $\langle E_{0}(t)|\dot{E}_{0}(t)\rangle=0$. Hence, the system ergotropy
for this scenario reads

$\begin{split}C(t)&=\bra{\psi^{\textnormal{ad}}_{\textnormal{dark}}(t)}{H_{0}}\ket{\psi^{\textnormal{ad}}_{\textnormal{dark}}(t)}-\matrixelement{\epsilon_{i}}{H_{0}}{\epsilon_{1}}\\\
&=\frac{\omega_{12}\Omega_{1}^{2}(t)+\omega_{01}\Omega_{2}^{2}(t)}{{\Delta^{2}(t)}}-\omega_{01}.\end{split}$
(S36)

Therefore, when the system attains its maximum charge it will keep its charge.

We interpret the unstable behavior of the bright passage as relative to the
destructive and constructive superpositions introduced by the complex phases
$e^{-i\int_{0}^{t}E\pm(t^{\prime})dt^{\prime}}$.

##  Appendix E Self-discharge process

The decay dynamics of the system is given by

$\dot{\rho}(t)=\frac{1}{i\hbar}[H(t),\rho(t)]+\mathcal{L}_{\text{rel}}[\rho(t)]+\mathcal{L}_{\text{dep}}[\rho(t)],$
(S37)

where the superoperators $\mathcal{L}_{\text{rel}}[\bullet]$ and
$\mathcal{L}_{\text{dep}}[\bullet]$ describe the relaxation and dephasing
phenomena, respectively, which can be written as

$\displaystyle\mathcal{L}_{\text{rel}}[\bullet]$ $\displaystyle=\sum_{k\neq
j}\Gamma_{kj}\left[\sigma_{kj}\bullet\sigma_{jk}-\frac{1}{2}\\{\sigma_{kk},\bullet\\}\right],$
(S38a) $\displaystyle\mathcal{L}_{\text{dep}}[\bullet]$
$\displaystyle=\sum_{j=2,3}\gamma_{j}\left[\sigma_{jj}\bullet\sigma_{jj}-\frac{1}{2}\\{\sigma_{jj},\bullet\\}\right],$
(S38b)

where $\sigma_{kj}\\!=\\!|\varepsilon_{k}\rangle\langle\varepsilon_{j}|$ and
$\Gamma_{kj}\\!=\\!\Gamma_{jk}$. Building on the general definitions we have
introduced in Eqs. (S38), we would like to clarify two important points on the
characteristics of noise we consider in the rest of this work. First, the
relaxation processes we consider are only the sequential decays, meaning,
$\ket{\varepsilon_{3}}\\!\rightarrow\\!\ket{\varepsilon_{2}}$ and
$\ket{\varepsilon_{2}}\\!\rightarrow\\!\ket{\varepsilon_{1}}$ characterized by
the rates $\Gamma_{32}$ and $\Gamma_{21}$, respectively. Then, by writing
$\varrho_{nm}(t)$ as the instantaneous matrix elements of $\rho(t)$, we obtain
the set of differential equations for the diagonal elements as

$\dot{\varrho}_{11}(t)=-\Gamma_{10}\varrho_{11}(t)+\Gamma_{21}\varrho_{22}(t),\leavevmode\nobreak\
\leavevmode\nobreak\ \dot{\varrho}_{22}(t)=-\Gamma_{21}\varrho_{22}(t).$ (S39)

and for the off-diagonal elements as

$\displaystyle\dot{\varrho}_{nm,n\neq m}(t)=z_{nm}\varrho_{nm,n\neq m}(t),$
(S40)

where $z_{nm}$ is a complex number. As a first remark, we notice that for
initial states in which $\dot{\varrho}_{nm,n\neq m}(0)\\!=\\!0$, then we have
the solution $\dot{\varrho}_{nm,n\neq m}(t)\\!=\\!0$. so that we just need to
solve the set of equations given in Eq. (S39). We can use the Laplace
transform to solve the above equations. By denoting $\chi_{nn}(s)$ as the
Laplace transformation of $\varrho_{nn}(t)$, we find the system of linear
equations given by

$\displaystyle s\chi_{11}(s)$
$\displaystyle=-\Gamma_{10}\chi_{11}(s)+\Gamma_{21}\chi_{22}(s)+\varrho_{11}(0),$
$\displaystyle s\chi_{22}(s)$
$\displaystyle=-\Gamma_{21}\chi_{22}(s)+\varrho_{22}(0).$ (S41)

Now, we can isolate the Laplace variables $\chi_{nn}$ and find the equations,

$\begin{split}\chi_{11}(s)&=\frac{(s+\Gamma_{21})\varrho_{11}(0)+\Gamma_{21}\varrho_{22}(0)}{(s+\Gamma_{21})(s+\Gamma_{10})},\\\
\chi_{22}(s)&=\frac{\varrho_{22}(0)}{s+\Gamma_{21}}.\end{split}$ (S42)

Finally, we use the inverse transformation and get

$\begin{split}\varrho_{11}(t)&=\frac{1}{\Gamma_{10}-\Gamma_{21}}\left\\{e^{-t\Gamma_{21}}\Gamma_{21}\varrho_{22}(0)\right.\\\
&\left.+e^{-t\Gamma_{10}}\left[\Gamma_{10}\varrho_{11}(0)-\Gamma_{21}\left(\varrho_{11}(0)+\varrho_{22}(0)\right)\right]\right\\},\\\
\varrho_{22}(t)&=e^{-t\Gamma_{21}}\varrho_{22}(0).\end{split}$ (S43)

Therefore, by using the case in which the battery is fully charged initially,
where the initial conditions are $\varrho_{00}(0)=\varrho_{11}(0)=0$ and
$\varrho_{22}(0)=1$, one gets

$\displaystyle\varrho_{00}(t)$
$\displaystyle=1-\frac{\Gamma_{10}e^{-t\Gamma_{21}}-\Gamma_{21}e^{-t\Gamma_{10}}}{\Gamma_{10}-\Gamma_{21}},$
(S44a) $\displaystyle\varrho_{11}(t)$
$\displaystyle=\frac{\Gamma_{21}\left(e^{-t\Gamma_{21}}-e^{-t\Gamma_{10}}\right)}{\Gamma_{10}-\Gamma_{21}},$
(S44b) $\displaystyle\varrho_{22}(t)$ $\displaystyle=e^{-t\Gamma_{21}}.$
(S44c)

The amount of charge stored in the battery is measured by the ergotropy, which
is defined as

$\displaystyle\mathcal{E}(t)=\sum\nolimits_{i,n}^{N,N}\varrho_{n}(t)\epsilon_{i}\left(|\langle\varrho_{n}(t)|i\rangle|^{2}-\delta_{ni}\right),$
(S45)

with the ordered set of eigenenergies
$\epsilon_{1}\\!\leq\\!\epsilon_{2}\\!\leq\\!\cdots\\!\leq\\!\epsilon_{N}$
with eigenstates $\ket{n}$, of the internal battery Hamiltonian $H_{0}$ and
the instantaneous spectral decomposition
$\varrho_{1}(t)\\!\geq\\!\varrho_{2}(t)\\!\geq\\!\cdots\\!\geq\\!\varrho_{N}(t)$
of the instantaneous battery state $\rho(t)$, associated to eigenvectors
$\ket{\varrho_{n}(t)}$. Therefore, by using that
$\varrho_{0}<\varrho_{1}<\varrho_{2}$, we can see that

$\displaystyle\mathcal{E}(t)$
$\displaystyle=\left\\{\begin{matrix}\varepsilon_{1}(\varrho_{1}-\varrho_{0})+\varepsilon_{2}(\varrho_{2}-\varrho_{1})&\text{if}\leavevmode\nobreak\
\varrho_{2}\\!>\\!\varrho_{1}\\!>\\!\varrho_{0}\\\
(\varrho_{2}-\varrho_{1})(\varepsilon_{2}-\varepsilon_{1})&\text{if}\leavevmode\nobreak\
\varrho_{2}\\!>\\!\varrho_{0}\\!\geq\\!\varrho_{1}\\\
\varepsilon_{2}(\varrho_{2}-\varrho_{0})&\text{if}\leavevmode\nobreak\
\varrho_{0}\\!>\\!\varrho_{2}\\!>\\!\varrho_{1}\\\
0&\text{if}\leavevmode\nobreak\
\varrho_{0}\\!>\\!\varrho_{1}\\!>\\!\varrho_{2}\end{matrix}\right.,$ (S46)

where we simplify the notation $\varrho_{n}\\!=\\!\varrho_{nn}(t)$.