# New Metrics to Evaluate the Performance and Fairness of Personalized
Federated Learning

Siddharth Divi  Yi-Shan Lin  Habiba Farrukh  Z.Berkay Celik

###### Abstract

In Federated Learning (FL), the clients learn a single global model (FedAvg)
through a central aggregator. In this setting, the non-IID distribution of the
data across clients restricts the global FL model from delivering good
performance on the local data of each client. Personalized FL aims to address
this problem by finding a personalized model for each client. Recent works
widely report the average personalized model accuracy on a particular data
split of a dataset to evaluate the effectiveness of their methods. However,
considering the multitude of personalization approaches proposed, it is
critical to study the per-user personalized accuracy and the accuracy
improvements among users with an equitable notion of fairness. To address
these issues, we present a set of performance and fairness metrics intending
to assess the quality of personalized FL methods. We apply these metrics to
four recently proposed personalized FL methods, PersFL, FedPer, pFedMe, and
Per-FedAvg, on three different data splits of the CIFAR-10 dataset. Our
evaluations show that the personalized model with the highest average accuracy
across users may not necessarily be the fairest. Our code is available at
https://tinyurl.com/1hp9ywfa for public use.

Machine Learning, ICML

##  1 Introduction

Federated Learning (FL) is a distributed collaborative learning paradigm that
does not require centralized data storage in a single location. Instead, a
joint global predictor is learned by a network of participating users (McMahan
et al., 2016). FL is useful when the clients have sensitive data that they
cannot share with the participating entities due to privacy concerns. Yet,
despite its widespread applications, FL faces different challenges, such as
expensive communication, systems heterogeneity, statistical heterogeneity, and
privacy concerns (Li et al., 2020). Among these, statistical heterogeneity has
recently gained attention.

Statistical Heterogeneity Problem. Statistical heterogeneity means that the
clients have unbalanced and non-identical and independently distributed (non-
IID) data. This causes the global model (FedAvg) trained on non-IID data of
clients not to generalize well on the clients’ local data. Consider the task
of predicting the next word on a smartphone, which enables users to express
themselves faster. In such settings, a global model learned collaboratively
fails to give personalized suggestions to each user as each user has a unique
way of expressing themselves in applications, such as text messaging and
writing e-mails. On the other hand, learning a local model without user
collaboration might yield large model error due to the lack of data.

Personalized Federated Learning. The personalized learning methods aim to
address this problem by learning a personalized model for each client that
benefits from the data of the other clients while at the same time overcoming
the problem of statistical heterogeneity. These methods learn a personalized
model by extending meta-learning, local fine-tuning, multi-task learning,
model regularization, contextualization, and model interpolation (See Section
2).

These efforts often solely report the average accuracy of personalized models
across all users to measure their effectiveness. Yet, the average accuracy
does not capture the notion of per-user personalization, as per-user
performance is aggregated into a single (averaged) accuracy metric.
Furthermore, they do not measure the fairness of the personalized models from
an equitable notion, the concept that the users get similar improvements (Li
et al., 2019). The lack of fairness analysis makes it difficult to compare how
different personalized models perform on each user. Lastly, these works employ
different data-split strategies among users though they often use standard
datasets, such as MNIST and CIFAR-100. Overall, these issues make it difficult
for a uniform comparison of the effectiveness of each method.

Contributions. We present a set of metrics in two groups, five metrics for
performance and four metrics for fairness, to assess the quality of
personalized FL methods, supporting the existing evaluation metrics.
Performance metrics express how well the personalized model performs over each
user’s local and global model accuracy. On the other hand, fairness metrics
express an equitable notion that quantifies whether the personalized models
provide an equal improvement upon each user’s local and global models. The
metrics allow for quantitatively contrasting the trade-off between fairness
and per-user accuracy of the personalized models under different datasets and
data splits.

To motivate the need for new metrics for personalized FL, we have surveyed
$12$ recent works with the goal of studying their datasets, data splitting
strategies, and reported evaluation metrics. We found that these works often
use a different data splitting strategy on different datasets and solely
report the average accuracy improvement of the personalized model over the
global model. We evaluate the proposed performance and fairness metrics on
four recent personalized FL methods across three different data splits on the
CIFAR-10 dataset. Our evaluation results show that the personalized model with
the highest average accuracy across users need not necessarily be the fairest.

##  2 Related Work

There exist several recent methods proposed for personalization in FL. In
local fine-tuning, each user adapts a copy of the global FedAvg model to their
local data distribution through gradient-based meta-learning, transfer
learning (Pan & Yang, 2010) and domain-adaptation (Mansour et al., 2009). For
instance, persFL (Divi et al., 2021) combines the idea of generalized
distillation with optimal teacher models for each user to learn more
personalized models. Per-FedAvg (Fallah et al., 2020) uses Model-Agnostic
Meta-Learning (Finn et al., 2017) to learn a common initialization point for
each user during training, which is then subsequently adapted to each user’s
local data distribution. FedPer (Arivazhagan et al., 2019) views the network
as a combination of base and personalization layers where the base layers are
learned collaboratively, and the personalized layers are specific to each
user.

Previous works have also explored contextualization, which aims at learning a
model under different contexts. This problem is studied in the next character
recognition task (Hard et al., 2018), which needs access to features about the
context during the training phase. Local-Global Federated Averaging (LG-
FedAvg) (Liang et al., 2020) learns compact local representations on each
local and the global model across all users, i.e., an ensemble of local and
global models.

Models can also be personalized to each user by regularizing the differences
between the global and local models. pFedMe (Dinh et al., 2020) uses Moreau
envelopes (Moreau, 1963) as a regularization term to learn personalized models
and the global FL model parallelly. Federated Mutual Learning (FML) (Shen et
al., 2020) uses the non-IID nature of the data as a feature to learn
personalized models.

Lastly, model interpolation techniques focus on the mixture of the local and
the global models. In Adaptive Personalized FL (APFL) (Deng et al., 2020), an
optimal mixing parameter that controls the trade-off between local and global
models is integrated into the learning problem. A recent work (Mansour et al.,
2020) has proposed the use of user clustering, data interpolation, and model
interpolation for personalized models. In LotteryFL (Li et al., 2020), the
authors adopt a Lottery Ticket Network through the application of the Lottery
Ticket Hypothesis (Frankle & Carbin, 2019) to learn personalized models for
each user.

Table 1: Example scenario to motivate the need for alternative metrics in
Personalized FL.

| Local Model | FedAvg | Per-1 | Per-2 | Per-3 | Per-4
---|---|---|---|---|---|---
Datasplits | DS-1 | DS-1 | DS-1 | DS-2 | DS-3 | DS-1
Users
User0 | 73% | 78% | 82% | 79% | 76% | 75%
User1 | 71% | 75% | 82% | 74% | 72% | 72%
User2 | 61% | 69% | 82% | 75% | 68% | 68%
User3 | 55% | 71% | 75% | 79% | 82% | 96%
User4 | 69% | 74% | 74% | 78% | 85% | 97%
User5 | 65% | 77% | 75% | 89% | 87% | 75%
User6 | 74% | 80% | 77% | 74% | 78% | 76%
User7 | 68% | 82% | 77% | 76% | 79% | 78%
User8 | 75% | 85% | 78% | 79% | 79% | 77%
Avg. Acc. | 67.89% | 76.78% | 78% | 78.11% | 78.44% | 79.33%

Table 2: The analysis results of studied related personalized FL methods.

# | Method | Only FL metrics† | Fairness Analysis | Datasets‡ |  | Use of Custom
---
Datasplit∗
Comparison
LOCAL FINE-TUNING
$\mathtt{1}$ |  APFL (Deng et al., 2020) | ✓ | ✗ |  | (1), (2), (3), (6)
---
✓ |  | FedAvg, SCAFFOLD,
---
Per-FedAvg, pFedMe
$\mathtt{2}$ |  pFedMe (Dinh et al., 2020) | ✓ | ✗ | (1), (6) | ✓ | FedAvg, Per-FedAvg
$\mathtt{3}$ |  Per-FedAvg (Fallah et al., 2020) | ✓ | ✗ | (1), (3) | ✓ | FedAvg
$\mathtt{4}$ |  FedPer (Arivazhagan et al., 2019) | ✓ | ✗ |  | (3), (4), (5)
---
✓ | FedAvg
$\mathtt{5}$ |  | Three Approaches
---
for Personalization
(Mansour et al., 2020) ✓ | ✗ | (1), (2) | ✓ | FedAvg, AGNOSTIC
$\mathtt{6}$ |  | Personalized FedAvg
---
(Jiang et al., 2019) ✓ | ✗ | (2), (7) | ✓ | FedAvg
$\mathtt{7}$ |  FedMeta (Chen et al., 2018) | ✓ |  | ✓
---
| (7), (8), (9), (10)
---
✓ | FedAvg
MULTI-TASK LEARNING
$\mathtt{8}$ |  MOCHA (Smith et al., 2017) |  | ✓
---
✗ |  | (11), (12), (13)
---
✓ | FedAvg
CONTEXTUALIZATION
$\mathtt{9}$ |  LG-FedAvg (Liang et al., 2020) |  | ✓
---
| ✗
---
| (6), (1), (3), (14)
---
✓ | FedAvg, FEDPROX
MODEL REGULARIZATION BASED PERSONALIZATION
$\mathtt{10}$ |  | FedAMP
---
(Huang et al., 2021) ✓ | ✗ |  | (1), (15), (2), (4)
---
✓ |  | SCAFFOLD, APFL,
---
FedAvg, FEDPROX
$\mathtt{11}$ |  | FML
---
(Shen et al., 2020) ✓ | ✗ |  | (1), (3), (4)
---
✓ | FedAvg, FEDPROX
MODEL INTERPOLATION BASED PERSONALIZATION
$\mathtt{12}$ |  LotteryFL (Li et al., 2020) | ✓ | ✗ |  | (1), (3), (2)
---
✓ | FedAvg, LG-FedAvg

$\dagger$ Whether the personalization method only reports metrics in the FL
domain such as training loss, average validation accuracy, prediction error,
and the number of communication rounds. $\ddagger$ (1) MNIST, (2) EMNIST, (3)
CIFAR-10, (4) CIFAR-100, (5) FLICKR-AES, (6) Synthetic, (7) Shakespeare, (8)
FEMNIST, (9) Sentiment 140, (10) Industrial recommendation task, (11) Google
Glass (GLEAM), (12) Human Activity Recognition (HAR), (13) Vehicle Sensor,
(14) Mobile Assessment for Prediction of Suicide (MAPS), (15) FMNIST. $\ast$
Whether the personalization method uses a custom data split technique.

##  3 Problem Statement

We have studied $12$ recent personalized FL methods to identify their
datasets, data-split strategies, the metrics other than those commonly used in
the FL settings, the approaches they are compared to, and whether they perform
a fairness analysis (See Table 2). We observed two main issues in their
evaluation of personalized models, which hinder the interpretability of the
personalized FL methods. Below we provide an example scenario and present
these issues.

Motivating Example. We consider $\mathtt{9}$ users that collaboratively learn
a global model for the next-character prediction on the keypad of their mobile
phones. The dataset is distributed to each user to mimic the non-IID nature of
real-world data distributions based on a particular data-split strategy (DS-1,
DS-2, and DS-3). Each user learns a local model, a global model (FedAvg), and
a personalized model using four different personalized FL methods
(Per-1-Per-4). The personalized models are specific to each user and aim to
yield better accuracy than local and FedAvg models. Table 1 presents the
accuracy of local models, FedAvg model, and four personalized models on
different datasplits.

Missing Per-User Accuracy and Fairness Analysis. The personalized FL methods
often solely report the average accuracy of the personalized model across all
the users to measure their model effectiveness. In Table 1, we ask the
question of which personalization method yields the best performance in terms
of per-user personalized accuracy. In this example, Per-4 gives the highest
average accuracy of $\mathtt{79.3\%}$ on DS-1. However, upon closer
inspection, we observe that, with respect to the FedAvg model, Per-4 increases
the accuracy of only $2$ out of the $9$ users. This shows that the average
accuracy of the personalized model may fail to fully characterize the quality
of a method. Here another observation is that the best performing personalized
method, on average, may not necessarily lead to an improvement over the local
or global models across all users.

Through surveyed methods in Table 2, we observe that the methods commonly
adapt the evaluation metrics from FL, such as the training loss, average
validation accuracy, prediction error, number of communication rounds. This
means that the methods often do not report the per-user accuracy (Table 2
“Only FL metrics” column). Out of $12$ studied methods, only the FedMeta
approach performs a fairness analysis among personalized models of users by
reporting the per-user accuracy of their method.

