\documentclass[12pt]{article}

\usepackage[utf8]{inputenc}

\usepackage{amsmath,amsthm,amssymb}
\usepackage{mathrsfs}
\usepackage{authblk}

\theoremstyle{plain}
\newtheorem{theorem}{Theorem}
\newtheorem{lemma}{Lemma}
\newtheorem{proposition}{Proposition}
\theoremstyle{definition}
\newtheorem{corollary}{Corollary}
\theoremstyle{remark}
\newtheorem{remark}{Remark}
\newtheorem*{remark*}{Remark}

\numberwithin{equation}{section}

\usepackage[margin=25mm]{geometry}

\usepackage{fancyhdr}
\rfoot{\thepage}

\begin{document}

\title{Stable subspaces of positive maps of matrix algebras}

\author[1]{Marek Miller\thanks{marek.miller@ift.uni.wroc.pl}}
\author[1]{Robert Olkiewicz\thanks{robert.olkiewicz@ift.uni.wroc.pl}}
\affil[1]{Institute of Theoretical Physics, Uniwersytet Wroc{\l}awski, Poland}

\date{}

\maketitle

% Abstract and Introduction
\abstract{
We study stable subspaces of positive extremal maps of finite dimensional
matrix algebras that preserve trace and matrix identity
(so-called bistochastic maps).
We have established the existence of the isometric-sweeping
decomposition for such maps.
As the main result of the paper,
we have shown that all extremal bistochastic maps
acting on the algebra of matrices of size 3x3
fall into one of the three possible categories,
depending on the form of the stable subspace of
the isometric-sweeping decomposition.
Our example of an extremal atomic positive map
seems to be the first one that handles the case
of that subspace being non-trivial.
Lastly, we compute the entanglement witness associated with the extremal map
and specify a large family of entangled states detected by it.

\vspace{0.1cm}
{\scriptsize \noindent \textbf{Keywords.}
positive maps, extremal, exposed, atomic,
entanglement witness
}

{\scriptsize \noindent \textbf{MSC2010 codes.}
47H07  15B48  81P40}
}

\section*{Introduction}
\label{sec:Introduction}

\paragraph{}
Positive maps of operator algebras is an increasingly
popular subject of research,
both as a mathematical theory interesting in itself,
as well as a prominent domain of applications to quantum theory
\cite{stormer2013positive}.
Started in the pioneering work of Kadison
\cite{kadison1952generalized},
and Stinespring
\cite{stinespring1955positive},
the theory reached its first major breakthrough,
when St{\o}rmer and Woronowicz presented a structure theorem
for positive maps of low dimensional matrix algebras
\cite{stormer1963positive,woronowicz1976positive}.
It is also necessary to mention the work of \mbox{M.-D.\,Choi} here,
as the major contribution to the theory at every stage
\mbox{\cite{choi1975completely,choi1980some,choi1977extremal}}.
The second turning point came in 1990s,
when Peres and P.\,M.\,R.\,Horodeckis pointed out at the intrinsic relation
between separable states of composite quantum systems
and positive maps of algebras of observables
\cite{peres1996separability,horodecki1996separability}.
It turns out that there is a one-to-one correspondence between
positive maps and entanglement witnesses
\cite{chruscinski2014entanglement},
and the Peres-Horodecki criterion,
whether a quantum state is separable,
is computationally feasible as long as a structure theorem
similar to that proven by St{\o}rmer and Woronowicz holds true.
Unfortunately,
whereas that correspondence does exists even for
the most general infinite-dimensional quantum systems
\mbox{\cite{stormer2009separable,miller2014horodeckis}},
higher dimensional situation lacks
the complete description of positive maps
and one needs a deeper understanding of their highly nontrivial structure.
Because the set of positive maps forms a convex cone,
its elements can be characterised as convex combinations of extremal ones.
This is a consequence of the celebrated Krein-Milman theorem
\cite{krein1940extreme}, as for every positive number $r > 0$,
the set of positive maps such that their operator norm: $||S|| \leq r$,
is compact.
This is certainly true for maps on finite-dimensional matrix algebras,
but applies also to the general setting of von Neumann algebras \cite{miller2014horodeckis}.
Despite considerable effort,
examples of extremal positive maps,
even in the low-dimensional case,
are scarce
\cite{choi1977extremal,osaka1992class,ha2011entanglement,chruscinski2011exposed}.
In this paper, we deal exclusively with extremal maps as extreme points in
the cone of all positive maps on matrix algebras (see below).

In order to facilitate the further study of extremal positive maps,
we propose to take a closer look at their stable subspaces.
In general, by a 'stable subspace' of a positive map
$S \! : M_{n} \rightarrow M_{n}$,
where $M_{n}$ stands for the algebra of square complex matrices
of size $n$,
we mean a particular subspace $K_{S} \subset M_{n}$
(in fact, a JB$^{*}$-algebra, see
\mbox{Corollary \ref{cor:KisJordanAlgebra}}
below),
such that the map is a Jordan automorphism on $K_{S}$ and
$S^{k} \rightarrow 0$ strongly
on the orthogonal complement of $K_{S}$,
as $k \rightarrow \infty$
(see the more precise definition below).
We say that the map $S$ is strongly ergodic,
if $K_{S}$ is isomorphic to the set of complex numbers.
Adapting the previous results in this matter from
\cite{olkiewicz1999environment},
we establish the existence of the isometric-sweeping
decomposition for a positive map that preserves trace and
the matrix identity
(so-called bistochastic maps).
Such decomposition says precisely that $S$ must be
a Jordan automorphism of $K_{S}$,
and its powers tend strongly to $0$ for any matrix orthogonal to $K_{S}$.
What is interesting in this respect,
is that if we narrow our interest to the maps acting on $M_{3}$,
it turns out that there are only three possible
forms the algebra $K_{S}$ can have.
Moreover, it seems that all previously known examples of extremal positive
maps of $M_{3}$ fall into only two of the three possible categories:
in particular,
it is easy to see that for a Jordan automorphism $S(A) = U^{*} A \, U$,
or $S(A) = U^{*} A^{t} \, U$,
where $U$ is unitary,
$K_{S} = M_{3}$;
whereas the Choi map
\cite{osaka1992class,choi1977extremal}
is strongly ergodic.
The remaining possibility among those three,
namely the two dimensional commutative subalgebra,
requires from us to expand on an example of a positive map
that cannot be classified as belonging to one of the types
previously encountered in the literature.
One of the main results of this paper is the proof
that the map provided by us as the example is indeed extremal and atomic
\cite{ha1998atomic}.
Moreover, we show that the map is also exposed.
This fact gives immediately a useful entanglement witness
that the authors hope could serve as a prototypic case in further study
of the entanglement of three-level quantum systems
\cite{bertlmann2005optimal,caves2000qutrit}.

The structure of the paper is as follows.
In Section \ref{sec:Preliminaries},
we introduce some basic notions and notation.
In Section \ref{sec:Decomposition},
following \cite{olkiewicz1999environment},
we establish the existence of the isometric-sweeping
decomposition of bistochastic maps of finite dimensional
matrix algebra $M_{n}$.
Next, in Section \ref{sec:ExtremalMaps},
we provide the main result of this paper and prove that
for bistochastic map of $M_{3}$
the stable subspace of the decomposition takes only one of three
possible forms.
We end the paper with an original example of an extremal positive map of
the algebra $M_{3}$;
we compute the entanglement witness associated with the extremal map
and specify a large family of entangled states detected by it.

% Preliminaries
\section{Preliminaries}
\label{sec:Preliminaries}

\paragraph{}
Let $n \in \mathbb{N}$.
The complex linear space $\mathbb{C}^{n}$ consists of column vectors:
$\eta, \xi$, etc.; the respective row vectors are denoted
$\eta^{t}, \xi^{t}$, etc.
The bar over a number, vector or a matrix always denotes
the element-wise complex conjugation: e.g.
$\overline{z}$, $\overline{\eta}$, $\overline{A}$, etc.
The space $\mathbb{C}^{n}$ is equipped with the inner product
$\langle \eta, \xi \rangle = \eta^{*} \xi$,
where $\eta^{*} = \overline{\eta}^{\,t}$,
and $||\eta||^{2} = \eta^{*} \eta$.
To avoid confusion when two different spaces,
say $\mathbb{C}^{m}$ and $\mathbb{C}^{n}$, are involved,
we distinguish vectors belonging to one of them with an arrow:
e.g. $\vec{\eta}$, $\vec{\xi}$.
Let $M_{n} = M_{n}(\mathbb{C})$ be the algebra
of square complex matrices of size $n$.
We will use letters $A, B, C$, etc. to specify a matrix of $M_{n}$.
The norm of $A$, denoted by $||A||$, is understood as the operator
norm of $A$ as a linear map acting on $\mathbb{C}^{n}$.
For a vector $\eta \in \mathbb{C}^{n}$, $\eta \neq 0$,
by $P_{\eta}$ or $P({\eta}) \in M_{n}$,
we denote the rank-one operator
$P_{\eta}  =  \eta \eta^{*}$.
Of course, when $||\eta|| = 1$,
$P_{\eta}$ is the orthogonal projection onto one-dimensional space
spanned by $\eta$.
For $A \in M_{n}$,
we denote its trace by $\text{Tr} A$;
and by $A^{t}$ and $A^{*} = \overline{A}^{\,t}$
its transpose and conjugate transpose, respectively.
We say that a matrix $A$ is positive-semidefinite,
or simply \emph{positive},
if $\eta^{*} A \eta \geq 0$ for any $\eta \in \mathbb{C}^{n}$
(i.e. $A = A^{*}$ and $A$ has a non-negative spectrum).

A linear map $S\!: M_{n} \rightarrow M_{n}$ is said to be positive,
indicated as $S \geq 0$,
if for any $A \in M_{n}$ such that $A \geq 0$,
we have $S(A) \geq 0$.
For a positive map $S$,
its operator norm is given by $||S|| = S(\mathbf{1})$,
where $\mathbf{1}_{n}$, or simply $\mathbf{1}$,
is the identity matrix of $M_{n}$.
Any positive map is Hermitian,
i.e.  $S(A^{*}) = S(A)^{*}$, for all $A \in M_{n}$.
The identity map of $M_{n}$ is labelled $I_{n}$,
or simply $I$.
The convex cone of all positive maps of $M_{n}$ is denoted
by $\mathcal{P}(M_{n})$.
For $k \in \mathbb{N}$, a map $S \in \mathcal{P}(M_{n})$,
such that the map
$I_{k} \otimes S :  M_{k} \! \otimes \! M_{n}
 \rightarrow  M_{k} \! \otimes \! M_{n}$
is positive,
is called $k$-positive.
If a map is a $k$-positive map for every $k$,
it is called completely positive.
Similarly, a map is $k$-\emph{co}positive,
or completely copositive,
if $I_{k} \otimes (S \circ t)$ is positive for
some $k$, or for every $k$, respectively,
where $t \! : A \mapsto A^{t}$,
$A \in M_{n}$, is the transposition map.
A positive map $S$ is called decomposable,
if it can be written in the form
$S(A) = \Lambda_{1}(A) + \Lambda_{2} (A^{t})$,
where both maps $\Lambda_{1}, \Lambda_{2}$ are completely positive,
possibly zero
(see \cite{choi1975completely} for more details on completely positive maps).
It is called atomic \cite{ha1998atomic},
if it cannot be written as a sum of 2-positive and 2-copositive maps.
A positive map $S$ is extremal,
if for any positive map $T: M_{n} \rightarrow M_{n}$ such that
$S - T \in \mathcal{P}(M_{n})$,
i.e. $0 \leq T \leq S$,
we have $T = \alpha S$ for some number $0 \leq \alpha \leq 1$.
We denote the set of extremal maps of $\mathcal{P}(M_{n})$
by $\text{Ext}(M_{n})$.
It is true that every positive map
can be written as a convex combination of extremal ones.
Nevertheless, it could be of use to specify a dense subset
of $\text{Ext}(M_{n})$,
such that it is easier to handle its elements instead of
general extremal maps.
Hence, we say that a positive map $S$ of the matrix algebra
$M_{n}$ is exposed
\cite{marciniak2013rank},
if for all $T \in \mathcal{P}(M_{n})$ such that
$\text{Tr}\, P_{\xi} \, T(P_{\eta}) = 0$,
where $\mathbb{C}^{n} \ni \eta, \xi \neq 0$ is any pair for which
$\text{Tr}\, P_{\xi} \, S(P_{\eta}) = 0$,
we have that $T = \alpha S$, $\alpha \geq 0$.
Due to the Straszewicz theorem \cite{straszewicz1935exponierte},
the set of exposed maps of $M_{n}$ is indeed dense in $\text{Ext}(M_{n})$.