Inconsistent Datasets and Data-splits. A data-split strategy is used in
personalized FL to split the dataset across users such that each receives a
fraction of the non-IID data. The data distribution among users is a crucial
feature in personalization because if the data is distributed IID, the
personalized model may not offer any benefits over FedAvg (Deng et al., 2020).
The personalized methods often use the same dataset yet the data-splits are
different. For instance, in Table 1, Per-1, and Per-4 are trained on DS-1,
whereas Per-2 is on DS-2 while Per-3 is on DS-3. The use of different data
splits on the same dataset makes it difficult to interpret the effectiveness
of personalized models. When personalized models are compared with each other,
each method often reports their results on a new (different) data split than
the one used in the compared approach. For example, Per-1 and Per-2 cannot be
directly compared as they are trained on different data-splits, DS-1 and DS-2.

Out of the $12$ studied personalized FL methods, we observe that $9$ methods
use standard datasets such as MNIST and CIFAR-10 ((1)-(4), (6), and (7), Table
2 “Datasets column”). Other $3$ methods use other datasets, such as FEMNIST
and Sentiment 140 ((5), and (8)-(15)). Additionally, the methods often use
different custom data splits on the datasets. We identified $10$ data-splits
in $12$ methods (Table 2 “Use of Custom Datasplit” column).

##  4 Evaluation Metrics

We present a set of metrics for the evaluation of personalized FL models from
the performance and fairness perspective. To quantify the per-user accuracy
improvements gained in terms of personalization, we compute the metrics on the
Quantum of Improvement (QoI) as follows:

$\mathtt{F_{i}=P_{i}-max(G_{i},L_{i})}$ (1)

where $\mathtt{P}$, $\mathtt{G}$, and $\mathtt{L}$ refer to the accuracy of
the personalized model, FedAvg and local model of the user $\mathtt{i}$, and
$\mathtt{F_{i}}$ refers to the QoI of user i. Henceforth, we will refer to the
QoI as $\mathtt{F}$ in all the equations.

The QoI can result in negative values. This means that the personalized method
decreases a user’s personalized model accuracy rather than the expected
increase over the local or global models. In such cases, the direct
application of evaluation metrics may misguide the interpretation of results.
Therefore, we split the QoI into two sets that contain the absolute QoI
values, i.e., a set of users ($\mathtt{U^{+}}$) who have positive QoI, and a
set of users ($\mathtt{U^{-}}$) who have negative QoI. We then apply the
introduced metrics below to both sets and interpret accordingly.

###  4.1 Performance Metrics

We introduce five performance metrics to express how well the personalized
model performs over each user’s local and global model.

Percentage of User-models Improved (PUI). PUI is the percentage of users who
experience an improvement over their local and global models. Ideally, a
personalized model is expected to improve the per-user accuracy of a maximal
set of users.

$\mathtt{PUI=\frac{COUNT(F_{i}>0)}{COUNT(U)}\times 100,i\in U(U:Users)}$ (2)

In a normal distribution, the mean is the best measure of the central
tendency. However, the median might be a better measure of central tendency
when this is not the case. We define median and average percentage of
improvement since the QoI distribution is not known apriori.

Median Percentage of Improvement (MPI). MPI is computed as
$\mathtt{Median(U^{+})}$ where $\mathtt{Median()}$ function returns the median
of its input, and $\mathtt{U^{+}}$ is the QoI of the set of users who obtained
an increase in their performance. A personalized model is expected to have a
high median of the QoI values among the users who experience an improvement.

Average Percentage of Improvement (API). API is the average percentage
improvement among the users who obtained an increase in their performance
($\mathtt{U^{+}}$).

$\mathtt{API=\frac{\sum_{i\in U^{+}}F_{i}}{len(U^{+})}}$ (3)

We observe that, in some scenarios, a personalization method does not yield an
improvement over users’ local and global accuracy. Thus,in such cases, it is
crucial to report the per-user accuracy decrease of the personalized model.
Because this decrease cannot be derived from the improvement metrics (MPI and
API), we define two metrics to quantify the decreased accuracy.

Median Percentage of Decrease (MPD). Similar to MPI, MPD is computed as
$\mathtt{Median(U^{-})}$.

Average Percentage of Decrease (APD). Similar to API, APD is the average
percentage decrease among the users whose performance is decreased
($\mathtt{U^{-}}$).

###  4.2 Fairness Metrics

We extend four metrics to evaluate personalization methods that yield better
results from a fairness perspective. For two personalization methods
$\mathtt{t}$ and $\mathtt{t^{\prime}}$, the QoI distribution among
$\mathtt{K}$ users $\mathtt{\\{F_{1}(t),\ldots,F_{K}(t)\\}}$ is more fair
(uniform) under technique $\mathtt{t}$ than $\mathtt{t^{\prime}}$ based on the
relation captured by the fairness metric.

Average Variance (AV). Average Variance (AV) (Li et al., 2019) is a measure of
the spread of data. For AV, the relation is extended to personalized models as
follows:

$\textbf{$\mathtt{AV}$}\mathtt{(F_{1}(t),...F_{K}(t))}<\textbf{$\mathtt{AV}$}\mathtt{(F_{1}(t^{\prime}),...F_{K}(t^{\prime}))}$
(4)

where, $\mathtt{AV(F_{1}(t),...F_{K}(t))}$ is computed as,

$\mathtt{AV=\frac{1}{K}\sum^{K}_{i=1}(F_{i}(t)-\bar{F}(t))^{2}}$ (5)

$\mathtt{\bar{F}(t)}$ in Equation 5 refers to the average QoI across all users
and is computed as,

$\mathtt{\bar{F}(t)=\frac{1}{K}\sum^{K}_{i=1}(F_{i}(t))}$ (6)

A lower AV means a higher fairness capability for a personalized method.

Cosine Similarity (CS). One of the drawbacks of AV is that the outliers may
cause skewing of the data. We measure Cosine Similarity (CS) (Li et al., 2019)
for two personalized methods to quantify the similarity between their QoI
distributions. For CS, the relation is computed as:

$\textbf{$\mathtt{CS}$}\mathtt{[(F_{1}(t),...F_{K}(t)),1]}\geq\textbf{$\mathtt{CS}$}\mathtt{[(F_{1}(t^{\prime}),...F_{K}(t^{\prime})),1]}$
(7)

where, $\mathtt{CS[(F_{1}(t),...F_{K}(t)),1]}$ is computed as follows.

$\mathtt{CS=\frac{\frac{1}{K}\sum^{K}_{i=1}F_{i}(t)}{\sqrt{\frac{1}{K}\sum^{K}_{i=1}F^{2}_{i}(t)}}}$
(8)

A higher CS means a higher fairness capability for a personalized method.

Entropy. One of the drawbacks of CS is that the magnitude of the QoI values is
not taken into consideration, yet only their orientation is considered. For
this reason, we extend Entropy (Li et al., 2019) as follows:

$\textbf{$\mathtt{Entropy}$}\mathtt{(F_{1}(t),...F_{K}(t))}\geq\textbf{$\mathtt{Entropy}$}\mathtt{(F_{1}(t^{\prime}),...F_{K}(t^{\prime}))}$
(9)

where $\mathtt{Entropy}$ is defined as follows.

$\mathtt{Entropy=-\sum^{K}_{i=1}\frac{F_{i}(t)}{\sum^{K}_{i=1}F_{i}(t)}log(\frac{F_{i}(t)}{\sum^{K}_{i=1}F_{i}(t)})}$
(10)

A higher Entropy means a higher fairness capability for a personalized method.

Jain’s index (JI). JI is widely studied fairness measure in computer networks
and resource allocation to identify the underutilized channels (Jain et al.,
1998). We extend it for personalization as follows:

$\mathtt{JI=\frac{[\sum^{K}_{i=1}F_{i}(t)]^{2}}{K\sum^{K}_{i=1}F_{i}(t)^{2}}}$
(11)

A higher JI means a higher fairness capability for a personalized method.

##  5 Experimental Results

Table 3: Per-user accuracy for the different personalized FL methods on the
different data splits of the CIFAR-10 dataset.

| FedAvg | PersFL | FedPer | pFedMe | Per-FedAvg
---|---|---|---|---|---
Users | DS-1 | DS-2 | DS-3 | DS-1 | DS-2 | DS-3 | DS-1 | DS-2 | DS-3 | DS-1 | DS-2 | DS-3 | DS-1 | DS-2 | DS-3
User 0 | 43.6 | 50.8 | 48.2 | 85.5 | 61.3 | 94.5 | 83.2 | 57.2 | 93.1 | 74.3 | 61.7 | 94.2 | 69.2 | 58.2 | 92.5
User 1 | 50.9 | 45.3 | 40.8 | 78.2 | 56.9 | 79.9 | 74.5 | 51.4 | 77 | 64.1 | 57.3 | 79.2 | 65 | 56.1 | 73.7
User 2 | 44.5 | 49.4 | 31.2 | 82.2 | 57.3 | 68.9 | 78.4 | 53.2 | 64.7 | 69.6 | 57.3 | 64.4 | 67.9 | 57.2 | 64.6
User 3 | 51.3 | 46.5 | 31.5 | 82.1 | 60.1 | 82.5 | 77.9 | 55.4 | 77.5 | 69.4 | 58.9 | 72.5 | 67.2 | 58.8 | 77
User 4 | 45.3 | 50.8 | 49.4 | 79.4 | 59.1 | 82.5 | 76.1 | 54.4 | 78.6 | 67.2 | 59.5 | 80 | 65.8 | 59.4 | 82.5
User 5 | 44.2 | 50.7 | 47.8 | 77.1 | 61.9 | 79.9 | 72.1 | 57.6 | 76.9 | 62.1 | 60.6 | 77.5 | 62.7 | 59.3 | 77.9
User 6 | 35.8 | 46.5 | 56.8 | 75.6 | 58.9 | 90.3 | 70.9 | 53.3 | 88.5 | 59.9 | 58.6 | 88.3 | 58.2 | 57.7 | 89.1
User 7 | 37.9 | 49.5 | 58.1 | 79.7 | 61.2 | 87.6 | 75.6 | 56.9 | 84.6 | 65.8 | 60.2 | 84 | 64.3 | 58 | 83.7
User 8 | 47.7 | 48.7 | 49 | 87.7 | 60 | 76.7 | 84.4 | 57.5 | 73.5 | 75.5 | 59.6 | 66.9 | 72.5 | 55.8 | 64.1
User 9 | 48.6 | 49.1 | 53.5 | 91 | 58.8 | 80.3 | 88.5 | 54.3 | 77.9 | 81.7 | 58.3 | 73.8 | 76.6 | 55.3 | 72.7
Avg. Acc. | 45 | 48.7 | 46.6 | 81.9 | 59.6 | 82.3 | 78.2 | 55.1 | 79.2 | 69 | 59.2 | 78.1 | 66.9 | 57.6 | 77.8
Std Dev | 5.1 | 2 | 9.4 | 4.9 | 1.7 | 7.2 | 5.6 | 2.1 | 7.9 | 6.7 | 1.4 | 9.2 | 5.1 | 1.5 | 9.5

Table 4: The performance metrics applied to the QoI of different personalized
FL methods on CIFAR-10 dataset.

| PersFL | FedPer | pFedMe | PerFed
---|---|---|---|---
Metrics | DS-1 | DS-2 | DS-3 | DS-1 | DS-2 | DS-3 | DS-1 | DS-2 | DS-3 | DS-1 | DS-2 | DS-3
| PUI
---
100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100
| MPI
---
38.74 | 11.23 | 33.29 | 34.53 | 6.59 | 30.43 | 24.58 | 10.81 | 31.06 | 22.9 | 8.55 | 32.65
| API
---
36.87 | 10.83 | 35.67 | 33.18 | 6.41 | 32.59 | 23.98 | 10.47 | 31.44 | 21.95 | 8.85 | 31.17
| $\texttt{AA}^{\dagger}$
---
81.85 | 59.56 | 82.29 | 78.16 | 55.13 | 79.21 | 68.95 | 59.19 | 78.07 | 66.93 | 57.57 | 77.79

$\texttt{AA}^{\dagger}$ is the average accuracy across all users.

We evaluate four recently introduced personalization methods, PersFL (Divi et
al., 2021), FedPer (Arivazhagan et al., 2019), pFedMe (Dinh et al., 2020), and
Per-FedAvg (Fallah et al., 2020), to evaluate their performance and fairness
through introduced metrics.

###  5.1 Experimental Setting

We use CIFAR-10 dataset on three data splits with a total of $\mathtt{10}$
clients. CIFAR-10 includes $\mathtt{32\times 32}$ color images with
$\mathtt{10}$ classes and $\mathtt{60,000}$ instances. We use a CNN-based
model with two 2-D convolutional layers separated by a MaxPool layer between
them and followed by three fully connected (FC) layers. The fully connected
layers have $400$, $120$, and $84$ hidden neurons. We use ReLu activations
after each layer except the last FC layer.