By a JB$^{*}$-algebra $K$ we understand a complex Banach space
which is also a complex Jordan algebra.
We always assume that $\mathbf{1} \in K$.
See
\cite{hanche1984jordan}
for the overview of the theory of JB$^{*}$-algebras.

% Isometric-sweeping of S
\section{Decomposition of bistochastic maps}
\label{sec:Decomposition}

\paragraph{}
Let $S\!: M_{n} \rightarrow M_{n}$ be a positive map such that
$S(\mathbf{1}) = \mathbf{1}$,
$\text{Tr} S(A) = \text{Tr} A$,
for any $A \in M_{n}$.
We call such a map \emph{bistochastic}.
It is easy to see that $S$ is a contraction in
the Hilbert-Schmidt norm (\emph{HS-norm}) on $M_{n}$,
defined as
$||A||_{HS} = \left( \text{Tr} \, A^{*} A \right)^{1/2}$.
Indeed,
since $S$ fulfils the Kadison-Schwarz inequality,
\begin{equation}
\label{eq:SchwarzInequality}
    S(A^{*}) \, S(A) \: \leq \: S(A^{*} A),
\end{equation}
for any normal element $A \in M_{n}$ (see Prop.\,3.6 of \cite{choi1980some}),
assuming at first that $A = A^{*}$,
we have
\begin{equation}
\label{RandomLabel:712874}
    || S(A) ||_{HS}^{2} \: = \: \text{Tr} S(A)^{2}
    \: \leq \:  \text{Tr} S(A^{2}) \: = \:
        \text{Tr} A^{2} \: = \: ||A||_{HS}^{2}.
\end{equation}
By representing a general element $A \in M_{n}$ as a sum
$A = A_{1} + i A_{2}$,
where both $A_{1}, A_{2}$ are self-adjoint,
and repeating essentially the same calculation as in
\eqref{RandomLabel:712874},
we obtain the assertion.

Next,
we are going to define an isometric splitting of $S$,
drawing from the ideas presented in \cite{olkiewicz1999environment}.
Because $S$ is a contraction in the HS-norm on the Hilbert space $M_{n}$,
equipped with the Hilbert-Schmidt inner product,
that space can be decomposed into a direct sum of a space $K_{S}$,
defined as
\begin{equation}
\label{def:definitionofK}
    K_{S} \: = \: \left\{
        A \in M_{n}: \,\,
            || S^{k} A ||_{HS} = || S^{* k} A ||_{HS} = || A ||_{HS}, \:\:
            \forall k \in \mathbb{N}
        \right\},
\end{equation}
and its orthogonal complement $K_{S}^{\perp}$.
By $S^{*}$, we denote the bistochastic map of $M_{n}$,
which is the adjoint of $S$ as a linear operator on the Hilbert space $M_{n}$,
i.e. $\text{Tr}\, S^{*} (A)\, B = \text{Tr} A \, S(B)$,
for every $A, B \in M_{n}$.
It is true that $A \in K_{S}$,
if and only if
$S^{* k} S^{k} A = S^{k} S^{* k} A = A$,
for any $k \in \mathbb{N}$.
The following proposition,
taken with slight modification from
\cite{olkiewicz1999environment},
puts together some of the characteristics of $K_{S}$.

\begin{proposition}
\label{prop:propertiesofK}
Suppose $S$ is a bistochastic map of $M_{n}$,
and the subspace $K_{S}$ is defined as in \eqref{def:definitionofK}.
Then:

% Enumerate the list like: a), b), c) etc.
\let \oldlabelenumi \labelenumi
\renewcommand{\labelenumi}{\alph{enumi})}
\begin{enumerate}
\item $\mathbf{1} \in K_{S}$;
\item $A \in K_{S}$ implies that $A^{*} \in K_{S}$;
\item  $A  \in K_{S}$ implies that
$|A| = (A^{*}A)^{1/2} \in K_{S}$;
\item if $A, B \in K_{S}$, then $AB + BA \in K_{S}$;
\item if $A = A^{*} \in K_{S}$ and $A = \sum_{i=1}^{k} \lambda_{i} P_{i}$,
where each $\lambda_{i} \neq 0$ is different,
and each $P_{i}$ is a orthogonal projection in $M_{n}$,
then $P_{i} \in K_{S}$ for any $i = 1,2,\ldots,k$;
\item if $P \in K_{S}$ is an orthogonal projection,
then $S(P)$ and $S^{*}(P)$ are orthogonal projections as well,
and $\mathrm{dim} \, S(P) = \mathrm{dim} \, S^{*}(P) = \mathrm{dim} \, P$;
\item if $P, Q \in K_{S}$ are orthogonal projections such that $P Q = 0$,
then $S(P) S(Q) = S^{*}(P) S^{*}(Q) = 0$.
\end{enumerate}
% Return to the old enumaration style
\let \labelenumi \oldlabelenumi
\end{proposition}

\begin{proof}
a) obvious, since $S$ is bistochastic;
b), c) as in Prop. 5\,a) and 5\,b) of \cite{olkiewicz1999environment}.

d)  Suppose at first that $A = A^{*} \in K_{S}$.
Now, $S^{*k} S^{k}(A) = S^{k} S^{*k}(A) = A$,
and, as a result of the Kadison-Schwarz inequality applied to the map
$S^{*k} S^{k}$,
\begin{equation}
A^{2} \: = \: \left( S^{*k} S^{k}(A) \right) \left( S^{*k} S^{k}(A) \right)
    \: \leq \: S^{*k} S^{k}(A^{2}).
\end{equation}
Hence
\begin{equation}
||A^{2}||_{HS} \: \leq \: || S^{*k} S^{k}(A^{2}) ||_{HS} \: \leq \:
    || S^{k}(A^{2}) ||_{HS} \: \leq \: ||A^{2}||_{HS},
\end{equation}
i.e. $|| S^{k}(A^{2}) ||_{HS} = ||A^{2}||_{HS}$.
By a similar argument
$|| S^{*k}(A^{2}) ||_{HS} = ||A^{2}||_{HS}$,
and thus $A^{2} \in K_{S}$.
Now, for any $A, B \in K_{S}$, such that $A = A^{*}$, $B = B^{*}$,
we have
$AB + BA = (A + B)^{2} - A^{2} - B^{2} \in K_{S}$.
For a general $A \in K_{S}$, we write
$A = A_{1} + i A_{2}$, where $A_{1}, A_{2}$ are both Hermitian.
Then
$A^{2} = A_{1}^{2} - A_{2}^{2} + i(A_{1} A_{2} + A_{2} A_{1}) \in K_{S}$.
It is now evident that $AB+BA \in K_{S}$ for general $A,B \in K_{S}$.

e) as in Prop. 5\,d);
f), g) as in Prop. 6\,a) and 6\,c) of
\cite{olkiewicz1999environment}.
\end{proof}

From what has been said above,
follows immediately the next observation.

\begin{corollary}
\label{cor:KisJordanAlgebra}
The space $K_{S}$, with the matrix norm $|| \cdot ||$,
and the multiplication $A \circ B = \frac{1}{2}(AB + BA)$,
is a JB$^{*}$-algebra.
The map $S$ is a Jordan automorphism on $K_{S}$ and
\begin{equation}
\label{eq:SGoesTo0OnKOrth}
    \lim \limits_{k\rightarrow \infty} S^{k}(A)  \: = \:
    \lim \limits_{k\rightarrow \infty} S^{*k}(A) \: = \: 0,
\end{equation}
for any $A \in K_{S}^{\perp}$.
\end{corollary}

\begin{proof}
It is obvious that $K_{S}$ is a complex Banach space.
From Proposition \ref{prop:propertiesofK}\,b),
we have that $K_{S}$ is equipped with involution,
and from point d)
that $K_{S}$ is a Jordan algebra.
Since the map $S$ is invariant with respect to the subspaces
$K_{S}$ and $K_{S}^{\perp}$,
and of course $M_{n} = K_{S} \oplus K_{S}^{\perp}$,
we see that $S$ splits into direct sum
$S = S_{1} \oplus S_{2}$,
where $S_{1} = S_{| K_{S}}$, $S_{2} = S_{| K_{S}^{\perp}}$.
From Prop. 7a) of
\cite{olkiewicz1999environment},
we have that $S(A^{*} A) = S(A)^{*} S(A)$,
i.e. $S$ is a Jordan homomorphism on $K_{S}$.
Moreover,
because $S^{*} S = S S^{*} = I$ on $K_{S}$,
the map $S_{1}$ is invertible,
and thus it is a Jordan automorphism
(see Definition 3.2.1(6) in \cite{bratteli2003operator}).
From the definition \eqref{def:definitionofK} of the space $K_{S}$,
follows easily that
eq. \eqref{eq:SGoesTo0OnKOrth} holds.
\end{proof}

\begin{theorem}
\label{thm:FromESbook}
Let $K \subset M_{n}$ be a JB$^{*}$-subalgebra of $M_{n}$.
There is a bistochastic map
$S \! : M_{n} \rightarrow M_{n}$ such that $K = K_{S}$.
\end{theorem}
\begin{proof}
We consider the space $M_{n}$ to be a Hilbert space equipped
with the Hilbert-Schmidt inner product.
Let $S\!: M_{n} \rightarrow K \subset M_{n}$ be the
orthogonal projection onto $K$.
It is evident that $S(\mathbf{1}) = \mathbf{1}$,
and because $S = S^{*}$,
the map $S$ also preserves trace and
the space $K$ is a stable subspace for $S$,
provided $S$ is a positive map.
Let then $A \in M_{n}$ be a positive matrix.
Since $K$ is JB$^{*}$-algebra,
$(SA)^{*} \in K$.
Because
$|| A - SA ||_{HS} = || A - (SA)^{*} ||_{HS}$,
and $SA$ is the best approximation of $A$ in the space $K$,
we have that $(SA)^{*} = SA$.
We write then $SA = B_{+} - B_{-}$,
where both $B_{+}, B_{-}$ are positive and
$B_{+} B_{-} = 0$.
We have assumed that $\mathbf{1} \in K$,
and because $(SA)^{k} \in K$ for any $k \in \mathbb{N}$,
we have that also the modulus $|S A| \in K$
(compare the explicit formula for
the square-root of a positive matrix in \cite{bratteli2003operator}, p. 34).
Hence both $B_{+}, B_{-} \in K$.
We compute
\begin{multline}
|| A - SA ||_{HS}^{2} \: = \: \text{Tr} \, ( A - SA )^{2} \: = \:
    \text{Tr} \, ( A - B_{+} + B_{-} )^{2} \: = \: \\
    \text{Tr} \, ( A - B_{+} )^{2} +
        2 \, \text{Tr} \, ( A - B_{+} ) B_{-} + \text{Tr} \, B_{-}^{2}
            \: = \: \\
    || A - B_{+} ||_{HS}^{2} +
        2 \, \text{Tr} \,  A \, B_{-}+ \text{Tr} \, B_{-}^{2}
    \: \geq \: || A - B_{+} ||_{HS}^{2}.
\end{multline}
Again, since $SA$ is the best approximation of $A$ in $K$,
we have $SA = B_{+}$, i.e. $SA \geq 0$, which ends the proof.
\end{proof}

From the above,
we know that $K_{S}$ has additional structure of a JB$^{*}$-algebra.
We will see in the following that,
with additional assumption imposed on S,
this algebra must necessarily
have a specific structure,
at least for low dimensional matrices.