We make three assumptions in line with the assumptions made in personalized FL
literature. First, we assume that all clients are active during the entire
training phase to speed up the model convergence. Second, each client’s data
does not change between the global aggregations. Lastly, the hyper-parameters,
batch-size ($\mathtt{B}$), and local epochs ($\mathtt{E}$), are invariant
among the simulated clients. We conduct all experiments with a
$\mathtt{60\%}$-$\mathtt{20\%}$-$\mathtt{20\%}$ train-validation-test splits.

The experiments are run with Python $\mathtt{3.7}$, and a PyTorch version of
$\mathtt{v1.3.1}$ on an NVIDIA Tesla T4 GPU with $\mathtt{16GB}$ memory with a
CUDA version of $10.0$.

Data-splitting Strategies. We split the data among users following three
different strategies used in the literature.

In DS-1, each user has the same total number of samples but may have different
classes and a different number of samples per class. The statistical
heterogeneity is varied by tuning the parameter $\mathtt{k}$, which controls
the number of overlapping classes between each user (Arivazhagan et al.,
2019). For example, $\mathtt{k=4}$ corresponds to a highly non-identical data
partition, whereas $\mathtt{k=10}$ corresponds to a highly identical data
partition across the participating users. We set $\mathtt{k}$ to 4 to have
non-IID data across users.

In DS-2 (Yu et al., 2020), all users have samples from all classes, but the
number of samples per class they have is different, and hence the total number
of samples per user is also different across users. In order to simulate a
non-IID distribution, we assign samples from each class to the users using a
Dirichlet distribution with $\mathtt{\alpha=0.9}$, following the previous work
(Hsu et al., 2019). Each class is parameterized by a vector $\mathtt{q}$ where
$\mathtt{q\geq 0,i\in[1,N]}$ is sampled from a Dirichlet distribution with
parameters $\mathtt{\alpha}$ and $\mathtt{p}$. The parameter $\mathtt{p}$ is
the prior class distribution over the classes, and $\mathtt{\alpha}$ is the
concentration parameter that controls the data similarity among the users. If
$\mathtt{\alpha\rightarrow\infty}$, all users have an identical distribution
to the prior. If $\mathtt{\alpha\rightarrow 0}$, each user only has samples
from one class randomly chosen.

In DS-3, each user has two of the ten class labels. Additionally, the total
number of samples per user is different, i.e., the users do not have the same
number of total samples. The samples assigned to users are drawn from a log-
normal distribution with the parameters $\mathtt{\mu=0}$ and
$\mathtt{\sigma=2}$ (Dinh et al., 2020). The parameters $\mathtt{\mu}$ and
$\mathtt{\sigma}$ correspond to the underlying normal distribution from which
we draw samples.

###  5.2 Experimental Results

We evaluate four personalized learning methods to answer the following two
questions:

  1. 1.

Which personalization method performs the best in terms of per-user
personalized accuracy across all users?

  2. 2.

Which algorithm is the fairest?

Table 3 presents the per-user accuracy of personalized models and Fed-Avg
across different data splits of CIFAR-10.

(a) DS-1

(b) DS-2

(c) DS-3

Figure 1: Density plots of QoI across all data splits of CIFAR-10 for each
personalized FL method.

####  5.2.1 Performance Metrics

We use the average accuracy (avg-acc) in conjunction with introduced metrics
to make a more informed decision on evaluating personalized approaches instead
of solely using avg-acc. Table 4 shows the performance metrics applied to the
QoI of the different personalization methods across different data splits of
CIFAR-10. We report a subset of the performance metrics (PUI, MPI, and API)
since all the personalization methods that we have surveyed lead to an
increase in the personalized per-user accuracy in our experiments. This means
that the PUI for each personalization method yields $\mathtt{100\%}$ with none
of the users experiencing a decrease over their local and global models.

In terms of MPI and API on DS-1, PersFLperforms the best at $\mathtt{38.74\%}$
and $\mathtt{36.87\%}$. On DS-2, PersFLand pFedMe yield the highest MPI at
$\mathtt{11.23\%}$ and $\mathtt{10.81\%}$. Similarly, these methods lead to an
API of $\mathtt{10.83\%}$ and $\mathtt{10.47\%}$. We observe that on DS-3,
PersFLhas the highest MPI and API, at $\mathtt{33.29\%}$ and
$\mathtt{35.67\%}$. In terms of avg-acc, PersFLachieves the highest accuracy
$\mathtt{81.85\%}$ on DS-1. On DS-2, PersFLand pFedMe are the best performing
at $\mathtt{59.56\%}$, and $\mathtt{59.19\%}$. Lastly, on DS-3, PersFLis the
top-performing method at $\mathtt{82.29\%}$.

Figure 2: Fairness metrics applied to the personalization methods across all
data splits of the CIFAR-10 dataset.

Figure 1 shows the density plots of the QoI for all users across data splits
of the CIFAR-10 dataset. The peaks in a density plot show the values
concentrated over an interval where the x-axes of the plots show the QoI
intervals and the y-axes show the density. We observe on DS-1 that the most
values for PersFLare concentrated around a higher value in the range of QoI
values. On DS-2, the peak of PersFLis associated with a higher QoI interval
compared to pFedMe. However, the distribution of pFedMe is more normal
compared to PersFLas PersFLhas an additional peak corresponding to the QoI
interval of $\mathtt{8}$. On DS-3, the QoI interval corresponding to the peaks
of PersFL, pFedMe, and Per-FedAvg gives almost the same QoI value, where their
QoI is concentrated.

####  5.2.2 Fairness Metrics

We apply fairness metrics across all the data splits of CIFAR-10, as shown in
Figure 2. The x-axis represents the different personalization methods, and the
y-axis is the different fairness metrics (AV, CS, Entropy, and JI) applied to
these methods. We observe in Figure 2 that the trends in metrics are similar
across the different data splits. The main reason is that QoI distribution of
personalized methods for the CIFAR-10 dataset is identical to each other.
However, different trends can be observed with the application of methods to
different datasets. We note that for a method to be fair, it also needs to
give a reasonable performance in terms of the per-user personalization
accuracy.

In Figure 2, Per-FedAvg gives the lowest AV amongst all methods. A lower AV
means better per-user personalization accuracy distribution as the method
yields more uniform accuracy than the other algorithms. For other three
metrics (CS, Entropy, and JI), PersFLperforms the best. The higher the value
of these metrics, the fairer QoI distribution. Therefore, on DS-1, PersFLis
the fairest amongst the evaluated personalization methods.

On DS-2, pFedMe has the least AV, and the highest value for the other three
metrics. This confirms that it generalizes per-user personalized accuracy
across all the users. On DS-2 in Table 4, the per-user personalization
accuracy of pFedMe is similar to that of PersFLfrom a performance perspective.
At the same time, pFedMe is relatively fairer than PersFL, therefore pFedMe is
the fairest algorithm on DS-2.

Lastly, on DS-3, from Figure 2, FedPer has the lowest AV. However, it is not
the fairest algorithm according to the other fairness metrics. Among the other
three metrics, PersFLgives the highest values.

##  6 Conclusions

We introduce and adapted new metrics for performance and fairness,
complementing the widely reported average personalized model accuracy to
evaluate the personalization methods. We employed these metrics on four recent
personalized FL methods across three different data splits on the CIFAR-10
dataset. Our evaluation results show that the personalized model that gives
the highest average accuracy across users is not necessarily the fairest.

## References

  * Arivazhagan et al. (2019) Arivazhagan, M. G., Aggarwal, V., Singh, A. K., and Choudhary, S.  Federated learning with personalization layers.  _CoRR_ , abs/1912.00818, 2019.  URL http://arxiv.org/abs/1912.00818.
  * Chen et al. (2018) Chen, F., Dong, Z., Li, Z., and He, X.  Federated meta-learning for recommendation.  _CoRR_ , abs/1802.07876, 2018.  URL http://arxiv.org/abs/1802.07876.
  * Deng et al. (2020) Deng, Y., Mahdi Kamani, M., and Mahdavi, M.  Adaptive Personalized Federated Learning.  _arXiv e-prints_ , art. arXiv:2003.13461, March 2020.
  * Dinh et al. (2020) Dinh, C. T., Tran, N. H., and Dung Nguyen, T.  Personalized Federated Learning with Moreau Envelopes.  _arXiv e-prints_ , art. arXiv:2006.08848, June 2020.
  * Divi et al. (2021) Divi, S., Farrukh, H., and Celik, B.  Unifying distillation with personalization in federated learning, 2021\.
  * Fallah et al. (2020) Fallah, A., Mokhtari, A., and Ozdaglar, A.  Personalized Federated Learning: A Meta-Learning Approach.  _arXiv e-prints_ , art. arXiv:2002.07948, February 2020.
  * Finn et al. (2017) Finn, C., Abbeel, P., and Levine, S.  Model-Agnostic Meta-Learning for Fast Adaptation of Deep Networks.  _arXiv e-prints_ , art. arXiv:1703.03400, March 2017.
  * Frankle & Carbin (2019) Frankle, J. and Carbin, M.  The lottery ticket hypothesis: Finding sparse, trainable neural networks.  In _International Conference on Learning Representations_ , 2019.  URL https://openreview.net/forum?id=rJl-b3RcF7.
  * Hard et al. (2018) Hard, A., Rao, K., Mathews, R., Beaufays, F., Augenstein, S., Eichner, H., Kiddon, C., and Ramage, D.  Federated learning for mobile keyboard prediction.  _CoRR_ , abs/1811.03604, 2018.  URL http://arxiv.org/abs/1811.03604.
  * Hsu et al. (2019) Hsu, T.-M. H., Qi, H., and Brown, M.  Measuring the Effects of Non-Identical Data Distribution for Federated Visual Classification.  _arXiv e-prints_ , art. arXiv:1909.06335, September 2019.
  * Huang et al. (2021) Huang, Y., Chu, L., Zhou, Z., Wang, L., Liu, J., Pei, J., and Zhang, Y.  Personalized cross-silo federated learning on non-iid data, 2021.
  * Jain et al. (1998) Jain, R., Chiu, D., and Hawe, W.  A quantitative measure of fairness and discrimination for resource allocation in shared computer systems.  _CoRR_ , cs.NI/9809099, 1998.  URL https://arxiv.org/abs/cs/9809099.
  * Jiang et al. (2019) Jiang, Y., Konecný, J., Rush, K., and Kannan, S.  Improving federated learning personalization via model agnostic meta learning.  _CoRR_ , abs/1909.12488, 2019.  URL http://arxiv.org/abs/1909.12488.
  * Li et al. (2020) Li, A., Sun, J., Wang, B., Duan, L., Li, S., Chen, Y., and Li, H.  LotteryFL: Personalized and Communication-Efficient Federated Learning with Lottery Ticket Hypothesis on Non-IID Datasets.  _arXiv e-prints_ , art. arXiv:2008.03371, August 2020.
  * Li et al. (2019) Li, T., Sanjabi, M., and Smith, V.  Fair resource allocation in federated learning.  _CoRR_ , abs/1905.10497, 2019.  URL http://arxiv.org/abs/1905.10497.
  * Li et al. (2020) Li, T., Sahu, A. K., Talwalkar, A., and Smith, V.  Federated learning: Challenges, methods, and future directions.  _IEEE Signal Processing Magazine_ , 37(3):50–60, May 2020.  ISSN 1558-0792.  doi: 10.1109/msp.2020.2975749.  URL http://dx.doi.org/10.1109/MSP.2020.2975749.
  * Liang et al. (2020) Liang, P. P., Liu, T., Liu, Z., Salakhutdinov, R., and Morency, L.  Think locally, act globally: Federated learning with local and global representations.  _CoRR_ , abs/2001.01523, 2020.  URL http://arxiv.org/abs/2001.01523.
  * Mansour et al. (2009) Mansour, Y., Mohri, M., and Rostamizadeh, A.  Domain adaptation: Learning bounds and algorithms.  _CoRR_ , abs/0902.3430, 2009.  URL http://arxiv.org/abs/0902.3430.
  * Mansour et al. (2020) Mansour, Y., Mohri, M., Ro, J., and Theertha Suresh, A.  Three Approaches for Personalization with Applications to Federated Learning.  _arXiv e-prints_ , art. arXiv:2002.10619, February 2020.
  * McMahan et al. (2016) McMahan, H. B., Moore, E., Ramage, D., and y Arcas, B. A.  Federated learning of deep networks using model averaging.  _CoRR_ , abs/1602.05629, 2016.  URL http://arxiv.org/abs/1602.05629.
  * Moreau (1963) Moreau, J.-J.  Propriétés des applications ‘prox’.  _Compte Rendus Acad. Sci._ , (256):1069–1071, 1963.
  * Pan & Yang (2010) Pan, S. J. and Yang, Q.  A survey on transfer learning.  _IEEE Trans. on Knowl. and Data Eng._ , 22(10):1345–1359, October 2010.  ISSN 1041-4347.  doi: 10.1109/TKDE.2009.191.  URL https://doi.org/10.1109/TKDE.2009.191.
  * Shen et al. (2020) Shen, T., Zhang, J., Jia, X., Zhang, F., Huang, G., Zhou, P., Kuang, K., Wu, F., and Wu, C.  Federated mutual learning, 2020.
  * Smith et al. (2017) Smith, V., Chiang, C.-K., Sanjabi, M., and Talwalkar, A. S.  Federated multi-task learning.  In Guyon, I., Luxburg, U. V., Bengio, S., Wallach, H., Fergus, R., Vishwanathan, S., and Garnett, R. (eds.), _Advances in Neural Information Processing Systems_ , volume 30, pp. 4424–4434. Curran Associates, Inc., 2017.  URL https://proceedings.neurips.cc/paper/2017/file/6211080fa89981f66b1a0c9d55c61d0f-Paper.pdf.
  * Yu et al. (2020) Yu, T., Bagdasaryan, E., and Shmatikov, V.  Salvaging federated learning by local adaptation.  _CoRR_ , abs/2002.04758, 2020.  URL https://arxiv.org/abs/2002.04758.