\section{Extremal positive maps}
\label{sec:ExtremalMaps}

\paragraph{}
In this section, we focus on maps of the algebra $M_{3}$.
For convenience, let us label four orthogonal projections:
\begin{equation}
\label{def:OrthogonalProjections}
    P_{1} = \begin{pmatrix}
        1 & 0 & 0 \\
        0 & 0 & 0 \\
        0 & 0 & 0
    \end{pmatrix} , \quad \quad
    P_{2} = \begin{pmatrix}
        0 & 0 & 0 \\
        0 & 1 & 0 \\
        0 & 0 & 0
    \end{pmatrix} , \quad \quad
    P_{3} = \begin{pmatrix}
        0 & 0 & 0 \\
        0 & 0 & 0 \\
        0 & 0 & 1
    \end{pmatrix},
\end{equation}
and $P_{12} = P_{1} + P_{2}$.

It is of importance to us that
Theorems 5.3.8 and 6.2.3 of \cite{hanche1984jordan}
imply that every JB$^{*}$-algebra contained in $M_{3}$ is
isomorphic to one of the following:
$\mathbb{C}\mathbf{1}$,
$\mathbb{C} P_{12} \oplus \mathbb{C} P_{3}$,
$\mathbb{C} P_{1} \oplus \mathbb{C} P_{2} \oplus \mathbb{C} P_{3}$,
$M_{2} \oplus \mathbb{C} P_{3}$,
$M_{2}^{s} \oplus P_{3}$,
$M_{3}^{s}$,
and
$M_{3}$ itself,
where $M_{n}^{s}$ is the Jordan algebra of symmetric matrices of
size $n$: $M_{2}^{s} = \{ A \in M_{n}: A = A^{t} \}$.

\begin{theorem}
\label{thm:ExposedMaps}
Let $S\!: M_{3} \rightarrow M_{3}$ be an extremal bistochastic map.
Then the JB$^{*}$-algebra $K_{S}$ is isomorphic to one of the following:
$\mathbb{C}\mathbf{1}$, $\mathbb{C} P_{12} \oplus \mathbb{C} P_{3}$,
or
$M_{3}$.
\end{theorem}

\begin{proof}
1. We proof the assertion by excluding all other possible forms of
$K_{S}$ in the first place.
Let $K_{S}$ be one of the following JB$^{*}$-algebras:
$\mathbb{C} P_{1} \oplus \mathbb{C} P_{2} \oplus \mathbb{C} P_{3}$,
$M_{2} \oplus \mathbb{C} P_{3}$,
$M_{2}^{s} \oplus P_{3}$, or $M_{3}^{s}$.
Then $K_{S}$ contains the projections $P_{1}, P_{2}, P_{3}$,
and because $S$ is a Jordan automorphism on $K_{S}$:
\begin{multline}
    \text{Tr} \, S(P_{i}) S(P_{j}) = \\
= \frac{1}{2} \text{Tr} \, \left( S(P_{i}) S(P_{j}) + S(P_{j}) S(P_{i}) \right)=
\frac{1}{2} \text{Tr} \, S(P_{i} P_{j} + P_{j} P_{i})=
\text{Tr} \, P_{i} P_{j} = \delta_{ij},
\end{multline}
where $i,j = 1,2,3$ and $\delta_{ij}$ is the Kronecker delta.
Hence, $\left\{S(P_{i})\right\}_{i=1}^{3}$
is a triple of rank-one, mutually orthogonal projections.
There is a unitary matrix $U \in M_{3}$, such that
$U^{*} S(P_{i}) U = P_{i}$, for $i = 1,2,3$.
Let us define $\tilde{S}(A) = U^{*} S(A) U$.
Then $\tilde{S}$ is an extremal
\cite[Lemma 3.1.2b, p.\,27]{stormer2013positive}
bistochastic map such that
$\tilde{S}(P_{i}) = P_{i}$, $i = 1,2,3$.
By \cite[Theorem 4.1]{kye1995positive},
$\tilde{S}$ is decomposable,
which contradicts either the fact that $S$ is extremal
or $K_{S} \neq M_{3}$.

2.
While it is easy to see that there are extremal maps for which
$K_{S}=M_{3}$ (take e.g. $S(A) = U A U^{*}$ for a unitary matrix $U$),
or $K_{S}=\mathbb{C} \mathbf{1}$
(take the celebrated Choi map
\cite{choi1977extremal});
it is not that straightforward to provide an example of
an extremal bistochastic map which has
$K_{S}= \mathbb{C} P_{12} \oplus \mathbb{C} P_{3}$.

Let then $S\!: M_{3} \rightarrow M_{3}$ be a linear map defined as
\begin{equation}
\label{eq:DefinitionOfS}
S(A) \:=\: \begin{pmatrix}
        \frac{1}{2}(a_{11} + a_{22}) & 0 & \frac{1}{\sqrt{2}} a_{13} \\
        0 & \frac{1}{2}(a_{11} + a_{22}) & \frac{1}{\sqrt{2}} a_{32} \\
        \frac{1}{\sqrt{2}} a_{31} & \frac{1}{\sqrt{2}} a_{23} & a_{33}
        \end{pmatrix},
\end{equation}
for
$A = \left( a_{ij} \right)_{i,j=1}^{3}
        \in M_{3}$.
If we use the notation
$A = \left( \begin{smallmatrix}
    B & \vec{u} \\
    \vec{w}^{t} & z
    \end{smallmatrix} \right)$,
for $B \in M_{2}$,
$\vec{u},\vec{w} \in \mathbb{C}^{2}$ are column vectors,
and $z \in \mathbb{C}$,
the map $S$ acts by
\begin{equation}
    S(A) \:=\: S \begin{pmatrix}
    B & \vec{u} \\
    \vec{w}^{t} & z
    \end{pmatrix} \: = \:
    \begin{pmatrix}
        \frac{1}{2} (\text{Tr} B) \, \mathbf{1}_{2} &
            \frac{1}{\sqrt{2}}(\hat{P}_{1} \vec{u} + \hat{P}_{2} \vec{w}) \\
        \frac{1}{\sqrt{2}}(\hat{P}_{1} \vec{w} + \hat{P}_{2} \vec{u})^{t} & z
    \end{pmatrix},
\end{equation}
where
$\hat{P}_{1} = \left( \begin{smallmatrix} 1 & 0 \\ 0 & 0 \end{smallmatrix} \right)$,
$\hat{P}_{2} = \left( \begin{smallmatrix} 0 & 0 \\ 0 & 1 \end{smallmatrix} \right)$,
and $\mathbf{1}_{2}$ is the identity matrix of $M_{2}$.
Provided the next Lemma \ref{lem:SIsExtremal} is true,
this example ends the proof.
\end{proof}

\begin{lemma}
\label{lem:SIsExtremal}
$S$ is an bistochastic, extremal and atomic map.
\end{lemma}

\begin{proof}
In order to prove that $S$ is a positive map,
it is enough to show that for any $\eta \in \mathbb{C}^{3}\backslash\{0\}$,
$SP_{\eta} \geq 0$,
where $P_{\eta}$ is a rank-one operator,
$P_{\eta} = \eta \eta^{*}$.
Let us then take
$\eta = (\eta_{1}, \eta_{2}, \eta_{3}) = (\vec{\eta}, \eta_{3})$,
$\vec{\eta} = (\eta_{1}, \eta_{2}) \in \mathbb{C}^{2}\backslash\{0\}$,
$\eta_{3} \in \mathbb{C}$.
We have then
\begin{multline}
 SP_{\eta} \:=\:  S \begin{pmatrix}
    \vec{\eta} \vec{\eta}^{\,*} & \overline{\eta}_{3} \vec{\eta} \\
    \eta_{3} \vec{\eta}^{\,*}   & |\eta_{3}|^{2}
 \end{pmatrix} \: = \: \\
 = \begin{pmatrix}
  \frac{||\vec{\eta}||^{2}}{2} \mathbf{1}_{2} &
        \frac{1}{\sqrt{2}} \left ( \overline{\eta}_{3} \hat{P}_{1} \vec{\eta} +
          \eta_{3} \hat{P}_{2} \overline{\vec{\eta}} \right) \\
\frac{1}{\sqrt{2}} \left ( \overline{\eta}_{3} \hat{P}_{1} \vec{\eta} +
          \eta_{3} \hat{P}_{2} \overline{\vec{\eta}} \right)^{*} &
        |\eta_{3}|^{2}
 \end{pmatrix}.
\end{multline}
If $\eta_{3} = 0$, then of course $SP_{\eta} \geq 0$.
In the case when $\eta_{3} \neq 0$,
taking the Schur complement
(see \cite[Theorem 1.12, p.34]{zhang2006schur}),
we have that $SP_{\eta} \geq 0$, if and only if
\begin{equation}
\label{ieq:SchurForS}
   \left ( \overline{\eta}_{3} \hat{P}_{1} \vec{\eta} +
    \eta_{3} \hat{P}_{2} \overline{\vec{\eta}} \right)
   \left ( \overline{\eta}_{3} \hat{P}_{1} \vec{\eta} +
    \eta_{3} \hat{P}_{2} \overline{\vec{\eta}} \right)^{*}
    \: \leq \:
        |\eta_{3}|^{2} \, ||\vec{\eta}||^{2} \, \mathbf{1}_{2},
\end{equation}
but it is easy to see that this inequality is fulfilled:
\begin{multline}
   \left ( \overline{\eta}_{3} \hat{P}_{1} \vec{\eta} +
    \eta_{3} \hat{P}_{2} \overline{\vec{\eta}} \right)
   \left ( \overline{\eta}_{3} \hat{P}_{1} \vec{\eta} +
    \eta_{3} \hat{P}_{2} \overline{\vec{\eta}} \right)^{*} \: \leq \:
|| \overline{\eta}_{3} \hat{P}_{1} \vec{\eta} +
    \eta_{3} \hat{P}_{2}\overline{\vec{\eta}} ||^{2} \, \mathbf{1}_{2}
    \: = \: \\
\left( || \overline{\eta}_{3} \hat{P}_{1} \vec{\eta} ||^{2} +
    || \eta_{3} \hat{P}_{2} \overline{\vec{\eta}} ||^{2} \right) \, \mathbf{1}_{2}
    \: = \:
|\eta_{3}|^{2} \, ||\vec{\eta}||^{2} \, \mathbf{1}_{2}.
\end{multline}
Thus, $S$ is a bistochastic map.
We also have
$K_{S}= \mathbb{C} P_{12} \oplus \mathbb{C} P_{3}$.
Indeed,
one computes immediately that for $A \in M_{3}$:
\begin{equation}
\lim \limits_{k \rightarrow \infty} S^{k}(A) \:=\:
\frac{1}{2} (\text{Tr} \, P_{12} A )\, P_{12} +
    (\text{Tr} \, P_{3} A)\, P_{3} \, \in K_{S}.
\end{equation}
From that and from the definition \eqref{def:definitionofK},
follows the particular form of the JB$^{*}$-algebra $K_{S}$.

We are going to show now that $S$ is extremal.
Let $S_{0}: M_{3} \rightarrow M_{3}$ be a positive map such that
$0 \leq S_{0} \leq S$.
We have $S_{0}(P_{3}) \leq S(P_{3}) = P_{3}$,
and hence $S_{0}(P_{3}) = \alpha P_{3}$ for some $0 \leq \alpha \leq 1$.
Remembering about the embedding \eqref{RandomLabel:450031},
we want to show that $S_{0}(A) \in M_{2} \! \subset \! M_{3}$
for any $A \in M_{2} \! \subset \! M_{3}$.
Let $B \in M_{2}$ and suppose at first that $B \geq 0$.
Then
\begin{equation}
\label{eq:SMapsM2intoM2}
 0 \:\leq\: S_{0} \begin{pmatrix}
               B & \vec{0} \\ \vec{0}^{t} & 0
              \end{pmatrix} \: = \:
 \begin{pmatrix}
  \hat{S}_{0}(B) & \vec{u} \\ \vec{w}^{t} & r
 \end{pmatrix},