# Hybrid quantum thermal machines with dynamical couplings

Fabio Cavaliere  Dipartimento di Fisica, Università di Genova, Via Dodecaneso
33, 16146 Genova, Italy  CNR-SPIN, Via Dodecaneso 33, 16146 Genova, Italy
Luca Razzoli  Center for Nonlinear and Complex Systems, Dipartimento di
Scienza e Alta Tecnologia, Università degli Studi dell’Insubria, via Valleggio
11, 22100 Como, Italy  Istituto Nazionale di Fisica Nucleare, Sezione di
Milano, via Celoria 16, 20133 Milano, Italy  Matteo Carrega  CNR-SPIN, Via
Dodecaneso 33, 16146 Genova, Italy  Giuliano Benenti
<EMAIL_ADDRESS>Center for Nonlinear and Complex Systems,
Dipartimento di Scienza e Alta Tecnologia, Università degli Studi
dell’Insubria, via Valleggio 11, 22100 Como, Italy  Istituto Nazionale di
Fisica Nucleare, Sezione di Milano, via Celoria 16, 20133 Milano, Italy  NEST,
Istituto Nanoscienze-CNR, I-56126 Pisa, Italy  Maura Sassetti  Dipartimento di
Fisica, Università di Genova, Via Dodecaneso 33, 16146 Genova, Italy  CNR-
SPIN, Via Dodecaneso 33, 16146 Genova, Italy

###### Abstract

SUMMARY: Quantum thermal machines can perform useful tasks, such as delivering
power, cooling, or heating. In this work, we consider hybrid thermal machines,
that can execute more than one task simultaneously. We characterize and find
optimal working conditions for a three-terminal quantum thermal machine, where
the working medium is a quantum harmonic oscillator, coupled to three heat
baths, with two of the couplings driven periodically in time. We show that it
is possible to operate the thermal machine efficiently, in both pure and
hybrid modes, and to switch between different operational modes simply by
changing the driving frequency. Moreover, the proposed setup can also be used
as a high-performance transistor, in terms of output–to–input signal and
differential gain. Due to its versatility and tunability, our model may be of
interest for engineering thermodynamic tasks and for thermal management in
quantum technologies.

## Graphical abstract

## Highlights

A highly flexible and tunable hybrid thermal machine.

High-performance transistor, in terms of output–to–input signal and
differential gain.

## Subject areas

Physics; Quantum Technologies.

##  I Introduction

The fast–paced development of nanoscale technologies is propelling
thermodynamics into a new golden era. Just as thermodynamics started in the
1800s spurred by the industrial revolution [1], in the same way the
miniaturization of devices, and in particular the emergence of new quantum
technologies, is pushing the field of thermodynamics into new applied and
fundamental challenges [2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]. Basic
questions like the same definitions of work and heat in small systems [16, 11,
12], where quantum mechanics inevitably comes into play, have to be
reconsidered with care and are vital to properly characterize the working of
nanoscale thermal machines. The minimum temperature achievable in a finite
time in small system [17, 18, 19, 20] is not only a fundamental question
related to the third law of thermodynamics but also a practical question for
cryogenic applications [10, 13] and in the initialization of qubits in a
quantum computer [21, 22, 23]. The development of protocols for heat flow
control [24, 13] is the key point to evacuate heat and cool hot spots in
nanodevices. These are just some of the several fundamental and practical
challenges facing thermodynamics. More generally, it has been argued [25] that
a ”quantum energy initiative”, connecting quantum thermodynamics, quantum
information science, quantum physics, and engineering, is needed to develop
novel, energy-efficient, sustainable quantum technologies.

There is increasing interest in heat engines where a quantum system is coupled
to more than just two reservoirs. For instance, in the cooling by heating
phenomenon [26, 27, 28] the coupling to a third, photonic reservoir, can be
used to extract heat from a cold metal, the refrigeration process being
powered by absorption of photons. It has also been shown that a similar setup,
with electron transport via a nanostructure bridging two conducting leads and
also connected to a third, phonon bath, can be favourable for thermoelectric
energy conversion [29]. Moreover, it has been shown that a third, electronic
terminal can improve both the output power and the efficiency at maximum power
[30, 31, 32]. In general, a multi-terminal device offers enhanced flexibility
that might be useful, for instance, to separate the currents, with charge and
heat flowing to different reservoirs [33, 34, 35]. Intriguingly, a three-
terminal device can work as a hybrid machine, which performs simultaneously
multiple tasks [36, 37], for instance the heat from a phonon bath could be
used to cool one electron terminal and to produce power. On the other hand,
three-terminal configurations are standard in the study of thermal
transistors, a device whose development is essential for an effective thermal
management at the nanoscale [38, 39, 40].

The above studies of multitasking thermal machines considered stationary
conditions, that is, time-independent Hamiltonians and system-bath couplings.
On the other hand, driving the system and/or the system-bath couplings offers
enhanced design flexibility, and the possibility to switch from some
thermodynamic tasks to others simply by tuning the driving frequency. Here, we
consider as a working medium (WM) the paradigmatic model of a quantum harmonic
oscillator (QHO), which represents a basic building block in several quantum
technology platforms [41, 42, 43, 44, 15, 23], coupled to three thermal
reservoirs. We show that, by periodically modulating the couplings in a
suitable way (see below for details and a physical illustration of our model),
it is possible to efficiently run the thermal machine in a pure operation mode
(engine, refrigerator, or heat pump), as well as in a hybrid mode, combining
two of the above. We also show that it is possible to switch between different
operational modes by changing the driving frequency. In addition, we
demonstrate that our model can be used as a high-performance transistor, in
terms of both output–to–input signal and of differential gain. Finally, we
show that the performance of the three-terminal transistor is much better than
that achievable with the analogous two-terminal device with modulated
coupling.

##  II Model and thermodynamic quantities

###  II.1 Three–terminal thermal machine with dynamical couplings

To study a driven multi-terminal setup that can simultaneously perform several
thermodynamic tasks, we focus on the simplest extension beyond the two-
terminal paradigm. That is, we consider a three–terminal quantum thermal
machine, as sketched in Fig. 1(a), where the WM is connected to three
reservoirs kept at temperatures $T_{h}>T_{m}>T_{c}$. Here for clarity we have
introduced the subscripts $h$ (”hot”), $m$ (”middle”) and $c$ (”cold”). The
total Hamiltonian is

$H(t)=H_{{\rm WM}}+\sum_{\nu=h,m,c}\big{[}H_{\nu}+H_{{\rm
int},\nu}(t)\big{]}~{}.$ (1)

where

$H_{{\rm WM}}=\frac{p^{2}}{2M}+\frac{1}{2}M\omega^{2}_{0}x^{2},$ (2)

with $M$ and $\omega_{0}$ the mass and the characteristic frequency of the
QHO, respectively (here and below we set $\hbar=k_{{\rm B}}=1$). To model the
$\nu$-th reservoir we adopt a microscopic description of a thermal bath with
many degrees of freedom by using the so-called Caldeira-Leggett framework [15,
45, 46, 47, 48]: Each reservoir Hamiltonian is described in terms of a
collection of independent harmonic oscillators,

$H_{{\nu}}=\sum_{k=1}^{\infty}\quantity[\frac{P^{2}_{k,\nu}}{2m_{k,\nu}}+\frac{m_{k,\nu}\omega^{2}_{k,\nu}X^{2}_{k,\nu}}{2}],$
(3)

with $X_{k,\nu}$ and $P_{k,\nu}$ the position and momentum operators of the
$k$-th oscillator of the $\nu$-th bath with associated mass $m_{k,\nu}$ and
frequency $\omega_{k,\nu}$, respectively [45, 47]. The interaction between the
WM and the $\nu$-th bath,

$H_{{\rm
int,\nu}}(t)=\sum_{k=1}^{\infty}\left\\{-xg_{\nu}(t)c_{k,\nu}X_{k,\nu}+x^{2}g_{\nu}^{2}(t)\frac{c^{2}_{k,\nu}}{2m_{k,\nu}\omega^{2}_{k,\nu}}\right\\},$
(4)

consists of a bilinear coupling between the WM and bath position operators and
of the usual counter–term to prevent the renormalization of the WM potential.
The interaction strengths are described by the parameter $c_{k,\nu}$, and we
have introduced dimensionless functions $g_{\nu}(t)$ that describe the
possible time dependence of the couplings. In particular, we will focus on the
situation where the $\nu=h,c$ system/bath couplings are modulated in time [48,
49, 50, 51], while the $\nu=m$ coupling is kept constant. Specifically, we
assume the two modulations to be in phase, $g_{h}(t)=g_{c}(t)=\cos(\Omega t)$,
while $g_{m}(t)=1$. At initial time $t_{0}=-\infty$, the total density matrix
is assumed factorized as $\rho(t_{0})=\rho_{{\rm
WM}}(t_{0})\otimes\rho_{h}(t_{0})\otimes\rho_{m}(t_{0})\otimes\rho_{c}(t_{0})$,
with $\rho_{{\rm WM}}(t_{0})$ the initial WM density matrix, and
$\rho_{\nu}(t_{0})$ describing the $\nu$-th bath in thermal equilibrium at
temperature $T_{\nu}$.

Figure 1: A three–terminal quantum thermal machine. Panel (a) shows a cartoon
of a three-terminal setup consisting of a quantum harmonic oscillator (QHO) in
contact with three heat baths at temperatures $T_{\nu}$ ($\nu=h,m,c$). The
coupling with baths $h,c$, is dynamical (driven at frequency $\Omega$), while
bath $m$ is statically connected. Here, $J_{\nu}$ are the energy flows between
the QHO and the baths, while $P$ is the total power exchanged via the
dynamical couplings. Panel (b) shows a sketch of a possible circuital
implementation: the couplings to baths $\nu=h,c$ are implemented in terms of
SQUIDs pierced by harmonically driven fluxes $\varphi_{\nu}(t)$ (see text for
details).

Bath properties can be characterized by the spectral density [45]

${\cal
J}_{\nu}(\omega)=\frac{\pi}{2}\sum_{k=1}^{\infty}\frac{c_{k,\nu}^{2}}{m_{k,\nu}\omega_{k,\nu}}\delta(\omega-\omega_{k,\nu})\,,$
(5)

which encodes memory effects and plays an important role in determining the
working regime of thermal machines [50, 52, 53, 54, 55]. Hereafter we choose a
strictly Ohmic [56] spectral density ${\cal J}_{m}(\omega)=M\gamma_{m}\omega$
for the $\nu=m$ static bath. For the modulated baths $\nu=h,c$, we choose
instead a structured environment with a Lorentzian spectral function [50, 57,
58, 59]

${\cal
J}_{\nu}(\omega)=\frac{d_{\nu}M\gamma_{\nu}\omega}{(\omega^{2}-{\omega}_{\nu}^{2})^{2}+\gamma_{\nu}^{2}\omega^{2}}~{},$
(6)