\end{equation}
for some vectors $\vec{u}, \vec{w} \in \mathbb{C}^{2}$ and $r \geq 0$.
The map $\hat{S}_{0}:B \mapsto \hat{S}_{0}(B) \in M_{2}$ must be a positive
map of $M_{2}$ such that $\hat{S}_{0}(B) \leq \frac{1}{2} (\text{Tr} B) \mathbf{1}_{2}$.
On the other hand,
\begin{equation}
 0 \: \leq \:
 \begin{pmatrix}
  \hat{S}_{0}(B) & \vec{u} \\ \vec{w}^{t} & r
 \end{pmatrix} \: \leq \:
            S \begin{pmatrix}
               B & \vec{0} \\ \vec{0}^{t} & 0
              \end{pmatrix} \: = \:
 \begin{pmatrix}
  \frac{1}{2} (\text{Tr} B) \, \mathbf{1}_{2} & \vec{0} \\ \vec{0}^{t} & 0
 \end{pmatrix},
\end{equation}
and hence $r=0$, $\vec{u}=\vec{w}=\vec{0}$.
Because any matrix $B \in M_{2}$ is a complex combination of four positive
matrices, we have that indeed $S_{0}(A) \in M_{2} \! \subset \! M_{3}$
for any $A \in M_{2} \! \subset \! M_{3}$.

Let $\{e_{i}\}_{i=1}^{3}$ be the standard orthonormal basis of $\mathbb{C}^{3}$
and $\{ E_{jk} \}_{j,k=1}^{3}$ be the set of matrix units in $M_{3}$,
$E_{jk} = e_{j} e_{k}^{*}$.
We show that for $i = 1,2,3$ and $j=1,2$;
$\langle e_{i}, S_{0}(E_{j3}) e_{i} \rangle = 0$,
and $\langle e_{1}, S_{0}(E_{j3}) e_{2} \rangle =
    \langle e_{2}, S_{0}(E_{j3}) e_{1} \rangle = 0$.
Fix $i,j$, and take
$X = |z_{1}|^{2} P_{j} + z_{1} \overline{z_{2}} E_{j3} +
\overline{z_{1}} z_{2} E_{3j} + |z_{2}|^{2} P_{3}$,
for some $z_{1}, z_{2} \in \mathbb{C}$.
It is evident that $X \geq 0$.
Hence, since $S_{0}(E_{j3}) = S_{0}(E_{3j})^{*}$,
\begin{equation}
0 \: \leq \: \langle e_{i}, S_{0}(X) e_{i} \rangle \: = \:
|z_{1}|^{2} \, \delta_{ij} +
2 \, \text{Re} \, z_{1} \overline{z_{2}} \,
    \langle e_{i}, S_{0}(E_{j3}) e_{i} \rangle +
|z_{2}|^{2} \, \delta_{i3},
\end{equation}
where $\delta_{ij}$ is the Kronecker delta.
Because the above equation is true for every $z_{1}, z_{2} \in \mathbb{C}$,
and $j \neq 3$,
it follows that necessarily
$\langle e_{i}, S_{0}(E_{j3}) e_{i} \rangle =0$.
Now, since $X \geq 0$, then so is $Y = P_{12} \, S_{0}(X) P_{12}$.
From what has been just shown,
$Y_{jj} = |z_{1}|^{2}$,
but the second diagonal element of $Y$ equals 0, and
hence $Y_{12} = Y_{21} = 0$,
which means that
$\langle e_{1}, S_{0}(E_{j3}) e_{2} \rangle
    = \langle e_{2}, S_{0}(E_{j3}) e_{1} \rangle = 0$.

Therefore, we can write that for any
$A  =   \left( \begin{smallmatrix}
    B & \vec{u} \\
    \vec{w}^{t} & z
    \end{smallmatrix} \right) \in M_{3}$,
\begin{equation}
    S_{0}(A) \:=\: S_{0} \begin{pmatrix}
    B & \vec{u} \\
    \vec{w}^{t} & z
    \end{pmatrix} \: = \:
    \begin{pmatrix}
        \hat{S}_{0}(B) & S_{1} \vec{u} + S_{2} \vec{w} \\
        (\overline{S}_{1} \vec{w} + \overline{S}_{2} \vec{u})^{t} & \alpha z
    \end{pmatrix},
\end{equation}
and $S_{1}, S_{2} \in M_{2}$, with matrix elements given by
\begin{equation}
(S_{1})_{ij} = \langle e_{i}, S(E_{j3}) e_{3} \rangle, \quad \quad
(S_{2})_{ij} = \langle e_{i}, S(E_{3j}) e_{3} \rangle.
\end{equation}

Suppose now that $\alpha = 0$.
Then, since $S_{0} P_{\eta} \geq 0$ for every
$\eta \in \mathbb{C}^{3}\backslash\{0\}$,
we have that $S_{1} = S_{2} = 0$.
Because
$0 \leq (S - S_{0}) P(1,1,1)$,
\begin{equation}
0 \: \leq \: \hat{S}_{0} \begin{pmatrix}
    1 & 1 \\ 1 & 1
    \end{pmatrix} \: \leq \:
    \mathbf{1}_{2} - \frac{1}{2} \begin{pmatrix}
                1 & 1 \\ 1 & 1
                \end{pmatrix} \: = \:
    \frac{1}{2}
    \begin{pmatrix}
    1 & -1 \\ -1 & 1
    \end{pmatrix},
\end{equation}
i.e. for some $\beta \geq 0$,
$
\hat{S}_{0} \left( \begin{smallmatrix}
    1 & 1 \\ 1 & 1
    \end{smallmatrix} \right) =
    \beta \left(
    \begin{smallmatrix}
    1 & -1 \\ -1 & 1
    \end{smallmatrix} \right)
$.
Repeating the same calculation, but this time for $P(i,i,1)$,
we obtain that for some $\beta' \geq 0$,
$
\hat{S}_{0} \left( \begin{smallmatrix}
    1 & 1 \\ 1 & 1
    \end{smallmatrix} \right) =
    \beta' \left(
    \begin{smallmatrix}
    1 & 1 \\ 1 & 1
    \end{smallmatrix} \right)
$,
and so
$
\hat{S}_{0} \left( \begin{smallmatrix}
    1 & 1 \\ 1 & 1
    \end{smallmatrix} \right) = 0
$.
Similarly,
$
\hat{S}_{0} \left( \begin{smallmatrix}
    1 & -1 \\ -1 & 1
    \end{smallmatrix} \right) = 0
$, and hence
$\hat{S}_{0}(\mathbf{1}_{2}) = 0$, i.e. $\hat{S}_{0} = 0$.
Therefore,  we can assume in the following that $\alpha > 0$.

Next, by direct computation, one proves that for any
$\vec{\eta} \in \mathbb{C}^{2}$:
\begin{equation}
 \label{eq:ZeroTrace}
 \text{Tr} \, P(-2\vec{\upsilon}, ||\vec{\eta}||^{2}) \, S P(\vec{\eta},1)
     \:=\: 0,
\end{equation}
where $\vec{\upsilon} =
 \frac{1}{\sqrt{2}} \left(
  \hat{P}_{1} \vec{\eta} + \hat{P}_{2} \overline{\vec{\eta}}
 \right)$,
$||\vec{\upsilon}||^{2} = \tfrac{||\vec{\eta}||^{2}}{2}$.
Because $0 \leq S_{0} \leq S$, the eq.
\eqref{eq:ZeroTrace} holds also for $S_{0}$.
Writing out the equation, and assuming from now on that
$||\vec{\eta}|| = 1$,
we get
\begin{equation}
 \label{eq:ZeroTraceExplicit}
 4 \, \vec{\upsilon}^{\,*} \hat{S}_{0}(\vec{\eta} \vec{\eta}^{\,*}) \vec{\upsilon} -
 4 \, \text{Re} \, \vec{\upsilon}^{\,*} \vec{\upsilon}_{0} + \alpha \: = \: 0,
\end{equation}
where $\vec{\upsilon_{0}} = S_{1} \vec{\eta} + S_{2} \overline{\vec{\eta}}$.
To keep the notation simple,
we remember that $\vec{\upsilon}$ and $\vec{\upsilon}_{0}$ depend on $\vec{\eta}$,
without signifying it explicitly.

Since $S_{0} P(\vec{\eta},1)$ is a positive matrix,
using again the Schur complement,
$\vec{\upsilon}_{0} \vec{\upsilon}_{0}^{\,*} \leq  \alpha \hat{S}_{0}(\vec{\eta} \vec{\eta}^{\,*})$,
and thus
$|\vec{\upsilon}^{\,*} \vec{\upsilon}_{0}|^{2} \leq
  \alpha \vec{\upsilon}^{\,*} \hat{S}_{0}(\vec{\eta} \vec{\eta}^{\,*}) \vec{\upsilon}$.
Therefore
\begin{equation}
4 \left( \text{Im} \, \vec{\upsilon}^{\,*} \vec{\upsilon}_{0} \right)^{2} +
\left( 2 \, \text{Re} \, \vec{\upsilon}^{\,*} \vec{\upsilon}_{0} - \alpha \right)^{2}
 \: \leq \:
4 \alpha \, \vec{\upsilon}^{\,*} \hat{S}_{0}(\vec{\eta} \vec{\eta}^{\,*}) \vec{\upsilon}
    - 4 \alpha \, \text{Re} \, \vec{\upsilon}^{\,*} \vec{\upsilon}_{0} + \alpha^{2}  = 0,
\end{equation}
i.e. $\vec{\upsilon}^{\,*} \vec{\upsilon}_{0} = \frac{\alpha}{2}$.
Substituting both $\vec{\upsilon}$ and $\vec{\upsilon}_{0}$,
we obtain:
\begin{equation}
\label{eq:ComplicatedForEtaPlus}
\vec{\eta}^{\,*} \left( \hat{P}_{1} S_{1} + S_{2}^{t} \hat{P}_{2} \right) \vec{\eta}
    + \vec{\eta}^{\,*} \hat{P}_{1} S_{2} \overline{\vec{\eta}}
    + \vec{\eta}^{\,t} \hat{P}_{2} S_{1} \vec{\eta} \: = \: \frac{\alpha}{\sqrt{2}}.
\end{equation}
Because this holds true for any $\vec{\eta} \in \mathbb{C}^{2}$,
we can repeat the whole argument,
but this time changing $\vec{\eta} \mapsto i \vec{\eta}$,
to obtain:
\begin{equation}
\label{eq:ComplicatedForEtaMinus}
\vec{\eta}^{\,*} \left( \hat{P}_{1} S_{1} + S_{2}^{t} \hat{P}_{2} \right) \vec{\eta}
    - \vec{\eta}^{\,*} \hat{P}_{1} S_{2} \overline{\vec{\eta}}
    - \vec{\eta}^{\,t} \hat{P}_{2} S_{1} \vec{\eta} \: = \: \frac{\alpha}{\sqrt{2}}.
\end{equation}
Adding together \eqref{eq:ComplicatedForEtaPlus} and \eqref{eq:ComplicatedForEtaMinus},
we have
$
\vec{\eta}^{\,*} \left( \hat{P}_{1} S_{1} + S_{2}^{t} \hat{P}_{2} \right) \vec{\eta} =
    \frac{\alpha}{\sqrt{2}},
$
for any $\vec{\eta}$.
Hence
\begin{equation}
\label{eq:S1PlusS2EqualsOne}
\hat{P}_{1} S_{1} + S_{2}^{t} \hat{P}_{2} \: = \:
     \frac{\alpha}{\sqrt{2}} \mathbf{1}_{2}.
\end{equation}
Subtracting \eqref{eq:ComplicatedForEtaMinus} from \eqref{eq:ComplicatedForEtaPlus},
we get
\begin{equation}
    \vec{\eta}^{\,*} \hat{P}_{1} S_{2} \overline{\vec{\eta}}
    + \vec{\eta}^{\,t} \hat{P}_{2} S_{1} \vec{\eta} \: = \: 0.