with a peak centered at ${\omega}_{\nu}$, an amplitude governed by $d_{\nu}$,
and a damping width determined by $\gamma_{\nu}$ with $\nu=h,c$. Such
structured environments offer a great versatility, i.e. exploiting different
resonant conditions between external drive $\Omega$ and $\omega_{h}$ and
$\omega_{c}$, and can be physically realized in several settings such as
quantum cavity [42, 60] or superconducting circuits [43, 61, 62, 63]. In the
latter framework, one can think of a device composed of three superconducting
LC circuits, one acting as the WM (with an additional resistive coupling
toward the $\nu=m$ reservoir) and the other two as transmission lines coupled
to baths via capacitive or inductive couplings [61, 62]. The temporal
modulation can be engineered by varying a mutual capacitance, or by
controlling an inductive coupling via external field after embedding the two
LC elements into a superconducting quantum interference device (SQUID)-like
geometry as in Ref.[61]. An example of such experimental realization is shown
in Fig. 1(b).

In this work, we are interested in thermodynamic quantities in the long time
limit, when a periodic steady state has been reached. All quantities of
interest are thus averaged over one period of the drive ${\cal
T}=2\pi/\Omega$, and are well defined both at weak and strong couplings [51,
64, 65, 66]. The total power and the heat currents, after the quantum ensemble
average and averaged over one period of the cycle, read [49, 50]

$\displaystyle P=\frac{1}{\cal T}\int_{\bar{t}}^{\bar{t}+{\cal
T}}\\!\\!\\!\\!\\!dt^{\prime}\,\sum_{\nu=h,c}{\rm Tr}\Big{[}\frac{\partial
H_{{\rm int},\nu}(t^{\prime})}{\partial
t^{\prime}}\rho(t_{0})\Big{]}=\frac{1}{\cal T}\int_{\bar{t}}^{\bar{t}+{\cal
T}}\\!\\!\\!\\!\\!dt^{\prime}\,\sum_{\nu=h,c}{\rm Tr}\Big{[}\frac{\partial
H_{{\rm int},\nu}}{\partial t^{\prime}}\rho(t^{\prime})\Big{]},$ (7)
$\displaystyle J_{\nu}=-\frac{1}{\cal T}\int_{\bar{t}}^{\bar{t}+{\cal
T}}\\!\\!\\!\\!\\!dt^{\prime}\,{\rm
Tr}\Big{[}\frac{d}{dt^{\prime}}H_{\nu}(t^{\prime})\rho(t_{0})\Big{]}=-\frac{1}{\cal
T}\int_{\bar{t}}^{\bar{t}+{\cal T}}\\!\\!\\!\\!\\!dt^{\prime}\,{\rm
Tr}\Big{[}H_{\nu}\frac{d}{dt^{\prime}}\rho(t^{\prime})\Big{]},$ (8)

where $P$ represents the total power associated to the time evolution of the
system/bath couplings $\nu=h,c$ – with $P>0$ when work is performed on the WM
– and $J_{\nu}$ is the heat current from the $\nu$-th reservoir, with
$J_{\nu}>0$ when the flow is directed towards the WM, see Fig. 1(a). We remark
here that only the two driven couplings $\nu=h,c$ contribute to the power,
since $g_{m}(t)\equiv 1$.

It is important to notice that the average total power is fully balanced by
the average heat currents

$P+\sum_{\nu=h,m,c}J_{\nu}=0\,,$ (9)

reflecting the first law of Thermodynamics [9, 12]. Another important quantity
to assess thermodynamic performance is the time average entropy production
rate, which can be linked to the heat currents by [9, 64, 12]

$\dot{S}=-\sum_{\nu=h,m,c}\frac{J_{\nu}}{T_{\nu}}\,,$ (10)

and in terms of which the second law of thermodynamics can be formulated as
$\dot{S}\geq 0$. Note that the averaged contribution of the WM to the entropy
production vanishes as the system’s steady state is periodic with the period
of the drive.

###  II.2 Operating modes of a three-terminal thermal machine

The operating modes of a thermal machine can be classified studying the sign
of thermal currents and total power. Due to the energy conservation
constraint, $P+J_{h}+J_{c}+J_{m}=0$, we can express the entropy production
rate $\dot{S}$ in terms of three quantities alone, say $J_{h}$, $J_{c}$ and
$P$, as

$\dot{S}=-\sum_{\nu=h,m,c}\frac{J_{\nu}}{T_{\nu}}=\frac{P}{T_{m}}+\frac{J_{c}}{T_{m}}\left(1-\frac{T_{m}}{T_{c}}\right)+\frac{J_{h}}{T_{m}}\left(1-\frac{T_{m}}{T_{h}}\right)\,.$
(11)

There are $2^{3}$ conceivable operating modes: one however is not physical
since the combination $J_{h}<0$, $J_{c}>0$ and $P<0$ violates $\dot{S}\geq 0$
– see Eq. (11) – and never occurs. The other modes are schematically depicted
in Fig. 2. One is commonly labeled as ”wasteful” [67, 37] since in this
configuration $J_{c}<0$, $J_{h}>0$ and $P>0$ – meaning that heat flows from
the bath at $T_{h}$ to the one at $T_{c}$ while the WM absorbs power. However,
this configuration can be a resource for the operation as a thermal
transistor, as will be shown in Sec. III.2. The other six operating modes
consist of three ”pure” ones (engine, refrigerator, heat pump) and three
”hybrid” modes [37, 68, 69]. The existence of the latter implies that a
three–terminal device can simultaneously perform multiple thermodynamic tasks,
such as employing heat from the hot reservoir to produce power (engine) and
simultaneously ”lift” heat from the cold reservoir (refrigerator), a
possibility out of reach for conventional two–terminal thermal machines [36,
15, 37, 68, 69].

To quantify the performance of a multi-terminal thermal machine in a unified
fashion, including also multitasking configurations, it is useful to introduce
the so-called input–output exergy efficiency, also known as the second-law
efficiency or rational efficiency [37, 68, 69]. To this end, we split the
entropy production rate $\dot{S}=\dot{S}^{(+)}+\dot{S}^{(-)}$ into positive
(+) and negative (-) contributions and introduce the exergy efficiency as

$\phi=-\frac{\dot{S}^{(-)}}{\dot{S}^{(+)}}\,,$ (12)

where negative (positive) contributions of the entropy production rate appear
in the numerator (denominator). Clearly, since
$\dot{S}=\dot{S}^{(+)}-|\dot{S}^{(-)}|\geq 0$, one has
$|\dot{S}^{(-)}|\leq\dot{S}^{(+)}$, which implies that $0\leq\phi\leq 1$. Note
that, in simpler cases (e.g. a two–terminal setup operating as an engine),
$\phi$ reduces to the standard thermodynamical efficiency $\eta$ normalized to
the relevant Carnot limit [37]. In our case, using Eq. (11), we can write
explicitly

$\phi=-\frac{P\vartheta(-P)+J_{c}(1-T_{m}/T_{c})\vartheta(J_{c})+J_{h}(1-T_{m}/T_{h})\vartheta(-J_{h})}{P\vartheta(P)+J_{c}(1-T_{m}/T_{c})\vartheta(-J_{c})+J_{h}(1-T_{m}/T_{h})\vartheta(J_{h})},$
(13)

where $\vartheta(x)$ is the step function.

Figure 2: Operating modes of a driven three–terminal device. Schematic
depiction of all the possible operating modes of a three–terminal device, as
told by the sign of $J_{h}$, $J_{c}$ and $P$. The dashed lines represent the
modes that are connected via the reversal of only one among $J_{h,c}$ or $P$.
The arrows represent the direction of the latter: the relationship with
respect to the sign of currents and power is shown in the legend.

##  III Results

We will now present typical results which illustrate the versatility of a
three–terminal device, demonstrating in particular its ability to perform
hybrid tasks. In addition, we will show that the same setup can be configured
as a useful thermal transistor [70, 13, 71, 72, 73, 74]. Hereafter, we
consider the quantum regime [13]

$\omega_{0}>T_{h}>T_{m}>T_{c}\,.$ (14)

We focus on the perturbative regime in which the coupling with the driven
Lorentzian baths is much smaller than the one with the static Ohmic bath. The
amplitude $d_{\nu}$ (for $\nu=h,c$) in Eq. (6) can be expressed in terms of
the dimensionless parameter

$\kappa_{\nu}=\frac{d_{\nu}}{\omega_{\nu}^{2}\omega_{0}^{2}}\ll 1.$ (15)

As for the other parameters of the Lorentzian baths, we assume that their
resonant frequencies $\omega_{h,c}>0$ can be independently tuned, with the
detuning parameter $\Delta=\omega_{h}-\omega_{c}$, and that the widths
$\gamma_{h}=\gamma_{c}$. Finally, we address the underdamped regime with
$\gamma_{\nu}\ll\omega_{0}$, in which the machine can display its best
performances. In these conditions compact analytical expressions can be
obtained [49, 50] for the thermal currents $J_{\nu}$ and power $P$: they are
reported in Appendix A, see Eqs. (23,24).

###  III.1 Operation as a hybrid device

The three–terminal quantum device proposed here can display several different
operating modes. To maximize their number, we have found that choosing
$\Delta>0$ is a key ingredient (see below for an explanation of this
observation). Figures 3 (a) and (b) show the operating mode of the device as a
function of $\Omega$ and $\omega_{h}$ with a large detuning
$\Delta=0.75\omega_{0}$, for two representative values of the middle
temperature $T_{m}$. When $T_{m}\sim T_{h}$ (panel a) we encounter a very rich
scenario characterized by all the pure modes along with the refrigerator–pump
and pump–engine hybrid behaviours. It is important to stress that this last
regime cannot be observed with only two terminals, see Appendix B. Considering
instead $T_{m}\sim T_{c}$, exemplified by panel (b), we still observe a varied
(but somewhat simpler) scenario, which however features the
engine–refrigerator hybrid operation, which again is lacking in the two-
terminal device. A very intriguing feature of our system is its ability to
seamlessly switch between several different modes of choice by tuning
$\omega_{h}$, $\Delta$ and, more simply, using the external driving frequency
$\Omega$ as a control knob. As an example, considering the situation in panel
(a) and $\omega_{h}\approx 1.5\omega_{0}$ it is in principle possible to
switch back and forth between engine, a hybrid engine-heat pump and a heat
pump by sweeping $\Omega$ in a range $\lesssim 0.5\omega_{0}$. Similar
configurations are of course possible by choosing different regions of the
parameter space. Importantly, most of the configurations are quite wide with
respect to $\omega_{h}$ and do not depend sensibly on the specific value of
$\Delta$, which suggests that the operation and the tunability of device are
quite stable and robust.
Figures 3 (c) and (d) show the exergy efficiency $\phi$ as a function of
$\Omega$ and $\omega_{h}$ for the same parameters of panels (a) and (b)
discussed above. Clearly, $\phi=0$ in the wasteful regions. Away from them,
the exergy efficiency can attain significant values $\gtrsim 0.5$ both in the
pure as well as in the hybrid modes. One feature clearly stands out: the
largest values of $\phi$ occur around two precise lines in the $\Omega$,
$\omega_{h}$ plane. This is because the three–terminal device can be seen as
two two–terminal devices in parallel: the machine $\mathcal{M}_{1}$ operating
between $T_{m}$ and $T_{h}>T_{m}$, and $\mathcal{M}_{2}$ working between
$T_{c}$ and $T_{m}>T_{c}$. The behaviour of such a two–terminal device has
been analyzed previously [50], see Appendix B for a brief summary. In
particular, the two high-efficiency lines mentioned above correspond to the
resonances $\omega_{h}=\omega_{0}+\Omega$, due to the operation of
$\mathcal{M}_{1}$ and $\omega_{c}=\omega_{0}-\Omega=\omega_{h}-\Delta$, due to
the operation of $\mathcal{M}_{2}$. This observation also allows us to
understand the richness of panels (a) and (b), due to the superposition of the
different working modes of the ”elementary” two–terminal devices in terms of
which the three–terminal one can be interpreted. Such superposition occurs if
$\omega_{c}<\omega_{h}$ which implies $\Delta>0$, which reveals why this is a
favourable regime to observe hybrid operating modes.

Figure 3: Hybrid operation of a three–terminal device. Operating modes (a,b)
and corresponding exergy efficiency $\phi$ (c,d) as a function of the driving
frequency $\Omega$ and $\omega_{h}$ for a three–terminal quantum thermal
machine operating with same parameters except for $T_{m}=0.5\omega_{0}$ in
panels (a,c) and $T_{m}=0.2\omega_{0}$ in panels (b,d). Here we recall that
$\Delta=\omega_{h}-\omega_{c}$.

###  III.2 Operation as a thermal transistor