\end{equation}
Let  $\vec{\eta}$ be each of the following vectors:
$(1,0)$, $(0,1)$,
$(i,0)$, $(0,i)$,
$(\frac{1}{\sqrt{2}},\frac{1}{\sqrt{2}})$,
$(\frac{1}{\sqrt{2}},\frac{i}{\sqrt{2}})$,
then we can see that $\hat{P}_{1} S_{2} = \hat{P}_{2} S_{1} = 0$.
Combining this with  \eqref{eq:S1PlusS2EqualsOne},
we obtain
\begin{equation}
S_{1} = \begin{pmatrix}
    \frac{\alpha}{\sqrt{2}} & z_{0} \\ 0 & 0
\end{pmatrix}, \quad
S_{2} = \begin{pmatrix}
     0 & 0 \\ - z_{0} & \frac{\alpha}{\sqrt{2}}
\end{pmatrix}, \quad
z_{0} \in \mathbb{C}.
\end{equation}

Putting $\vec{\upsilon}^{\,*} \vec{\upsilon}_{0} = \frac{\alpha}{2}$
into \eqref{eq:ZeroTraceExplicit}, we get that
$
\vec{\upsilon}^{\,*} \hat{S}_{0}(\vec{\eta} \vec{\eta}^{\,*}) \vec{\upsilon} =
\frac{\alpha}{4}
$.
Hence
\begin{equation}
 \vec{\upsilon}^{\,*} \left(
    \alpha \, \hat{S}_{0}(\vec{\eta} \vec{\eta}^{\,*}) -\vec{\upsilon}_{0} \vec{\upsilon}_{0}^{\,*}
  \right) \vec{\upsilon} \: = \: 0,
\end{equation}
and since
$\vec{\upsilon}_{0} \vec{\upsilon}_{0}^{\,*} \leq  \alpha \hat{S}_{0}(\vec{\eta} \vec{\eta}^{\,*})$,
it must be that
$ \alpha \, \hat{S}_{0}(\vec{\eta} \vec{\eta}^{\,*}) \vec{\upsilon} =
\left( \vec{\upsilon}_{0}^{\,*} \vec{\upsilon} \right)  \vec{\upsilon}_{0}$,
or simply
$ \hat{S}_{0}(\vec{\eta} \vec{\eta}^{\,*}) \vec{\upsilon} = \frac{1}{2} \vec{\upsilon}_{0}$.
Again,
we can repeat the whole argument,
changing $\vec{\eta} \mapsto i \vec{\eta}$,
adding the obtained result to and subtracting from the previous one,
and we arrive at:
\begin{subequations}
    \begin{align}
\label{eq:SZeroIsAlmostOneA}
\eta_{1} \, \hat{S}_{0}(\vec{\eta} \vec{\eta}^{\,*}) \vec{e}_{1} \: = \:
   \left( \frac{\alpha}{2} \eta_{1} + \frac{\sqrt{2}}{2} z_{0} \eta_{2} \right) \, \vec{e}_{1}, \\
\label{eq:SZeroIsAlmostOneB}
\overline{\eta}_{2} \, \hat{S}_{0}(\vec{\eta} \vec{\eta}^{\,*}) \vec{e}_{2} \: = \:
   \left(- \frac{\sqrt{2}}{2} z_{0} \overline{\eta}_{1} + \frac{\alpha}{2} \overline{\eta}_{2} \right)
       \, \vec{e}_{2},
    \end{align}
\end{subequations}
where $\vec{\eta} = (\eta_{1}, \eta_{2})$, and
$\vec{e}_{1} = (1,0), \vec{e}_{2} = (0,1) \in \mathbb{C}^{2}$.
Taking e.g. \eqref{eq:SZeroIsAlmostOneA}
and multiplying it by $\overline{\eta}_{1} \vec{e}_{1}^{\,*}$,
we have
\begin{equation}
0 \: \leq \:
 |\eta_{1}|^{2} \, \vec{e}_{1}^{\,*} \, \hat{S}_{0}(\vec{\eta} \vec{\eta}^{\,*}) \vec{e}_{1}
 \: = \:
\frac{\alpha}{2} |\eta_{1}|^{2} + \frac{\sqrt{2}}{2} z_{0} \overline{\eta}_{1} \eta_{2},
\end{equation}
for every $\vec{\eta} \in \mathbb{C}^{2}$, $||\vec{\eta}|| =1$.
Therefore $z_{0} = 0$, and
$S_{1} = \frac{\alpha}{2} \hat{P}_{1}$,
$S_{2} = \frac{\alpha}{2} \hat{P}_{2}$.
As a consequence of
\eqref{eq:SZeroIsAlmostOneA} and \eqref{eq:SZeroIsAlmostOneB},
$\hat{S}_{0} (\vec{\eta} \vec{\eta}^{\,*}) = \frac{\alpha}{2} \mathbf{1}_{2}$
for every $\vec{\eta}$ such that $\eta_{1} \neq 0$ and $\eta_{2} \neq 0$.
For $0 \!<\!\epsilon \!<\! 1$,
take $\vec{\eta}_{\epsilon} = (\sqrt{1 - \epsilon^{2}}, \epsilon)$.
Then $\hat{S}_{0} (\hat{P}_{1}) =
\lim_{\epsilon \rightarrow 0} \hat{S}_{0}
    (\vec{\eta}_{\epsilon} \vec{\eta}_{\epsilon}^{\,*}) =
\frac{\alpha}{2} \mathbf{1}_{2}$.
Similarly,
$\hat{S}_{0} (\hat{P}_{2}) = \frac{\alpha}{2} \mathbf{1}_{2}$,
which results in
$\hat{S}_{0} (\vec{\eta} \vec{\eta}^{\,*}) = \frac{\alpha}{2} \mathbf{1}_{2}$
for every $\vec{\eta} \in \mathbb{C}^{2}$,
$||\vec{\eta}|| = 1$.
This is sufficient to say that
$\hat{S}_{0}(B) = \frac{\alpha}{2} (\text{Tr} B) \mathbf{1}_{2}$
for any $B \in M_{2}$.
We have shown that for an arbitrary positive map such that
$0 \leq S_{0} \leq S$,
$S_{0} = \alpha S$ for $0 \leq \alpha \leq 1$,
which means that $S$ is an extremal positive map of $M_{3}$.

It is of interest to note that $S$ is not 2-positive.
Indeed,
we can prove even more and say that
the map $S$ does not fulfil the Kadison-Schwarz inequality
for any matrix $B \in M_{3}$
(see Prop.\,4.1 of \cite{choi1980some}).
Take the matrix
$B = P_{12} + E_{32}$.
Then it is easy to verify that
$S(B^{*} B) - S(B)^{*} S(B)$
is not positive.
Obviously, the map $S$ is
not 2-\emph{co}positive either:
to see this, take $B = P_{12} + E_{31}$.
That, together with the fact that $S$ is extremal,
makes the map atomic, and ends the proof.
\end{proof}

\begin{remark*}
In order to prove extremality of $S$,
we showed that $S_{0} = \alpha S$,
for every $0 \leq S_{0} \leq S$.
But a only weaker assumption is in fact needed.
Indeed, let us assume that $S_{0} \in \mathcal{P}(M_{3})$ and
$\text{Tr} P_{\xi} \, S_{0}(P_{\eta}) = 0$,
for every $\mathbb{C}^{3} \ni \xi,\eta \neq 0$
such that $\text{Tr} P_{\xi} \, S(P_{\eta}) = 0$.
Then $\text{Tr} P_{12} \, S_{0}(P_{3}) = 0$ and
$\text{Tr} P_{3} \, S_{0}(P_{12}) = 0$.
Because $S_{0}$ is positive, so $S_{0}(P_{3}) = \alpha P_{3}$
and $S_{0}(P_{12}) \in M_{2} \! \subset \! M_{3}$.
Then the rest of the proof goes exactly the same as in
Lemma \ref{lem:SIsExtremal},
beginning with \eqref{eq:SMapsM2intoM2} onward.
This proofs that the map $S$
is not only extremal, but also \emph{exposed}.
\end{remark*}

For the map $S$ specified in \eqref{eq:DefinitionOfS}, we have
$K_{S}= \mathbb{C} P_{12} \oplus \mathbb{C} P_{3}$.
To the best of the authors' knowledge,
all the examples of the extremal maps of $M_{3}$
that are not completely or co-completely positive,
which have been so far specified in the literature,
have $K_{S} = \mathbb{C} \, \mathbf{1}$.
The map $S$ would be the first one
with a two-dimensional commutative stable algebra.

\vspace{0.5cm}

Given a positive map $S: M_{n} \rightarrow M_{n}$,
the entanglement witness associated with $S$ is a matrix $W_{S}$
of the tensor matrix algebra $M_{n^{2}} = M_{n} \! \otimes \! M_{n}$,
defined by
\begin{equation}
\label{def:entanglement-witness}
    W_{S} = \sum \limits_{i,j =1}^{n} E_{ij} \otimes S(E_{ij}),
\end{equation}
where $\{ E_{ij}\}_{i,j=1}^{n}$ are standard matrix units.
The theorem by Choi and Jamiołkowski \cite{choi1975completely,jamiolkowski1974effective}
states that the matrix $W_{S}$ is a positive element of $M_{n^{2}}$,
if and only if $S$ is completely positive.
Therefore, for a positive, non-completely positive map $S$
there is at least one density matrix $\rho \in M_{n^{2}}$
such that $\text{Tr}\, W_{S} \rho < 0$.
This density matrix cannot be separable \cite{werner1989quantum},
and hence we say that the entanglement witness \emph{detects} the
entangled state $\rho$.

It would be of interest to provide the explicit form of the entanglement
witness associated with the map $S$ of eq. \eqref{eq:DefinitionOfS},
and the family of states on the composite quantum system space
$M_{9} = M_{3} \! \otimes \! M_{3}$, detected by $S$.
It is easy to see, that in this case:
\begin{equation}
\label{WS-C}
 W_S =  \left( \begin{array}{ccc|ccc|ccc}
 \frac{1}{2} &  \cdot& \cdot& \cdot& \cdot& \cdot& \cdot& \cdot& \frac{1}{\sqrt{2}} \\
 \cdot& \frac{1}{2} &\cdot& \cdot& \cdot& \cdot& \cdot& \cdot& \cdot\\
 \cdot& \cdot& \cdot & \cdot& \cdot& \cdot& \cdot& \cdot& \cdot  \\ \hline
 \cdot& \cdot& \cdot& \frac{1}{2} & \cdot& \cdot& \cdot& \cdot&  \cdot \\
 \cdot& \cdot& \cdot& \cdot& \frac{1}{2} & \cdot& \cdot& \cdot&  \cdot \\
 \cdot& \cdot& \cdot& \cdot& \cdot& \cdot& \cdot & \frac{1}{\sqrt{2}}& \cdot  \\ \hline
 \cdot& \cdot& \cdot & \cdot& \cdot& \cdot& \cdot& \cdot& \cdot  \\
 \cdot & \cdot& \cdot& \cdot& \cdot& \frac{1}{\sqrt{2}}& \cdot& \cdot& \cdot \\
 \frac{1}{\sqrt{2}}& \cdot& \cdot& \cdot& \cdot & \cdot& \cdot& \cdot& 1
  \end{array} \right),
\end{equation}
where dots mean matrix elements equal to zero.
$W_{S}$ is not a positive matrix of $M_{9} = M_{3} \! \otimes \! M_{3}$.
Let $U \in \text{U}(9)$ be a unitary matrix such that
$U^{*} W_{S} U = W_{S}^{(2)} \oplus W_{S}^{(7)}$,
where
\begin{equation}
\label{WS-DirectSum}
 W_{S}^{(2)} = \left(\begin{array}{cc}
    0 & \frac{1}{\sqrt{2}}  \\ \frac{1}{\sqrt{2}}  & 0
  \end{array}\right) \in M_{2}, \quad
 W_S^{(7)}\ = \  \left( \begin{array}{ccccccc}
 \frac{1}{2} &  \cdot& \cdot& \cdot& \cdot& \cdot& \frac{1}{\sqrt{2}} \\
 \cdot& \frac{1}{2} &\cdot& \cdot& \cdot& \cdot& \cdot\\
 \cdot& \cdot& \cdot & \cdot& \cdot& \cdot& \cdot \\
 \cdot& \cdot& \cdot& \frac{1}{2} & \cdot&  \cdot& \cdot \\
 \cdot& \cdot& \cdot& \cdot& \frac{1}{2} & \cdot& \cdot \\
 \cdot& \cdot& \cdot & \cdot& \cdot& \cdot& \cdot  \\
 \frac{1}{\sqrt{2}}& \cdot& \cdot& \cdot& \cdot& \cdot& 1
  \end{array} \right) \in M_{7}.
\end{equation}
It is evident that $W_{S}^{(7)} \geq 0$.
Let also $\vec{v}$ be one of the eigenvectors of $W_{S}^{(2)}$:
$\vec{v} = \frac{1}{\sqrt{2}} (1,-1)^{t} \in \mathbb{C}^{2}$,
$W_{S}^{(2)} \vec{v} = - \frac{1}{\sqrt{2}} \vec{v}$, and
$P_{\vec{v}} = \vec{v} \vec{v}^{*}$
be the orthogonal projection onto the space spanned by $\vec{v}$.
We define
$\rho = \frac{1}{2} U ( P_{\vec{v}} \oplus \rho_{0} ) U^{*}$,
for a density matrix $\rho_{0} \in M_{7}$,
$\rho_{0} \geq 0$, $\text{Tr} \rho_{0} = 1$,
such that
$\text{Tr}\, W_{S}^{(7)} \rho_{0} < \frac{1}{\sqrt{2}}$.
Then $\rho \geq 0$ and $\text{Tr} \rho = 1$,
i.e. $\rho$ is a density matrix.
Moreover,
\begin{multline}
\label{RandomLabel:851252}
    \text{Tr}\, W_{S} \rho =
\frac{1}{2} \text{Tr}\, W_{S} U (P_{\vec{v}} \oplus \rho_{0}) U^{*} =
\frac{1}{2} \text{Tr}\, (W_{S}^{(2)} \oplus W_{S}^{(7)}) (P_{\vec{v}} \oplus \rho_{0}) = \\ =
\frac{1}{2} \text{Tr}\, W_{S}^{(2)} P_{\vec{v}} + \frac{1}{2} \text{Tr}\, W_{S}^{(7)} \rho_{0}
< 0,
\end{multline}
which means that $W_{S}$ detects the entangled state $\rho$.
In particular, the state $\rho$ given by
\begin{equation}
\label{PPTstate}
 \rho =  \frac{1}{7} \left( \begin{array}{ccc|ccc|ccc}
 1 &  \cdot& \cdot& \cdot& \cdot& \cdot& \cdot& \cdot& -1 \\
 \cdot& \cdot& \cdot& \cdot& \cdot& \cdot& \cdot& \cdot& \cdot\\
 \cdot& \cdot& 1 & \cdot& \cdot& \cdot& \cdot& \cdot& \cdot  \\ \hline
 \cdot& \cdot& \cdot& \cdot& \cdot& \cdot& \cdot& \cdot&  \cdot \\
 \cdot& \cdot& \cdot& \cdot& 1 & \cdot& \cdot& \cdot&  \cdot \\
 \cdot& \cdot& \cdot& \cdot& \cdot& 1 & \cdot & -1 & \cdot  \\ \hline
 \cdot& \cdot& \cdot & \cdot& \cdot& \cdot& 1& \cdot& \cdot  \\
 \cdot & \cdot& \cdot& \cdot& \cdot& -1 & \cdot& 1 & \cdot \\
 -1 & \cdot& \cdot& \cdot& \cdot & \cdot& \cdot& \cdot& 1
  \end{array} \right)
\end{equation}
is a PPT state, meaning that $(I \otimes t)\rho$ is still a density matrix,
but $\text{Tr}\, W_{S} \rho = \frac{2}{7} - \frac{2\sqrt{2}}{7} < 0$.

\paragraph{Acknowledgements.}
The authors would like to express their gratitude to Prof. Erling Størmer
for rightfully pointing out that the statement of Theorem \ref{thm:FromESbook}
is a direct consequence of Proposition 2.2.10 from
\cite{stormer2013positive}.
Moreover, he helped us complete the list of all possible Jordan subalgebras
of $M_{3}$, which has greatly simplified the proof
of Theorem \ref{thm:ExposedMaps}.

%%%%%%%%%%%%%%%%%%%%%%%%
%%% End of the paper %%%
%%%%%%%%%%%%%%%%%%%%%%%%

% References
\bibliographystyle{abbrv}
\bibliography{./biblio}

\end{document}


% !TEX root=/home/tavant/these/manuscript/src/manuscript.tex

\section{Realistic heating and ionization}
  \label{sec-realistic_1D}
  In the study of \cref{{sec-1DPIC}}, the ionization and the heating mechanism are not self-consistent, but allowed us to obtain quickly a steady-state as in the simulations of \cref{ch-1}.
  We now study the impact of the wall absorption in a case of self-consistent heating and ionization.
  The electrons are heated "inductively" with a radio-frequency (RF) electric field in the direction normal to the simulation grid \cite{meige2006a, lucken2018, turner1993}.
  The electrons are heated in the $y$ direction, and momentum is transferred to the $x$ and $z$ axis via electron-neutral collisions.
  The heating electric field $\vec{E_{rf}} = E_{rf} \vec{e_y}$ is independent of $x$ in the simulation domain, its frequency is $13.56$\,MHz, and its amplitude is adjusted in order to obtain the desired absorbed power $P_{abs} = < \vec{J_e} \cdot  \vec{E_{rf}}>$.

  \begin{table}[!htb]
    \ra{1.3}
    \centering
    \begin{tabular}{@{} r l l @{}}
    \toprule
      Parameter & value & unit \\ \midrule
      Pressure & $0.1$ & mTorr\\
      $P_{abs}$ & $0.25$ & W/m$^{-3}$\\
      Length $L$&10&cm\\
      \bottomrule
    \end{tabular}
    \caption{Input parameters for the simulation using the self-consistent model.}
    \label{tab-PIC2}
  \end{table}

  \begin{figure}[!htbp]
    \center
    \includegraphics[width=0.9\textwidth]{ICP_results.pdf}
    \caption{Results of the PIC simulation for the self-consistent model, using RF inductive heating.}
    \label{fig-icpresults}
  \end{figure}

  \Cref{fig-icpresults} presents the simulation results for the electron density, plasma potential and electron temperature using the parameters of \Cref{tab-PIC2}.
  We can see that the different variables (density, electron temperature and the plasma potential) are not much affected compared to the results of \cref{sec-1DPIC}.

  \begin{figure}[!htbp]
    \centering
    \includegraphics[width=\defaultwidth]{ICP_polyfit2.pdf}
    \caption{Estimation of the polytropic index in the sheath and in the whole domain in the PIC simulation using the self-consistent model.}
    \label{fig-icpfit}
  \end{figure}

  \Cref{fig-icpfit} presents the electron pressure as a function of the electron density measured in the simulation in log scale.
  We see that the trend is not purely linear. Hence, the linear regression used in order to obtain the polytropic index is conducted twice\string:
  \begin{itemize}
    \item In the whole domain\string: $\gamma=1.5$
    \item Only in the sheath\string: $\gamma=1.6$
  \end{itemize}
  The linear relation conducted on the whole domain is less accurate than for the simulation result of \cref{sec-1DPIC} ($R^2=0.992$).
  However, we can see that the linear relation still describes quite well the electron evolution in the sheath.
  The polytropic indexes obtained with the self-consistent model are close to the one of the simulation of \cref{sec-1DPIC} at the same pressure.

  \begin{figure}[!htbp]
    \centering
    \includegraphics[width = 0.9\textwidth]{FluidComparisonICP.pdf}
    \caption{Comparison of the electron temperature and plasma potential measured in the PIC simulation with the prediction of the fluid model with $\gamma = 1.5$ (average index in the domain) and $\gamma=1.6$ (index in the sheath).}
    \label{fig-comp2}
  \end{figure}

  \Cref{fig-comp2} shows the comparison of the electron temperature and the plasma potential in the PIC simulation using the self-consistent model with the prediction of the fluid model of \cref{sec-fluid}.
  We can see that the agreement between the PIC results and the fluid models is less satisfactory than in \cref{fig-comp} but it is still significantly better than the isothermal model.
  Hence, even with a self-consistent heating and ionization in the plasma, the polytropic model stands as a better model for the sheath and the pre-sheaths.


So far a number of algorithms for control, trajectory optimization, motion planning, perception, and localization/state estimation have been presented. Almost all of these instances share a common characteristic: they involve manipulation or observation of \textit{continuous} variables. For example, motion planning and control algorithms manipulate the robot's physical state (i.e. position, velocity, orientation, configuration) which can take on a continuous range of values, and perception and localization tasks try to take (continuously valued) information from the environment and try to estimate the robot's physical state.

However, for higher-level tasks it is often useful to represent the state of the robot or environment in terms of a discrete set of variables. For example, consider a robot whose task is to go from point A to point B, pick up a package, and then deliver it to point C. While the robot's physical (continuous) state is crucial for tasks such as controlling the robot to drive from A to B, it is also important to keep track of what portion of the overall plan that the robot is currently performing (is the robot currently traversing to B or C, has the package been successfully picked up, etc.). Additionally, it might be useful to keep track of other discrete valued states of the robot, such as if a sensor is functioning or not, or whether or not the robot is in the presence of a human (i.e. for safety).
Similar to dynamics/kinematics models for the robot's (continuous) physical state, \textit{finite state machines}\cite{KaelblingWhiteEtAl2011} are a useful framework for modeling discrete higher-level states of the robot and its environment.

\notessection{Finite State Machines}
Finite state machines (FSMs) define a computational modeling framework for systems whose output depends on the entire history of their inputs, and where the number of possible states of the system is \textit{finite}. This framework has been used in a wide variety of disciplines, including electrical engineering, linguistics, computer science, philosophy, biology, and more. FSMs can also be used in several different ways, including:
\begin{enumerate}
    \item {\em to specify a desired program or behavior}, such as how a vending machine or ATM should function,
    \item {\em to model behavior}, for example to analyze the behavior of a control system interacting with the environment,
    \item {\em or for predicting behavior}, for example to predict what will happen in the future given some set of inputs to the system.
\end{enumerate}