Three–terminal quantum thermal devices have been envisioned as possible
templates to implement a quantum thermal transistor [67, 13, 40, 73], i.e. a
device in which a small modulation of an energy flow (a ”input”, analogous to
the gate/base of an electronic transistor) produces a large modulation of
another, larger energy flow (a ”output”, similar for instance to the
source/emitter in a conventional transistor) [73]. Typical setups considered
in literature consist of several two–level–systems (TLS) statically coupled to
external baths [40]. There, the modulation of the ”input” flow is provided by
a modulation of the temperature of the ”input” bath (typically, corresponding
to the one at temperature $T_{m}$). The periodic modulation of one of the TLSs
has been also considered [73]. Proposals of a thermal transistor in a
two–terminal device with parametric excitation have also been put forward
[72]: the two terminals serve the purpose of source/emitter and
drain/collector, while the exchanged power with the parametric actuator serves
as the gate/base. In such a transistor the modulation of the gate is achieved
via the modulation of the frequency of the parametric excitation, which offers
the practical advantage of being simpler to achieve in a precise manner in
comparison to the modulation of the temperature of a bath. In this work we
endorse this idea, and show that a three–terminal quantum thermal transistor
with remarkable performances and stability can be achieved in our setup, which
outperforms an analogous device with only two terminals.

We consider the exchanged power $P$, modulated through the driving frequency
$\Omega$ of the dynamical couplings, as the input, and the current $J_{h}$
flowing from the hot bath as the output. Similar results (not shown) can be
obtained considering $J_{c}$ as the output. We introduce

$r=\left|\frac{J_{h}}{P}\right|\quad;\quad g=\left|\frac{\partial
J_{h}}{\partial P}\right|=\left|\frac{\partial J_{h}/\partial\Omega}{\partial
P/\partial\Omega}\right|\,.$ (16)

The parameter $r$ controls the output–to–input ratio, i.e. the ”smallness” of
the input signal with respect to the output, while $g$ represents the
differential gain of the transistor, i.e. the amplification factor of small
changes in $P$, reflected on $J_{h}$. We chose to customarily set a
performance threshold, by considering a ”useful” transistor a device in which
both $r>10$ and $g>10$ is achieved, and performed a search scanning the
parameters space. Figure 4 (a) shows a typical case in which the
three–terminal device indeed works as a quantum thermal transistor: both
criteria are met, and a gain up to $\sim 10^{4}$ can indeed be achieved. The
performance is stable, with the region in $\Omega$ over which $r,g>10$
extending over a frequency range $\gtrsim 0.5\omega_{0}$. We have found (not
shown) that in order to achieve solid and robust transistor action, the best
condition occurs with minimal detuning of the two Lorentzian baths
$\Delta\approx 0$, with $T_{m}\approx T_{c}$. To put this result in context
with the different operating modes of the device, Fig. 4 (b) shows the region
in parameter space where the device operates as a transistor as a solid black
segment, superimposed to a plot of $\phi$ where the different operating modes
are marked. The best transistor regimes are found near the boundaries between
the ”re–entrant” wasteful–engine–wasteful operating modes, where $P$ switches
sign two times (see Fig. 2) while $J_{h}$ preserves it. This clearly drives
$r$ to very large values near the inversion points of $P$. It is found that in
these regions $P$ is also sufficiently smooth with respect to $\Omega$, which
in turn allows to obtain a large gain $g$. With no detuning, the exergy
efficiency $\phi$ is found to be weak, reaching at most 0.4 (in contrast with
Fig. 3, where $\Delta\neq 0$ and $\phi$ can approach the ideal unit
efficiency). However, in the case of a thermal transistor a trade–off between
$\phi$ and $r$,$g$ seems acceptable since in this regime the device is not
intended to perform as a conventional thermal machine.

In our setup, the performance of a three–terminal transistor is far superior
to that of a two–terminal device operating in the same manner and within the
same temperature range – obtained for instance switching off the coupling
$g_{c}(t)=0$ – for which the figures of merit $r$ and $g$ can be defined as in
Eq. (16). The results for this two–terminal transistor, shown in Fig. 5 (d) of
Appendix B, clearly show that the driving range where a significant gain is
achieved is much narrower, extending up to a frequency window of about
$0.15\omega_{0}$: operating with three terminals warrants a definite advantage
in terms of the stability of the thermal transistor.

In order to confirm the validity of choosing $\Omega$ as a modulation
parameter, we have also analyzed the situation in which the transistor
operates with $P$ as the input and $J_{h}$ as the output, but keeping $\Omega$
fixed and modulating the temperature $T_{m}$. In this case we have observed
(not shown) that lower values for both $r$ and $g$ are obtained, in narrow
regions of the temperature $T_{m}$.

Figure 4: Three–terminal device as a quantum thermal transistor. Panel (a)
shows the output–to–input ratio $r$ and differential gain $g$ as a function of
$\Omega$, for a set of parameters chosen in order to optimize the range of
driving frequencies where the system performs as a thermal transistor. Panel
(b) shows such range (as a thick solid line), superimposed to a density plot
of the exergy efficiency $\phi$ as a function of $\Omega$ and $\omega_{h}$.

##  IV Discussion and Conclusions

We have shown that by properly engineering bath spectral features and driving
the system-bath couplings, a three-terminal quantum thermal machine can act as
an efficient hybrid thermal machine. The proposed device is flexible and
tunable, in that several pure and hybrid working modes can be obtained, and it
is possible to switch from one operational mode to another by changing the
driving frequency. Moreover, the same device can work as a stable, high-
performance transistor, with large output–to–input signal and differential
gain, on a broad driving frequency interval.

Natural extensions of our model could be obtained by considering hybrid
quantum thermal machines with more complex working medium, like coupled
oscillators or qubit-oscillator systems. It would be also interesting to
consider the coupling to nonequilibrium reservoirs, which may be a useful
resource for further boosting the performance of hybrid quantum thermal
machines. Finally our analysis reported average quantities, while
fluctuations, ubiquitous at the nanoscale, can influence device performance,
but also provide alternative pathway in developing new device functionalities.
In particular, the so-called thermodynamic uncertainty relations, constraining
in classical stochastic thermodynamics the achievable degree of precision
(i.e., the minimum fluctuations in the outcome of a process), given a certain
output power and efficiency [75, 76], deserve further careful inspection in
the quantum realm.

## Acknowledgements

F.C. and M.S. acknowledge support by the “Dipartimento di Eccellenza MIUR
2018-2022.”, L.R. and G.B. acknowledge financial support by the Julian
Schwinger Foundation (Grant JSF-21-04-0001) and by INFN through the project
‘QUANTUM’. F.C. acknowledges support by V. Cavaliere for the preparation of
Fig. 1.

## Author Contributions

F.C., L.R., and M.C. performed analytical calculations and numerical
simulations. M.S. conceived and supervised the study, with inputs from G.B..
All authors discussed the results and contributed to writing and revising the
manuscript.

## Declaration of interest

The authors declare no competing interests.

## Supplemental information

##  Appendix A Thermal currents and power in the perturbative regime

The driven dissipative three-terminal setup described in the main text can be
solved by resorting to non-equilibrium Green function formalism, as described
in Ref. [49]. Here, we briefly recall the main steps for the evaluation of
thermodynamic quantities of interest, referring to previous literature for
additional details. From the total Hamiltonian in Eq. (1) one can derive the
equations of motion for the WM variables ($x(t)$, $p(t)$) and baths variables
($X_{k,\nu}(t)$, $P_{k,\nu}(t)$). The solution for the latter degrees of
fredom can be expressed in terms of initial conditions and of the operator
$x(t)$ [49, 77, 19, 78], eventually obtaining a generalized quantum Langevin
equation of the form

$\ddot{x}(t)+\omega^{2}_{0}x(t)+\int_{-\infty}^{+\infty}\\!\\!\mathrm{d}s\sum_{\nu=h,m,c}g_{\nu}(t)\gamma_{\nu}(t-s)\Big{[}\dot{g}_{\nu}(s)x(s)+\dot{x}(s)g_{\nu}(s)\Big{]}=\frac{1}{M}\sum_{\nu=h,m,c}g_{\nu}(t)\xi_{\nu}(t)\,,$
(17)

where the overdots denote time derivatives, we recall that $g_{m}(t)\equiv 1$,
the damping kernels $\gamma_{\nu}(t)$ are linked to the spectral function by

$\gamma_{\nu}(t)=\frac{2}{\pi
M}\vartheta(t)\int_{0}^{\infty}\mathrm{d}\omega\frac{{\cal
J}_{\nu}(\omega)}{\omega}\cos(\omega t),$ (18)

and $\xi_{\nu}(t)$ represent the fluctuating force operators of the baths with
$\vartheta(t)$ the Heaviside step function. We recall that these operators
have zero quantum average $\langle\xi_{\nu}(t)\rangle\equiv{\rm
Tr}[\xi_{\nu}(t)\rho(t_{0})]=0$ and their time correlators are given by
$\langle\xi_{\nu}(t)\xi_{\nu^{\prime}}(t^{\prime})\rangle=\delta_{\nu,\nu^{\prime}}{\cal
L}_{\nu}(t-t^{\prime})$, with

$\\!\\!\\!\\!\\!\\!{\cal
L}_{\nu}(t)\\!\\!=\\!\\!\\!\int_{0}^{\infty}\\!\\!\frac{\mathrm{d}\omega}{\pi}{\cal
J}_{\nu}(\omega)\big{[}\\!\coth(\frac{\omega}{2T_{\nu}})\\!\cos(\omega
t)-\\!i\sin(\omega t)\big{]}.$ (19)

At long times, the system reaches a periodic state sustained by the drives. In
this regime, the time evolution of the position operator $x(t)$ can be
expressed directly as a time integral of the retarded Green function with the
inhomogeneous term:

$x(t)=\sum_{\nu=h,m,c}\int_{-\infty}^{+\infty}\mathrm{d}t^{\prime}G(t,t^{\prime})\frac{1}{M}g_{\nu}(t^{\prime})\xi_{\nu}(t^{\prime}).$
(20)

Several methods can be used to evaluate (exactly or with different
approximation schemes) the above Green function, see e.g. Refs. [49, 50, 19,
79].
From Eqs. (7-8), it is possible to express both the power and the heat
currents averaged over one period ${\cal T}$ in terms of position variables as

$P=\int_{\bar{t}}^{\bar{t}+{\cal T}}\frac{dt^{\prime}}{{\cal
T}}\Big{\\{}\sum_{\nu=h,c}-\dot{g}_{\nu}(t^{\prime})\langle
x(t^{\prime})\xi_{\nu}(t^{\prime})\rangle+M\dot{g}_{\nu}(t^{\prime})\int_{-\infty}^{+\infty}\\!\\!\\!\\!\\!\\!\\!\mathrm{d}s\gamma_{\nu}(t^{\prime}-s)\frac{{\mathrm{d}}}{{\mathrm{d}}s}\left[g_{\nu}(s)\langle
x(t^{\prime})x(s)\rangle\right]\Big{\\}}$ (21)

and

$J_{\nu}=\int_{\bar{t}}^{\bar{t}+{\cal T}}\frac{dt^{\prime}}{{\cal
T}}\Big{[}-\frac{g_{\nu}(t^{\prime})}{2}\left\langle
x(t^{\prime})\dot{\xi}_{\nu}(t^{\prime})+\dot{\xi}_{\nu}(t^{\prime})x(t^{\prime})\right\rangle-
g_{\nu}(t^{\prime})\int_{-\infty}^{t^{\prime}}\\!\\!\\!\\!\\!\\!\\!\mathrm{d}s\left\langle\\{x(t^{\prime}),x(s)\\}\right\rangle
g_{\nu}(s)\int_{0}^{\infty}\\!\\!\frac{\mathrm{d}\omega}{\pi}{\cal
J}_{\nu}(\omega)\omega\cos(\omega(t^{\prime}-s))\Big{]}\,,$ (22)

with $\\{A,B\\}=AB+BA$ the standard anti-commutator. It is worth to note that
the average power gets contributions only from the two driven couplings
$\nu=h,c$, since $\nu=m$ is kept constant with $g_{m}(t)=1$.
In this work we are interested in the weak coupling regime, where the driven
bath couplings ($\nu=h,c$) are much weaker than the static one ($\nu=m$). In
this case, closed analytical expressions for average power and heat currents
can be obtained in a standard perturbative framework [50]. In the regime
$\gamma_{m}\ll\omega_{0}$, the final expressions read (for $\nu=h,c$)

$J_{\nu}=\frac{1}{4M\omega_{0}}\sum_{p=\pm
1}(\omega_{0}+p\Omega)\mathcal{J}_{\nu}(\omega_{0}+p\Omega)\left[n_{B}\left(\frac{\omega_{0}+p\Omega}{T_{\nu}}\right)-n_{B}\left(\frac{\omega_{0}}{T_{m}}\right)\right]\,,$
(23) $P=-\frac{\Omega}{4M\omega_{0}}\sum_{\nu=h,c}\sum_{p=\pm
1}p\mathcal{J}_{\nu}(\omega_{0}+p\Omega)\left[n_{B}\left(\frac{\omega_{0}+p\Omega}{T_{\nu}}\right)-n_{B}\left(\frac{\omega_{0}}{T_{m}}\right)\right]\,,$
(24)

where $n_{B}(x)=\left(e^{x}-1\right)^{-1}$ is the Bose function and we note
that Eqs. (23),(24) do not depend anymore on $\gamma_{m}$ for
$\gamma_{m}\ll\omega_{0}$ [50]. We do not quote the expression for $J_{m}$ as
it can be derived from the conservation of energy in Eq. (9).

##  Appendix B Operating modes and thermal transistor effect in a two–terminal
device

In this section we briefly discuss the operation of a two–terminal quantum
thermal machine with a QHO as the WM, operating between a Lorentzian bath with
dynamical coupling and a static Ohmic bath [50]. The theoretical framework can
be derived from the material in Sec. II, for vanishing coupling to one of the
two Lorentzian baths.
The operating modes of a two–terminal device can be characterized with the
same criteria shown in Fig. 2. We denote the hot and cold baths as $T_{h}$ and
$T_{c}<T_{h}$. A general landscape of all the possible operating modes is
shown in Fig. 5 where panel (a) displays the case where the Lorentzian bath is
at temperature $T_{h}$, and panel (c) illustrates the case of a Lorentzian
bath at temperature $T_{c}$. These two cases correspond respectively to the
machines $\mathcal{M}_{1}$ and $\mathcal{M}_{2}$ discussed in Sec. III.1.
The only achievable modes here are the two pure ”engine” and ”heat pump”
modes, the hybrid ”refrigerator–pump” mode, and the ”wasteful” mode. In
passing, we note that other works [50, 80, 81] use different names for such
operating modes: there, the terms ”refrigerator”, ”dissipator” and
”accelerator” correspond to ”refrigerator–pump”, ”heat pump” and ”wasteful”
used here. Due to the presence of a sharply peaked Lorentzian bath, the
machine displays its most prominent features when the resonance conditions
$\omega_{h}=\omega_{0}+\Omega$ (for the machine $\mathcal{M}_{1}$) or
$\omega_{c}=\omega_{0}-\Omega$ (for the machine $\mathcal{M}_{2}$) are met
[50]. These resonances are marked as a white dashed line in panels (a),(c).
The presence of such resonances is quite evident in the behaviour of the
exergy efficiency, shown in Fig. 5(b) for the case of $\mathcal{M}_{1}$ (the
situation for $\mathcal{M}_{2}$ is qualitatively identical). Note that in the
engine and refrigerator–pump regimes $\phi$ reduces respectively to the engine
efficiency $\eta=-P/J_{h}$ normalized to the Carnot limit
$\eta_{C}=1-T_{c}/T_{h}$, or to the coefficient of performance (COP)
$\epsilon=J_{c}/P$ normalized to the Carnot limit
$\epsilon_{C}=T_{c}/(T_{h}-T_{c})$. The highest values of $\phi$ occur near
the resonance line, with $\phi\to 1$ near the intersection between the
resonance line and the line separating the engine and the refrigerator–pump
regimes, where $P\to 0$.
Finally, Fig. 5(d) shows the typical best–case scenario concerning the
performances of a thermal transistor built out of a two–terminal device
operating within a temperature range analogous to that of Fig. 4: clearly the
range of driving frequencies where a useful gain $g>10$ is achieved is only of
about $0.15\omega_{0}$, considerably smaller than the one obtained in the
three–terminal case. This general trend has always been observed throughout
all our investigations.

Figure 5: Two–terminal thermal machine. Panel (a) shows the only four
operating modes of a two–terminal thermal machine for the case of a Lorentzian
hot bath. Panel (b) is a density plot of the exergy efficiency $\phi$ as a
function of $\Omega$ and $\omega_{h}$ for the same parameters as in (a). Panel
(c) displays the four operating modes for a two–terminal maghine with a
Lorentzian cold bath. Panel (d) shows the output–to–input ratio $r$ and the
gain $g$ as a function of $\Omega$, for a two–terminal machine operating as a
thermal transistor with parameters similar to those in Fig. 4. In Panel (a)
the white dashed lines represent the resonance $\omega_{h}=\omega_{0}+\Omega$,
in Panel (c) the resonance $\omega_{c}=\omega_{0}-\Omega$.