Generally speaking, designing finite state machines for practical robotic systems can be extremely time consuming and challenging. In particular, choosing the appropriate set of states for a particular problem is required to ensure that the model is not overly complex, but the interactions and transitions between states can also be very hard to specify and can still lead to complex models. For example, consider the graphical representation of an example FSM for the popular open source flight software PX4 in Figure \ref{fig:px4fsm}. Specifying the full behavior of the system can lead to a complex FSM, even if there are not very many states. In fact, this FSM is still under continuous development to improve the overall system behavior!
\begin{figure}[ht]
    \centering
    \includegraphics[width=0.65\textwidth]{tex/figs/ch19_figs/px4_state_machine.png}
    \caption{A graphical representation of a finite state machine example for the open source flight software PX4, \texttt{https://px4.io/}. As can be seen, even for a relatively small number of states the FSM can become quite complex in order to model the full behavior of the system. Image retrieved from diydrones.com.}
    \label{fig:px4fsm}
\end{figure}

Mathematically, a finite state machine consists of:
\begin{enumerate}
    \item a \textit{finite} set of states $S$,
    \item a set of inputs $I$,
    \item a set of outputs $O$,
    \item a next-state function $n(i_t, s_t) \xrightarrow{} s_{t+1}$ that maps the input $i_t$ at time $t$ and current state $s_t$ to the next state $s_{t+1}$,
    \item an output function $o(i_t, s_t) \xrightarrow{} o_t$,
    \item and an initial state $s_0$.
\end{enumerate}
While FSMs can be defined through the mathematical notation above, it is often also useful to represent them graphically to get a more intuitive understanding of how the system will behave. In particular, the graph representation is defined with nodes of the graph representing each state in the set $S$. Each (directed) edge of the graph corresponds to a possible transition between states that is defined by a particular input. In other words, each directed edge is associated with a particular pair $(s, i)$. The outputs for a particular pair $(s,i)$ are also typically included along each directed edge. This is shown in more detail in Figure \ref{fig:fsm}.
\begin{figure}[ht]
    \centering
    \includegraphics[width=0.65\textwidth]{tex/figs/ch19_figs/fsm.png}
    \caption{A graphical representation of a finite state machine with states $S = \{s_0, s_1, s_2\}$, inputs $I = \{i_0,i_1,i_2\}$ and outputs $O = \{o_0, o_1\}$. The directed edges correspond to the next-state functions and the output associated with each edge is defined by the output function. For example, in this FSM it can be seen that $n(i_1, s_0) \xrightarrow{} s_1$ and $o(i_1, s_0) \xrightarrow{} o_1$.}
    \label{fig:fsm}
\end{figure}

\begin{example}[Parking Gate Control] \label{ex:parkinggate}
\theoremstyle{definition}
Consider a parking gate control finite state machine where the goal is to raise the gate when a car arrives and then lower the gate when the car has passed. Assume sensors are available to tell if a car is at the gate and when the car has passed through the gate, and also the position of the gate. The control actions the gate can take are simply raising, lowering, or holding the gate position fixed. Technically, the position of the gate can vary continuously between the ``down'' and ``up'' positions, and the velocity can also vary continuously. However, in designing a finite state machine to define the overall logic/behavior for the parking gate, a higher-level abstraction of the set of gate states can be chosen as:
\begin{equation*}
S = \{\text{down}, \: \text{raising}, \:\text{up},\: \text{lowering}\}.
\end{equation*}
The set of inputs to the finite state machine come from the sensors, and can be chosen as:
\begin{equation*}
\begin{split}
I = \{&\text{car waiting}, \: \text{no car waiting}, \:\text{car passed},\: \text{car not passed},\: \\ &\text{gate up}, \: \text{gate not up},\: \text{gate down},\: \text{gate not down} \}.
\end{split}
\end{equation*}
Finally, the output of the finite state machine (defining the actions for the gate) are simply:
\begin{equation*}
O = \{\text{lower}, \: \text{raise}, \:\text{hold}\}.
\end{equation*}

The next-state function then defines the desired behavior for the parking gate. For example, suppose the current state $s_t = \text{down}$ and the sensor measures that a car is waiting ($i_t = \text{car waiting}$). Then, the desired behavior is to output the command $o_t = \text{raise}$, and the next-state function would be:
\begin{equation*}
    n(\text{car waiting}, \text{down}) \xrightarrow{} \text{raising}.
\end{equation*}
Similarly, suppose the gate was just raised for the car to pass such that $s_t = \text{up}$, but that the sensor is giving input $i_t = \text{car not passed}$. In this case the output would be $o_t = \text{hold}$, and the next-state function would be:
\begin{equation*}
    n(\text{up}, \text{car not passed}) \xrightarrow{} \text{up}.
\end{equation*}
A graphical representation of the full car parking gate FSM is given in Figure \ref{fig:parkinggate}.
\begin{figure}[ht]
    \centering
    \includegraphics[width=1\textwidth]{tex/figs/ch19_figs/parkinggate_fsm.png}
    \caption{A graphical representation of the finite state machine for the parking gate controller discussed in Example \ref{ex:parkinggate}.}
    \label{fig:parkinggate}
\end{figure}
\end{example}

\subsection{FSM Architectures}
Finite state machines can become quite complex since for every new state added it is possible to define an exponentially increasing number of new transitions. Strategies for keeping the complexity of FSMs in check include analyzing for (and removing) redundant states, using hierarchical FSMs, and using compositions based on common patterns.

\subsubsection{Reducing Number of States}
There exist algorithms that can be used to identify and combine states in FSMs that would yield the same overall behavior. In particular, two states are equivalent if they have the same output and for all input combinations transition to the same or equivalent states.

One possible algorithm for reducing states in an FSM is as follows:
\begin{enumerate}
    \item Place all states into one set.
    \item Create a single partition based on the output behavior.
    \item Repeatedly partition further based on next state transitions until no further partitions is possible.
\end{enumerate}
To see this procedure in action, consider the following example:
\begin{example}[FSM State Reduction] \label{ex:sequence}
\theoremstyle{definition}
Consider a finite state machine that is used to detect the sequences 010 or 110. The FSM is shown in Table \ref{tab:sequence}, where it can be seen that the states are the partial sequences $S = \{0,1,00,01,10,11\}$ and a reset state, the inputs are $I = \{0,1\}$, and the outputs are booleans $O = \{\text{True}, \text{False} \}$ for whether the sequence 010 or 110 has been created. For example, it can be seen that if the current partial sequence is 01 ($s_4$) and a 0 is input, the next state will be the reset state and the output will be True.
\begin{table}[ht]
\centering
\begin{tabular}{|l|
>{\columncolor[HTML]{C0C0C0}}l |l|
>{\columncolor[HTML]{C0C0C0}}l |l|}
\hline
State, $s$ & $n(0,s)$ & $n(1,s)$ & $o(0,s)$ & $o(1,s)$ \\ \hline
Reset      & 0        & 1        & False    & False    \\ \hline
0          & 00       & 01       & False    & False    \\ \hline
1          & 10       & 11       & False    & False    \\ \hline
00         & Reset    & Reset    & False    & False    \\ \hline
01         & Reset    & Reset    & True     & False    \\ \hline
10         & Reset    & Reset    & False    & False    \\ \hline
11         & Reset    & Reset    & True     & False    \\ \hline
\end{tabular}
\caption{Finite state machine for a sequence detector that accepts digits 0 and 1 and outputs True if the sequences 010 or 110 is generated.}
\label{tab:sequence}
\end{table}

Now, the FSM in Table \ref{tab:sequence} can be simplified by removing redundant states! This is accomplished by first placing all of the states into a single set $\{\text{Reset}, 0, 1, 00, 01, 10, 11\}$ and creating a partition based on the output behavior. In particular this will generate two sets:
\begin{equation*}
\begin{split}
\{\text{Reset}, 0, 1, 00, 10\}&: \text{always leads to False output},\\
\{01,11\}&: \text{does not always lead to False output}.
\end{split}
\end{equation*}
These sets are then further partitioned based on the next-state function until no further partitions can be made. In the first step the set $\{\text{Reset}, 0, 1, 00, 10\}$ is partitioned into:
\begin{equation*}
\begin{split}
\{\text{Reset}, 00, 10\}&: \text{cannot transition to \{01,11\}},\\
\{0, 1\} &: \text{can transition to \{01,11\}}.
\end{split}
\end{equation*}
and then $\{\text{Reset}, 00, 10\}$ is partitioned as:
\begin{equation*}
\begin{split}
\{\text{Reset}\}&: \text{can transition to \{0, 1\}},\\
\{00, 10\}&: \text{cannot transition to \{0, 1\}}.
\end{split}
\end{equation*}
Therefore, instead of the original seven states (Reset, $0$, $1$, $00$, $01$, $10$, $11$) there are now only four ($\{01,11\}$, $\{0, 1\}$, Reset, $\{00, 10\}$).
An equivalent (same input/output behavior) but reduced finite state machine can now be defined, and is shown in Table \ref{tab:sequence2}.
\begin{table}[ht]
\centering
\begin{tabular}{|l|
>{\columncolor[HTML]{C0C0C0}}l |l|
>{\columncolor[HTML]{C0C0C0}}l |l|}
\hline
State, $s$                        & $n(0,s)$  & $n(1,s)$                          & $o(0,s)$ & $o(1,s)$ \\ \hline
Reset                             & \{0,1\}   & \{0,1\}                           & False    & False    \\ \hline
\{0,1\}                           & \{00,10\} & \cellcolor[HTML]{FFFFFF}\{01,11\} & False    & False    \\ \hline
\cellcolor[HTML]{FFFFFF}\{00,10\} & Reset     & Reset                             & False    & False    \\ \hline
\cellcolor[HTML]{FFFFFF}\{01,11\} & Reset     & Reset                             & True     & False    \\ \hline
\end{tabular}
\caption{Reduced finite state machine for a sequence detector that accepts digits 0 and 1 and outputs True if the sequences 010 or 110 is generated.}
\label{tab:sequence2}
\end{table}

\subsubsection{Hierarchical FSMs}
In some cases there might be states that are not truly equivalent, but that might still be beneficial to group closely together. With this idea, the concepts of \textit{super-states} (i.e. groups of closely related states) and \textit{generalized transitions} (i.e. transitions between super-states) can be useful. This idea of creating super-states is analogous to graph clustering.

\subsubsection{Compositions}
Individual state machines can also be composed in a variety of ways depending on their input/output behavior, including \textit{cascade} compositions, \textit{parallel} compositions, and \textit{feedback} compositions. Cascade compositions combine two FSMs in sequence where the output vocabulary of one matches the input vocabulary of the other. The new state of the combined machine is the concatenation of the states of the individual FSMs (see Figure \ref{fig:cascade}). Parallel compositions run two FSMs side by side, using the same input. Both the state and output is then the concatenation of the two individual FSMs' state and output. Finally, feedback compositions use only a single FSM but only require a partial input and also reuse the output as input (requires the input and output vocabularies to be the same). \begin{marginfigure}
    \centering
    \includegraphics[width=0.8\textwidth]{tex/figs/ch19_figs/compositions.png}
    \caption{Cascade, parallel, and feedback compositions of finite state machines.}
    \label{fig:cascade}
\end{marginfigure}

\subsection{Implementation Details}
There are \textit{numerous} ways that finite state machines could be implemented in practice. However, one common approach is to exploit Object Oriented Programming (OOP) by building the finite state machine as a class. In particular, the class would keep track of the state of the FSM in a class variable. The state update process could then occur through the use of if/else statements in an update class method, as well as the definition of the FSM output. An example implementation in Python of the parking gate controller FSM from Example \ref{ex:parkinggate} is given below:
\begin{python}
import rospy as rp
from std_msgs.msg import String

class ParkingGateFSM():
    """Simple FSM for parking gate control"""
    def __init__(self):
        rp.init_node('parking_gate', anonymous=True)
        self.state = 'down'
        self.cmd = rp.Publisher('/gate_cmd', String)
        rp.Subscriber('/car_sensor', String, self.car_clbk)
        rp.Subscriber('/gate_sensor', String, self.gate_clbk)

    def car_clbk(self, data):
        self.car_input = data

    def gate_clbk(self, data):
        self.gate_input = data

    def run(self):
        rate = rp.Rate(10) # 10 Hz
        while not rp.is_shutdown():
            if self.state == 'down':
                if self.car_input == 'no_car_waiting':
                    output = 'hold'
                elif self.car_input == 'car_waiting':
                    self.state = 'raising'
                    output = 'raise'
            elif self.state == 'raising':
                if self.gate_input == 'gate_not_up':
                    output = 'raise'
                elif self.gate_input == 'gate_up':
                    self.state = 'up'
                    output = 'hold'
            elif self.state == 'up':
                if self.car_input == 'car_not_passed':
                    output = 'hold'
                elif self.car_input == 'car_passed':
                    self.state = 'lowering'
                    output = 'lower'
            elif self.state == 'lowering':
                if self.gate_input == 'gate_not_down':
                    output = 'lower'
                elif self.gate_input == 'gate_down':
                    self.state = 'down'
                    output = 'hold'
            self.cmd.publish(output)
            rate.sleep()
\end{python}

\subsection{Other Useful Tools}
A useful tool for visualizing finite state machines in ROS is SMACH, which can be though of as an analogue to RViz. More information about SMACH and how it is used can be found on the ROS Wiki\footnote{http://wiki.ros.org/smach}.
\end{example}


Our goal in this section is to build a flexible and computationally efficient
technique for reliability analysis of electronic systems that are affected by
process variation. The development is based on the general reliability model
$R(\cdot | \vg)$ described in \sref{reliability-model}, which is not aware of
process variation yet. Note also that, in this section, we address not only
process uncertainty but also aging uncertainty, which is introduced in
\sref{aging-variation}, since the latter can be more adequately mitigated when
the former is accounted for in reliability analysis.

\subsection{\problemtitle}

Our work in this context is motivated by the following two observations.

First, as underscored throughout the thesis, temperature is the driving force of
many failure mechanisms. The most prominent examples include electromigration,
time-dependent dielectric breakdown, stress migration, and thermal cycling; the
interested reader is referred to \cite{jedec2016} for an overview. All of these
mechanisms have strong dependencies on temperature. At the same time,
temperature is closely related to process parameters---such as the effective
channel length and gate oxide thickness---and can vary dramatically when these
parameters deviate from their nominal values. Despite these concerns, the
current state-of-the-art techniques for reliability analysis of electronic
systems lack a systematic treatment of process variation and, in particular, the
effect of this variation on temperature, which is also the case in
\sref{reliability-model}.

Second, having established a reliability model $R(\cdot | \vg)$ of the system
under consideration, the major portion of the associated computation time is
ascribed to the evaluation of the parameterization \vg rather than to the model
\perse, that is, for a given \vg. For instance, \vg often contains estimates of
the \ac{MTTF} of each processing element for a range of stress levels. Thus, \vg
typically involves computationally intensive simulations, including power
analysis paired with temperature analysis; see \sref{reliability-model}.

Guided by the aforementioned observations, we employ the \ac{PC} decomposition
in order to construct a lightweight surrogate for \vg. It is worth emphasizing
that $R(\cdot | \vg)$ stays intact, which means that our approach does not
impose any restrictions on $R(\cdot | \vg)$. Hence, the designer can take
advantage of an arbitrary reliability model in a straightforward manner.
Naturally, this also implies that modeling errors associated with the chosen
$R(\cdot | \vg)$ can affect the quality of the results produced by our
technique. Therefore, choosing an adequate reliability model for the problem at
hand is the designer's responsibility.

\begin{remark} \rlab{chaos-nested-uncertainty}
It is important to realize that there are two levels of probabilistic modeling
here. First, $R(\cdot | \vg)$ \perse is a probabilistic model describing the
lifetime \life of the system. Second, the parameterization \vg is another
probabilistic model characterizing the impact of uncertainty due to process
variation on the reliability model. Therefore, the overall model can be thought
of as a probability distribution over probability distributions. Given an
outcome of the fabrication process and thus \vg, the system's lifetime remains
random.
\end{remark}

To conclude, the quantity of interest \g, which is an output of Stage~1 in
\fref{chaos-overview}, is the parameters \vg of the reliability model under
consideration.

\subsection{Surrogate Construction}

Similarly to \sref{chaos-dynamic-steady-analysis}, Stage~3 and Stage~4 of the
framework require no particular attention in this section except for noting that
\rref{chaos-multidimensional-output} should be taken into consideration if the
parameterization \vg has multiple entries.

\conclusioncut
In conclusion, the proposed approach to reliability analysis is founded on the
basis of state-of-the-art reliability models, and it enriches their modeling
capabilities by seamlessly incorporating the deleterious impact of process
variation. In particular, the technique allows for a straightforward propagation
of uncertainty from process parameters through temperature to the lifetime of
the system, which is an important application, since temperature is the driving
force of many failure mechanisms. In contrast to the straightforward use of
\ac{MC} sampling, the lightweight surrogates that we construct make the
subsequent analysis highly efficient from a computational perspective.


\documentclass[main.tex]{subfiles}
\begin{document}

\subsection{Quantum noise}

\marginpar{Friday\\ 2021-12-3}

The measurement process can be thought of as ``counting photons'',
although we cannot really determine their exact number,
but this is relevant since it means the measured intensity fluctuates with \(\sqrt{N}\).

If \(\Delta N / \Delta t\) is constant (we get a fixed number of photons per unit time),
we have a \textbf{Fock state} \(\hat{n} \ket{n} = n \ket{n}\), an eigenvector of the
photon number operator \(\hat{n} = a ^\dag a\).

If this were the case, we would have no fluctuations in the readout.
But, besides the fact that photodetectors do not count photons,
we do not produce Fock states.

It is convenient to describe this process in the Heisenberg picture.
If we use it, the operators we use are all functions of \(t\) while the states are unchanged.
The state we will use will always just be the vacuum state \(\ket{0}\).

Classically, the output field will be given by a certain linear transformation of the
output field:
%
\begin{align}
\vec{E} _{\text{out}} (\vec{x}, t) = \mathscr{L} \qty[ \vec{E} _{\text{in}}(\vec{x}, t)]
\,,
\end{align}
%
but this will also be what we do in our quantum-mechanical, Heisenberg-picture treatment.

The difficulty comes from the fact that there are actually many input fields:
at various places, like the mirrors, we do not have ``nothing'' since there is
always at least the vacuum.

The transmissivity \(\tau \) of a mirror is the ratio between the incoming and transmitted
field magnitudes.
All mirrors have a transmissivity \(\neq 0\), so we always have a coupling to the vacuum
state on the other side of the mirror.

If there are losses, we cannot have a unitary process: so,
there will never be ``one-way'' losses, and a loss will always be associated
with an extraneous input from the environment.

The transmissivity and reflectivity satisfy \(\tau^2 + \rho^2 = 1\);
the transmissivity can be interpreted as a loss parameter, so if \(\tau = 0\)
all the field is reflected back into the system, but we will never have this condition.

So, if \(A\) is our input, some \(\tau A\) is leaving our system;
because of what we were saying above the field going back will not be just \(\rho A\) but
instead \(\rho A + \tau V\), where \(V\) denotes the vacuum state on the other side of the port.

A very important field is the one coming from the photodiode, which
will often look like a thermal state.
However, its temperature will be very low compared to the laser light:
that is near-infrared, 100 to \SI{1000}{THz}, corresponding to \(\gtrsim \SI{700}{K}\)
of thermal temperature.
So, we can take it to be the vacuum.

Only about \SI{.5}{\percent} of the laser light at the beamsplitter reaches the
photodiode.
Therefore, changing the field at the laser will have little effect on the diode;
on the other hand, \SI{99.5}{\percent} of the field from the photodiode will
come back to the laser.

Only in the eighties someone properly described an interferometer in QFT.
Before, people just used Poissonian statistics to calculate the quantum noise.

The first important insight is that we need to act on the field at the photodiode.

Let us neglect the vector character of the field for simplicity;
the fields are all linearly polarized, and the quantum mechanics for the
electric and magnetic fields are the same.
The field will be
%
\begin{align}
\hat{E}(x, t) = \sqrt{\frac{2 \pi \hbar}{\mathcal{A} c}} \int_{- \infty }^{\infty } \frac{ \dd{\omega }}{2 \pi } \sqrt{\omega }
\qty( \hat{a} (\omega ) e^{- i \omega (t - \vec{x} \cdot \vec{\epsilon} /c) } + \hat{a} ^\dag e^{i \omega (t - \vec{x} \cdot \vec{\epsilon} /c)})
\,,
\end{align}
%
where we are fixing the propagation direction by fixing \(k = \omega / c\);
the creation and annihilation operators will satisfy
%
\begin{align}
\qty[ \hat{a}(\omega ),  \hat{a} ^\dag (\omega ')] = 2 \pi \delta (\omega - \omega ')
\,.
\end{align}

If we apply the annihilation operator to the vacuum we get \(\hat{a} \ket{0} = 0 \ket{0}\);
since the photon number operator is \(\hat{n} = \hat{a} ^\dag \hat{a}\)  we also have
\(\hat{n}  \ket{0} = 0 \ket{0}\).

A \textbf{coherent state} is an eigenstate of the annihilation operator: \(\hat{a} \ket{\alpha } = \alpha \ket{\alpha }\),
where the eigenvalue \(\alpha \) is a generic complex number.
This is ``close to classical'', it describes the output of a laser quite well,
and it has Poissonian statistics.

What is the distribution of the number of photons in a coherent state?
%
\begin{align}
p(n) = \abs{\braket{n}{\alpha }}^2 = e^{- \abs{\alpha }^2} \frac{\abs{\alpha }^{2n}}{n!}
\,.
\end{align}

This is a Poissonian with average photon number \(\expval{n} = \abs{\alpha }^2\).

The energy in the field is given by \(E = \hbar \omega_0 n\), so this value also corresponds
to the mean energy in the field.

In the Heisenberg picture, one finds that the laser is mapping \(\hat{a} \to \hat{a} + \alpha\).
In a sense, all ``classical'' things are fixed complex numbers as opposed to operators.

The full operator is \(\hat{a} + h + \alpha \), where \(\hat{a}\) describes the quantum fluctuations,
\(h\) describes the GW signal, while \(\alpha \)describes the laser.

We have not yet defined what is our canonical pair of observables.
We can write
%
\begin{align}
\hat{E} (x, t) =
E_1 (x, t) \cos (\omega_{0} t - kx)
+
E_2 (x, t) \sin (\omega_{0} t - kx)
\,.
\end{align}

Why are we picking a single frequency \(\omega_0 \), while our field has many?
It is convenient since the laser frequency (\(\omega_0 \)) is the main one, but there are also things fluctuating at all other frequencies.
We expect quantum fluctuations to have a white spectrum, so for those it is the same; however the sidebands from the GW signal will be close to \(\omega_0 \).

In the photocurrent we measure, \(I _{\text{ph}} (t) = \abs{E(x _{\text{photodiode}}, t)}^2\), we would have product terms between the laser frequency and the GW frequency.

The Fourier transform of the photocurrent allows us to compute a Power Spectral Density \(S (I _{\text{ph}}, \omega )\).

The Fourier transform looks like
%
\begin{align}
\widetilde{I} _{\text{ph}} (\omega ) \sim \underbrace{\abs{\alpha }^2}_{\omega_0 , \omega_0 } + \underbrace{\Re(\alpha \hat{a})}_{\omega_0 , \omega  } +  \underbrace{\Re (\alpha h)}_{\omega_0 \pm \Omega , \omega_0  } + \underbrace{\Re (h \hat{a})}_{\omega_0 \pm \Omega , \omega}
\,.
\end{align}

The term which does not fluctuate, \(\abs{\alpha }^2\), is often called a DC component or DC offset: since we bandpass the photocurrent signal, any low-frequency component like that will vanish.

The noise term will oscillate at \(\omega_0 - \omega = \Omega \); in the end the photocurrent we will actually have left after the bandpassing we get
%
\begin{align}
\hat{I} _{\text{ph}}(\omega ) \sim h(\Omega ) + \hat{a} (\Omega )
\,.
\end{align}

What we are basically doing is extracting out the fast-oscillating term, and we can focus on the slow, audio-band oscillations we care about.

The fluctuations in the photocurrent will contain the square moduli of the \emph{quadratures} \(E_1 \) and \(E_2 \), which form a Heisenberg pair.

How do we actually manipulate the vacuum field at the photodiode?
A squeezer is introduced, and it passes a polarizing beamsplitter, which is always either fully transmissive or fully reflective depending on the polarization of the light.

The unpolarized vacuum passes the polarizer in some fraction, but when it comes back it is fully reflected.

The squeezer emits little power, and some of it is in green light as opposed to infrared!

The power in the Fabry-Perot cavity is very high (\(\sim \SI{200}{kW}\)), but a small amount of squeezing power is enough to improve the sensitivity significantly.

\begin{figure}[ht]
\centering
\includegraphics[width=\textwidth]{figures/husini}
\caption{Husini \(Q\)-function, \(Q(\beta ) = \bra{\beta } \hat{\rho} \ket{\beta } / \pi \), for squeezed vacuum states \cite[eqs.\ 3.112 and 7.82]{gerryIntroductoryQuantumOptics2004}. }
\label{fig:husini}
\end{figure}

\end{document}