## References

  * [1] Clausius, R. (1867). The Mechanical Theory of Heat – with its Applications to the Steam Engine and to the Physical Properties of Bodies (J. Van Voorst, London).
  * [2] Esposito, M., Harbola, U., and Mukamel, S. (2009). Nonequilibrium fluctuations, fluctuation theorems, and counting statistics in quantum systems. Rev. Mod. Phys. 81, 1665. https://doi.org/10.1103/RevModPhys.81.1665
  * [3] Campisi, M., Hänggi, P., and Talkner, P. (2011). Colloquium: Quantum fluctuation relations: Foundations and applications. Rev. Mod. Phys. 83, 771. https://doi.org/10.1103/RevModPhys.83.771
  * [4] Kosloff, R. (2013). Quantum Thermodynamics: A Dynamical Viewpoint. Entropy 15, 2100. https://doi.org/10.3390/e15062100
  * [5] Gelbwaser-Klimovsky, D., Niedenzu, W., and Kurizki, G. (2015). Thermodynamics of Quantum Systems Under Dynamical Control. In Advances In Atomic, Molecular, and Optical Physics 64, Arimondo, E., Lin, C.C., Yelin, S.F., ed. (Academic Press), pp. 329-407. https://doi.org/10.1016/bs.aamop.2015.07.002
  * [6] Sothmann, B., Sánchez, R., and Jordan, A.N. (2015). Thermoelectric energy harvesting with quantum dots. Nanotechnology 26, 032001. https://doi.org/10.1088/0957-4484/26/3/032001
  * [7] Vinjanampathy, S., and Anders, J. (2016). Quantum thermodynamics. Contemp. Phys. 57, 545. https://doi.org/10.1080/00107514.2016.1201896
  * [8] Goold, J., Huber, M., Riera, A., del Rio, L., and Skrzypczyk, P. (2016). The role of quantum information in thermodynamics—a topical review. J. Phys. A Math. Theor. 49, 143001. https://doi.org/10.1088/1751-8113/49/14/143001
  * [9] Benenti, G., Casati, G., Saito, K., and Whitney, R.S. (2017). Fundamental aspects of steady-state conversion of heat to work at the nanoscale. Phys. Rep. 694, 1. https://doi.org/10.1016/j.physrep.2017.05.008
  * [10] Fornieri, A., and Giazotto, F. (2017). Towards phase-coherent caloritronics in superconducting circuits. Nature Nanotech. 12, 944. https://doi.org/10.1038/nnano.2017.204
  * [11] Talkner, P., and Hänggi, P. (2020). Colloquium: Statistical mechanics and thermodynamics at strong coupling: Quantum and classical. Rev. Mod. Phys. 92, 041002. https://doi.org/10.1103/RevModPhys.92.041002
  * [12] Landi, G.T., and Paternostro, M. (2021). Irreversible entropy production: From classical to quantum. Rev. Mod. Phys. 93, 035008. https://doi.org/10.1103/RevModPhys.93.035008
  * [13] Pekola, J.P., and Karimi, B. (2021). Colloquium: Quantum heat transport in condensed matter systems. Rev. Mod. Phys. 93, 041001. https://doi.org/10.1103/RevModPhys.93.041001
  * [14] Landi, G.T., Poletti, D., and Schaller, G. (2022). Non-equilibrium boundary driven quantum systems: models, methods and properties. Rev. Mod. Phys. 94, 045006. https://journals.aps.org/rmp/abstract/10.1103/RevModPhys.94.045006
  * [15] Arrachea, L. (2023). Energy dynamics, heat production and heat-work conversion with qubits: towards the development of quantum machines. ArXiv:2205.14200, Rep. Progr. Phys. (in press). http://iopscience.iop.org/article/10.1088/1361-6633/acb06b.
  * [16] Esposito, M., Lindenberg, K., and Van den Broeck, C. (2010). Entropy production as correlation between system and reservoir. New J. Phys. 12, 013013. https://doi.org/10.1088/1367-2630/12/1/013013
  * [17] Levy, A., Alicki, R., and Kosloff, R. (2012). Quantum refrigerators and the third law of thermodynamics. Phys. Rev. E 85, 061126. https://doi.org/10.1103/PhysRevE.85.061126
  * [18] Benenti, G., and Strini, G. (2015). Dynamical Casimir effect and minimal temperature in quantum thermodynamics. Phys. Rev. A 91, 020502(R). https://doi.org/10.1103/PhysRevA.91.020502
  * [19] Freitas, N., and Paz, J.P. (2017). Fundamental limits for cooling of linear quantum refrigerators. Phys. Rev. E 95, 012146. https://doi.org/10.1103/PhysRevE.95.012146
  * [20] Clivaz, F., Silva, R., Haack, G., Brask, J.B., Brunner, N., and Huber, M. (2019). Unifying Paradigms of Quantum Refrigeration: A Universal and Attainable Bound on Cooling. Phys. Rev. Lett. 123, 170605. https://doi.org/10.1103/PhysRevLett.123.170605
  * [21] Benenti, G., Casati, G., Rossini, D., and Strini, G. (2019). Principles of quantum computation and information (A comprehensive textbook) (World Scientific, Singapore).
  * [22] Krantz P., Kjaergaard M., Yan F., Orlando T. P., Gustavsson S., and Oliver W. D. (2019). A quantum engineer’s guide to superconducting qubits. Appl. Phys. Rev. 6, 021318. https://doi.org/10.1063/1.5089550
  * [23] Calzona A. and Carrega M. (2023). Novel architectures for noise-resilient superconducting qubits. Supercond. Sci. Technol. 36, 023001. https://iopscience.iop.org/article/10.1088/1361-6668/acaa64
  * [24] Martínez-Pérez, M.J., and Giazotto, F. (2014). A quantum diffractor for thermal flux. Nat. Commun. 5, 3579. https://doi.org/10.1038/ncomms4579
  * [25] Auffèves, A. (2022). Quantum Technologies Need a Quantum Energy Initiative. PRX Quantum 3, 020101. https://doi.org/10.1103/PRXQuantum.3.020101
  * [26] Pekola, J.P., and Hekking, F.W.J. (2007). Normal-Metal-Superconductor Tunnel Junction as a Brownian Refrigerator. Phys. Rev. Lett. 98, 210604. https://doi.org/10.1103/PhysRevLett.98.210604
  * [27] Cleuren, B., Rutten, B, and Van den Broeck, C. (2012). Cooling by Heating: Refrigeration Powered by Photons. Phys. Rev. Lett. 108, 120603. https://doi.org/10.1103/PhysRevLett.108.120603
  * [28] Mari, A., and Eisert, J. (2012). Cooling by Heating: Very Hot Thermal Light Can Significantly Cool Quantum Systems. Phys. Rev. Lett. 108, 120602. https://doi.org/10.1103/PhysRevLett.108.120602
  * [29] Jiang, J.-H., Entin-Wohlman, O., and Imry, Y. (2012). Thermoelectric three-terminal hopping transport through one-dimensional nanosystems. Phys. Rev. B 85, 075412. https://doi.org/10.1103/PhysRevB.85.075412
  * [30] Mazza, F., Bosisio, R., Benenti, G., Giovannetti, V., Fazio, R., and Taddei, F. (2014). Thermoelectric efficiency of three-terminal quantum thermal machines. New J. Phys. 16, 085001. https://doi.org/10.1088/1367-2630/16/8/085001
  * [31] Yang J., Elouard C., Splettstoesser J., Sothmann B., Sanchez R., and Jordan A. N. (2019) Thermal transistor and thermometer based on Coulomb-coupled conductors. Phys. Rev. B 100, 045418. https://doi.org/10.1103/PhysRevB.100.045418
  * [32] Blasi G., Taddei F., Arrachea L., Carrega M., and Braggio A. (2020) Nonlocal thermoelectricity in a topological Andreev interferometer. Phys. Rev. B 102, 241302. https://doi.org/10.1103/PhysRevB.102.241302
  * [33] Mazza, F., Valentini, S., Bosisio, R., Benenti, G., Giovannetti, V., Fazio, R., and Taddei, F. (2015). Separation of heat and charge currents for boosted thermoelectric conversion. Phys. Rev. B 91, 245435. https://doi.org/10.1103/PhysRevB.91.245435
  * [34] Sanchez R., Sothmann B., and Jordan A. N. (2015). Heat diode and engine based on quantum Hall edge states. New J. Phys. 17, 075006. https://doi.org/10.1088/1367-2630/17/7/075006
  * [35] Thierschmann H., Sanchez R., Sothmann B., Arnold F., Heyn C., Hansen W., Buhmann H., and Molenkamp L. W. (2015). Three-terminal energy harvester with coupled quantum dots. Nature Nanotechnology 10, 854. https://doi.org/10.1038/nnano.2015.176
  * [36] Entin-Wohlman, O., Imry, Y., and Aharony, A. (2015). Enhanced performance of joint cooling and energy production. Phys. Rev. B 91, 054302. https://doi.org/10.1103/PhysRevB.91.054302
  * [37] Manzano, G., Sánchez, R., Silva, R., Haack, G., Brask, J.B., Brunner, N., and Potts, P.P. (2020). Hybrid thermal machines: Generalized thermodynamic resources for multitasking. Phys. Rev. Research 2, 043302. https://doi.org/10.1103/PhysRevResearch.2.043302
  * [38] Li, B., Wang, L., and Casati, G. (2006). Negative differential thermal resistance and thermal transistor. Appl. Phys. Lett. 88, 143501. https://doi.org/10.1063/1.2191730
  * [39] Li, N., Ren, J., Wang, L., Zhang, G., Hänggi, P., and Li, B. (2012). Colloquium: Phononics: Manipulating heat flow with electronic analogs and beyond. Rev. Mod. Phys. 84, 1045. https://doi.org/10.1103/RevModPhys.84.1045
  * [40] Joulain, K., Drevillon, J., Ezzahri, Y., and Ordonez-Miranda, J. (2016). Quantum Thermal Transistor. Phys. Rev. Lett. 116, 200601. https://doi.org/10.1103/PhysRevLett.116.200601
  * [41] Blais, A., Huang, R.-S., Wallraff, A., Girvin, S.M., and Schoelkopf, R.J. (2004). Cavity quantum electrodynamics for superconducting electrical circuits: An architecture for quantum computation. Phys. Rev. A 69, 062320. https://doi.org/10.1103/PhysRevA.69.062320
  * [42] Aspelmeyer, M., Kippenberg, T.J., and Marquardt, F. (2014). Cavity optomechanics. Rev. Mod. Phys. 86, 1391. https://doi.org/10.1103/RevModPhys.86.1391
  * [43] Cottet, A., Dartiailh, M.C., Desjardins, M.M., Cubaynes, T., Contamin, L.C., Delbecq, M., Viennot, J.J., Bruhat, L.E., Douçot, B., and Kontos, T. (2017). Cavity QED with hybrid nanocircuits: from atomic-like physics to condensed matter phenomena. J. Phys.: Condens. Matter 29, 433002. https://doi.org/10.1088/1361-648X/aa7b4d
  * [44] Zhang, W.-M., Lo, P.-Y., Xiong, H.-N., Tu, M.W.-Y., and Nori, F. (2012). General Non-Markovian Dynamics of Open Quantum Systems. Phys. Rev. Lett. 109, 170402. https://doi.org/10.1103/PhysRevLett.109.170402
  * [45] Weiss, U. (2021). Quantum Dissipative Systems – 5th edition, (World Scientific, Singapore).
  * [46] Hu, B.L., Paz, J.P. and Zhang, Y. (1992). Quantum Brownian motion in a general environment: Exact master equation with nonlocal dissipation and colored noise. Phys. Rev. D 45, 2843. https://doi.org/10.1103/PhysRevD.45.2843
  * [47] Caldeira, A.O., and Leggett, A.J. (1983). Quantum tunnelling in a dissipative system. Ann. Phys. 149, 374. https://doi.org/10.1016/0003-4916(83)90202-6
  * [48] Cangemi, L.M., Carrega, M., De Candia, A., Cataudella, V., De Filippis, G., Sassetti, M., and Benenti, G. (2021). Optimal energy conversion through antiadiabatic driving breaking time-reversal symmetry. Phys. Rev. Research 3, 013237. https://doi.org/10.1103/PhysRevResearch.3.013237
  * [49] Carrega, M., Cangemi, L.M., De Filippis, G., Cataudella, V., Benenti, G., and Sassetti, M. (2022). Engineering Dynamical Couplings for Quantum Thermodynamic Tasks. PRX quantum 3, 010323. https://doi.org/10.1103/PRXQuantum.3.010323
  * [50] Cavaliere, F., Carrega, M., De Filippis, G., Cataudella, V., Benenti, G., and Sassetti, M. (2022). Dynamical heat engines with non-Markovian reservoirs. Phys. Rev. Research 4, 033233. https://doi.org/10.1103/PhysRevResearch.4.033233
  * [51] Wiedmann, M., Stockburger, J.T., and Ankerhold, J. (2020). Non-Markovian dynamics of a quantum heat engine: out-of-equilibrium operation and thermal coupling control. New J. Phys. 22, 033007. https://doi.org/10.1088/1367-2630/ab725a
  * [52] Breuer, H.-P., Laine, E.-M. Piilo, J., and Vacchini, B. (2016). Colloquium: Non-Markovian dynamics in open quantum systems. Rev. Mod. Phys. 88, 021002. https://doi.org/10.1103/RevModPhys.88.021002
  * [53] Iles-Smith, J., Lambert, N., and Nazir, A. (2014). Environmental dynamics, correlations, and the emergence of noncanonical equilibrium states in open quantum systems. Phys. Rev. A 90, 032114. https://doi.org/10.1103/PhysRevA.90.032114
  * [54] Gröblacher, S., Trubarov, A., Prigge, N., Cole, G.D., Aspelmeyer, M., and Eisert, J. (2015). Observation of non-Markovian micromechanical Brownian motion. Nat. Commun. 6, 7606. https://doi.org/10.1038/ncomms8606
  * [55] Torre, G., Roga, W., and Illuminati, F. (2015). Non-Markovianity of Gaussian Channels. Phys. Rev. Lett. 115, 070401. https://doi.org/10.1103/PhysRevLett.115.070401
  * [56] Note that for strictly Ohmic regime it is assumed the usual bath cut-off $\omega_{c}$ as the largest energy scale, i.e. $\omega_{c}\gg\omega_{0},\Omega$.
  * [57] Strasberg, P., Schaller, G., Lambert, N., and Brandes, T. (2016). Nonequilibrium thermodynamics in the strong coupling and non-Markovian regime based on a reaction coordinate mapping. New. J. Phys. 18, 073007. https://doi.org/10.1088/1367-2630/18/7/073007
  * [58] Restrepo, S., Cerrillo, J., Strasberg, P., and Schaller, G. (2018). From quantum heat engines to laser cooling: Floquet theory beyond the Born–Markov approximation. New J. Phys 20, 053063. https://doi.org/10.1088/1367-2630/aac583
  * [59] Naseem, M.T., Misra, A., Müstecaplioǧlu, Ö.E., and Kurizki, G. (2020). Minimal quantum heat manager boosted by bath spectral filtering. Phys. Rev. Research 2, 033285. https://doi.org/10.1103/PhysRevResearch.2.033285
  * [60] Teufel, J.D., Donner, T., Li, D., Harlow, J.W., Allman, M.S., Cicak, K., Sirois, A.J., Whittaker, J.D., Lehnert, K.W., and Simmonds, R.W. (2011). Sideband cooling of micromechanical motion to the quantum ground state. Nature 475, 359. https://doi.org/10.1038/nature10261
  * [61] Peropadre, B., Zueco, D., Wulschner, F., Deppe, F., Marx, A., Gross, R., and García-Ripoll, J.J. (2013). Tunable coupling engineering between superconducting resonators: From sidebands to effective gauge fields. Phys. Rev. B 87, 134504. https://doi.org/10.1103/PhysRevB.87.134504
  * [62] Rodrigues, I.C., Bothner, D., and Steele, G.A. (2019). Coupling microwave photons to a mechanical resonator using quantum interference. Nat. Commun. 10, 5359. https://doi.org/10.1038/s41467-019-12964-2
  * [63] Luschmann, T., Schmidt, P., Deppe, F., Marx, A., Sanchez, A., Gross, R., and Huebl, H. (2022). Mechanical frequency control in inductively coupled electromechanical systems. Sci. Rep. 12, 1608. https://doi.org/10.1038/s41598-022-05438-x
  * [64] Ptaszyński, K., and Esposito, M. (2019). Entropy Production in Open Systems: The Predominant Role of Intraenvironment Correlations. Phys. Rev. Lett. 123, 200603. https://doi.org/10.1103/PhysRevLett.123.200603
  * [65] Liu, J., Jung, K.A., and Segal, D. (2021). Periodically Driven Quantum Thermal Machines from Warming up to Limit Cycle. Phys. Rev. Lett. 127, 200602. https://doi.org/10.1103/PhysRevLett.127.200602
  * [66] Brandner, K., and Seifert, U. (2016). Periodic thermodynamics of open quantum systems. Phys. Rev. E 93, 062134. https://doi.org/10.1103/PhysRevE.93.062134
  * [67] Hajiloo, F., Sánchez, R., Withney, R.S., and Splettstoesser, J. (2020). Quantifying nonequilibrium thermodynamic operations in a multiterminal mesoscopic system. Phys. Rev. B 102, 155405. https://doi.org/10.1103/PhysRevB.102.155405
  * [68] Lu, J., Wang, Z., Wang, R., Peng, J., Wang, C., and Jiang, J.-H. (2022). Multitask quantum thermal machines and cooperative effects. ArXiv:2208.11531. https://doi.org/10.48550/arXiv.2208.11531
  * [69] Lopez, R., Lim, J.S., and Kim, K.W. (2022). An optimal superconducting hybrid machine. ArXiv:2209.09654. https://doi.org/10.48550/arXiv.2209.09654
  * [70] Dutta, B., Peltonen, J.T., Antonenko, D.S., Meschke, M., Skvortsov, M.A., Kubala, B., König, J., Winkelmann, C.B., Courtois, H., and Pekola, J.P. (2017). Thermal Conductance of a Single-Electron Transistor. Phys. Rev. Lett. 119, 077701. https://doi.org/10.1103/PhysRevLett.119.077701
  * [71] Gubaydullin, A., Thomas, G., Golubev, D.S., Lvov, D., Peltonen, J.T., and Pekola, J.P. (2022). Photonic heat transport in three terminal superconducting circuit. Nat. Commun. 13, 1552. https://doi.org/10.1038/s41467-022-29078-x
  * [72] Riera-Campeny, A., Mehboudi, M., Pons, M., and Sanpera, A. (2019). Dynamically induced heat rectification in quantum systems. Phys. Rev. E 99, 032126. https://doi.org/10.1103/PhysRevE.99.032126
  * [73] Gupt, N., Bhattacharyya, S., Das, B., Datta, S., Mukherjee, V., and Ghosh, A. (2022). Floquet quantum thermal transistor. Phys. Rev. E 106, 024110. https://doi.org/10.1103/PhysRevE.106.024110
  * [74] Ligato, N., Paolucci, F., Strambini, E., and Giazotto, F. (2022). Thermal superconducting quantum interference proximity transistor. Nat. Phys. 18, 627 (2022). https://doi.org/10.1038/s41567-022-01578-z
  * [75] Pietzonka, P., and Seifert, U. (2018). Universal Trade-Off between Power, Efficiency, and Constancy in Steady-State Heat Engines. Phys. Rev. Lett. 120, 190602. https://doi.org/10.1103/PhysRevLett.120.190602
  * [76] Horowitz, J.M., and Gingrich, T.R. (2019). Thermodynamic uncertainty relations constrain non-equilibrium fluctuations. Nat. Phys. 16, 15. https://doi.org/10.1038/s41567-019-0702-6
  * [77] Zerbe, C., and Hänggi, P. (1995). Brownian parametric quantum oscillator with dissipation. Phys. Rev. E 52, 1533. https://doi.org/10.1103/PhysRevE.52.1533
  * [78] Freitas, N., and Paz, J.P. (2018). Cooling a quantum oscillator: A useful analogy to understand laser cooling as a thermodynamical process. Phys. Rev. A 97, 032104. https://doi.org/10.1103/PhysRevA.97.032104
  * [79] Arrachea, L., Mucciolo, E.R., Chamon, C., and Capaz, R.B. (2012). Microscopic model of a phononic refrigerator. Phys. Rev. B 86, 125424. https://doi.org/10.1103/PhysRevB.86.125424
  * [80] Buffoni, L., Solfanelli, A., Verrucchi, P., Cuccoli, A., and Campisi, M. (2019). Quantum Measurement Cooling. Phys. Rev. Lett. 122, 070603. https://doi.org/10.1103/PhysRevLett.122.070603
  * [81] Solfanelli, A., Falsetti, M., and Campisi, M. (2020). Nonadiabatic single-qubit quantum Otto engine. Phys. Rev. B 101, 054513. https://doi.org/10.1103/PhysRevB.101.054513