\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{definition}{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{Extremal positive maps on $M_{3}(\mathbb{C})$ \\ and idempotent matrices}

\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{\today}

\maketitle

% Abstract and Introduction
\abstract{
A new method of analysing positive bistochastic maps on the algebra of complex
matrices $M_{3}$ has been proposed.
By identifying the set of such maps with a convex set of linear operators on
$\mathbb{R}^{8}$, one can employ techniques from the theory of
compact affine semigroups to obtain results concerning asymptotic properties
of positive maps.
It turns out that the idempotent elements play a crucial role
in classifying the convex set into subsets, in which representations of
extremal positive maps are to be found.
It has been show that all extremal positive bistochastic maps that are not
Jordan isomorphisms of $M_3$ are represented by matrices that fall into two possible
categories, determined by the simplest idempotent matrices:
one by the zero matrix, and the other by a one dimensional orthogonal projection.
Some norm conditions for matrices representing possible extremal maps
have been specified and examples of maps from both categories have been
brought up, based on the results published previously.

\vspace{0.1cm}
{\scriptsize \noindent \textbf{Keywords:}
positive maps, extremal, idempotent, semigroup.}

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

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

\paragraph{}
Positive maps of operator algebras constitute a rich area of research, directly
connected to the theory of quantum entanglement.
In 1990s,
A.\,Peres and P.\,M.\,R. {Horo-deckis} pointed out at the intrinsic relation
between separable states of composite quantum systems
and positive maps of algebras of observables
\cite{peres1996separability,horodecki1996separability}.
The well established criterion of separability, proposed in the mentioned papers,
reveals a one-to-one correspondence between
positive maps and entanglement witnesses
\cite{chruscinski2014entanglement}.
% It is necessary to mention that their work was based on the previous
% results obtained by \mbox{M.-D.\,Choi}
% \mbox{\cite{choi1975completely,choi1980some,choi1977extremal}}.
This \emph{Peres-Horodecki criterion},
originally proposed for maps on algebras $M_{n}$ of square complex matrices of size $n$,
which holds true even in the most general setting of
injective von Neumann algebras \cite{miller2014horodeckis},
is computationally feasible as long as the structure of general positive
maps on operator algebras representing a composite quantum system in
question is known.
To this day, the complete characterisation
of positive maps have been obtained only for the algebra $M_{2}$
and the maps between $M_{2}$ and $M_{3}$
\cite{stormer1963positive,woronowicz1976positive}.

To analyse the structure of positive maps in the simplest, still unresolved
case of maps on $M_{3}$,
we propose a continuation of the reasoning conducted in our previous paper
\cite{miller2015stable}.
We have established a connection between positive maps that preserve both
the trace of matrices and the identity matrix, the so-called bistochastic
maps, and their stable subspaces that have the structure of Jordan algebras.
Here, we go one step further and explore the relation between those stable
subspaces and the idempotent real matrices that represent the conditional
expectations projecting onto the spaces.
To this end, we employ mostly geometrical techniques that allowed us before to
establish the structure theorem for maps on the algebra $M_{2}$
\cite{miller2015topology},
as well as the methods from the theory of compact affine semigroups
\cite{schwarz1955hausdorff,chow1975compact}.

The main result of this paper makes possible to outline a program,
suggesting where the extremal positive maps on $M_{3}$ are to be found
with respect to their connection to associated idempotents
(see Theorem \ref{thm:LowerIndices} below).
We have shown that all extremal positive bistochastic maps that are not
Jordan isomorphisms of $M_3$ are represented by matrices that fall into two possible
categories, determined by the simplest idempotent matrices:
one by the zero matrix, and the other by a one dimensional orthogonal projection.
As a corollary, we specify some norm conditions for matrices representing possible
extremal maps.
The structure of the paper concentrates on building a mathematical framework
necessary to prove the final result.
We start with a brief listing of necessary notation and definitions.

%%%%%%%%%%%%%%%%%%%%%
%%% Preliminaries %%%
%%%%%%%%%%%%%%%%%%%%%

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

\paragraph{}
Let $n, k \in \mathbb{N}$ be grater than 0.
Let $M_{n} = M_{n}(\mathbb{C})$ denote the algebra of complex square
matrices of size $n$.
The algebra of real matrices will always be denoted explicitly by
$M_{n}(\mathbb{R})$.
For $A \in M_{n}$, the norm $||A||$ is understood to be the standard operator
norm, i.e. the maximal singular value of the matrix $A$.
For the Hilbert-Schmidt norm (HS-norm) of $A$,
we reserve the symbol
$||A||_{HS} = \sqrt{\text{tr} A^{*} A}$,
where $\text{tr}$ denotes the trace operation,
and $A^{*}$ is the conjugate-transpose of $A$.
The HS-norm of $A$ can be computed as the sum of squares of
singular values of $A$.
The Hilbert-Schmidt inner product, induced by the HS-norm,
is defined as
$\langle A, B \rangle_{HS} = \text{tr} A^{*} B$,
for $A, B \in M_{n}$.
The identity matrix of $M_{n}$, we denote by $\mathbf{1}_{n}$,
or simply $\mathbf{1}$, and the null matrix by $\hat{0}$.

We say that a matrix $A \in M_{n}$ is positive-semidefinite,
or simply \emph{positive},
if the inner product $\langle \eta, A \eta \rangle \geq 0$,
for any vector $\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: $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})$.
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})$.
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$.
It is true that every positive map
can be written as a convex combination of extremal ones.
If  $S\!: M_{n} \rightarrow M_{n}$ is a positive map such that
$S(\mathbf{1}) = \mathbf{1}$ and
$\text{tr} S(A) = \text{tr} A$,
for any $A \in M_{n}$,
then we call it \emph{bistochastic},
or \emph{doubly stochastic}.

From now on,
let us fix $n = 3$.
We choose the set of normalised Gell-Mann matrices,
$\left \{ \lambda_{\mu} \right \}_{\mu=0}^{8}$, by taking:
\begin{equation}
\nonumber
    \lambda_{1} = \frac{1}{\sqrt{2}} \begin{pmatrix}
            0 & 1 & 0 \\
            1 & 0 & 0 \\
            0 & 0 & 0
        \end{pmatrix}, \quad
    \lambda_{2} = \frac{1}{\sqrt{2}} \begin{pmatrix}
            0 & -i & 0 \\
            i & 0 & 0 \\
            0 & 0 & 0
        \end{pmatrix}, \quad
    \lambda_{3} = \frac{1}{\sqrt{2}} \begin{pmatrix}
            1 & 0 & 0 \\
            0 & -1 & 0 \\
            0 & 0 & 0
        \end{pmatrix},
\end{equation}
\begin{equation}
\nonumber
    \lambda_{4} = \frac{1}{\sqrt{2}} \begin{pmatrix}
            0 & 0 & 1 \\
            0 & 0 & 0 \\
            1 & 0 & 0
        \end{pmatrix}, \quad
    \lambda_{5} = \frac{1}{\sqrt{2}} \begin{pmatrix}
            0 & 0 & -i \\
            0 & 0 & 0 \\
            i & 0 & 0
        \end{pmatrix}, \quad
    \lambda_{6} = \frac{1}{\sqrt{2}} \begin{pmatrix}
            0 & 0 & 0 \\
            0 & 0 & 1 \\
            0 & 1 & 0
        \end{pmatrix},
\end{equation}
\begin{equation}
\nonumber
    \lambda_{7} = \frac{1}{\sqrt{2}} \begin{pmatrix}
            0 & 0 & 0 \\
            0 & 0 & -i \\
            0 & i & 0
        \end{pmatrix}, \quad
    \lambda_{8} = \frac{1}{\sqrt{6}} \begin{pmatrix}
            1 & 0 & 0 \\
            0 & 1 & 0 \\
            0 & 0 & -2
        \end{pmatrix}
\end{equation}
and $\lambda_{0} = \frac{1}{\sqrt{3}} \mathbf{1}_{3}$;
which is an orthonormal basis for $M_{3}$ with respect to the HS inner product.
Any self-adjoint matrix $A = A^{*} \in M_{3}$ can be written as
$A = \lambda(a)$, where
$\lambda(a) = \sum_{\mu=0}^{8} a_{\mu} \lambda_{mu}$,
and
$a = (a_{0}, a_{1}, \ldots, a_{8}) \in \mathbb{R}^{9}$.
Sometimes, we will use a simplified notation:
$a = (a_{0}, \vec{a})$,
where $\vec{a} = (a_{1},\ldots,a_{8}) \in \mathbb{R}^{8}$,
and $\lambda(a) = \lambda(a_{0}, \vec{a}) = a_{0} \lambda_{0} + \vec{a} \cdot \vec{\lambda}$.
For a bistochastic map $S$,
let us define a matrix $x \in M_{8}(\mathbb{R})$ by
$x_{ij} = \text{tr} \lambda_{i} S(\lambda_{j})$,
$i,j = 1,2,\ldots,8$.
Then it is easy to see that $S$ acts on a self-adjoint matrix by
\begin{equation}
\label{eq:isomoprhism}
S(\lambda(a_{0}, \vec{a})) = \lambda(a_{0}, x \vec{a}).
\end{equation}
For a matrix $x \in M_{8}(\mathbb{R})$,
we denote a linear map on $M_{3}$ that preserves both the identity and trace,
defined by the relation \eqref{eq:isomoprhism},
by $S_{x}$.
Let $\Lambda \subset \mathbb{R}^{8}$ be a set of those real matrices $x$,
for which $S_{x}$ is a bistochastic map:
$\Lambda = \left \{ x \in M_{8}(\mathbb{R}) \: |  \: S_{x} \geq 0 \right \}$.
Therefore, there is a one-to-one correspondence between $\Lambda$
and the set of bistochastic maps on $M_{3}$.
The structure of the set $\Lambda$ is fairly complicated.
First, it is a closed convex set, i.e. for any $x,y \in \Lambda$,
$\lambda x + (1-\lambda)y \in \Lambda$,
for $0 \leq \lambda \leq 1$.
Moreover, is is a compact affine topological semigroup
(see e.g. \cite{schwarz1955hausdorff,chow1975compact} for the definitions)
with involution being the matrix transposition: $A \mapsto A^{t}$.
Obviously,
$S_{\mathbf{1}_{8}} = I$.
The structure of the set analogous to $\Lambda$,
but representing maps on the algebra $M_{2}$,
has been studied using geometrical methods in \cite{miller2015topology}.
Because there is no such geometrical identification for $n = 3$,
this time we exploit the semigroup aspect of the set $\Lambda$.

\begin{proposition}
\label{prop:LambdaAndBalls}
    Let $\overline{K}_{r}(\hat{0})$ denote a closed
    ball in $M_{8}(\mathbb{R})$ with respect to the operator norm,
    centred around $\hat{0}$, with radius $r > 0$.
    Then
    \begin{equation}
        \overline{K}_{\frac{1}{2}}(\hat{0}) \subset \Lambda \subset \overline{K}_{1}(\hat{0}).
    \end{equation}
\end{proposition}
\begin{proof}
    Suppose that $x \in M_{8}(\mathbb{R})$ and $||x|| \leq \frac{1}{2}$.
    Let $\vec{m}, \vec{n} \in \mathbb{R}^{8}$ be such that
    $P_{\vec{m}} = \lambda(\frac{1}{\sqrt{3}}, \vec{n})$ and
    $P_{\vec{n}} = \lambda(\frac{1}{\sqrt{3}}, \vec{m})$
    are orthogonal projections in $M_{3}$.
    It is easy to check that in that case
    $|| \vec{m} ||_{2} = || \vec{n} ||_{2} = \sqrt{\frac{2}{3}}$,
    where $|| \cdot||_{2}$ denotes
    the standard Euclidean norm.
    Because $||x|| \leq \frac{1}{2}$, we have that
    \begin{equation}
        \text{tr} \, P_{\vec{m}} S_{x}(P_{\vec{n}}) =
        \frac{1}{3} + \langle \vec{m}, x \vec{n} \rangle \geq
        \frac{1}{3} - |\langle \vec{m}, x \vec{n} \rangle| \geq 0.
        %\frac{1}{3} - \frac{1}{2} \frac{2}{3} = 0.
    \end{equation}
    Hence $S_{x}$ is positive, which means that $x \in \Lambda$.

    Let now $x \in \Lambda$.
    Then for any $A = A^{*} \in M_{3}$, $S_{x}$ fullfils the
    \emph{Kadison-Schwarz inequality}
    \cite{choi1980some}:
    \begin{equation}
     \label{eq:KSineq}
        S(A)^{2} \leq S(A^{2}).
    \end{equation}
    Let $\vec{n} \in \mathbb{R}^{8}$; since $\lambda(\frac{1}{\sqrt{3}}, \vec{n})$
    is self-adjoint, by \eqref{eq:KSineq}, we have that
    \begin{equation}
        \frac{1}{\sqrt{3}} + || x \vec{n} ||_{2}^{2} = \text{tr}\,
        \left ( S_{x}(\lambda(\frac{1}{\sqrt{3}}, \vec{n}) \right)^{2} \leq
        \text{tr}\, \lambda(\frac{1}{\sqrt{3}}, \vec{n})^{2} =
        \frac{1}{\sqrt{3}} + ||\vec{n}||_{2}^{2},
    \end{equation}
i.e. $||x\vec{n}||_{2} \leq ||\vec{n}||_{2}$ for any $\vec{n} \in \mathbb{R}^{8}$,
which means that $x \in \overline{K}_{1}(\hat{0})$.
\end{proof}

Let $P_{8} \in M_{8}(\mathbb{R})$ denote a diagonal matrix
$P_{8} = \text{diag}(0,0,0,0,0,0,0,1)$;
and so on for other sets of indices:
$P_{38} = \text{diag}(0,0,1,0,0,0,0,1)$, etc.
It is true that all matrices
$P_{8}, P_{38}, P_{138}, P_{1238}, P_{13468}$ are idempotent elements
belonging to $\Lambda$.
In addition, there are no idempotent elements in $\Lambda$ of rank 6 or 7,
and the only idempotent of rank 8 is the identity $\mathbf{1}_{8}$.
Let also $G_{3} = \text{Ad} \, \text{SU}(3) \subset \Lambda$ denotes
the group of those matrices $g \in \Lambda$ such that
$S_{g}$ is an automorphism: $S_{g}(A) = U A U^{*}$,
for a unitary matrix $U \in \text{SU}(3)$ and for any $A \in M_{3}$.
It is evident that $G_{3} \subset \text{SO}(8)$,
the special group of orthogonal matrices.
The set of those $x$ such that $S_{x}$ is an extremal map in the set
of all positive maps on $M_{3}$ (not necessarily bistochastic) is denoted by
$\text{Ext}_{0}(\Lambda)$,
whereas the set of extremal points of the convex set $\Lambda$ is labelled as
$\text{Ext}(\Lambda)$.
The matrix $x \in \text{Ext}(\Lambda)$,
if and only if for all
$y_{1}, y_{2} \in \Lambda$ and $0 \leq \lambda \leq 1$,
if $x = \lambda y_{1} + (1-\lambda) y_{2}$,
then $y_{1} = y_{2} = x$.
It is true that $\text{Ext}_{0}(\Lambda) \subset \text{Ext}(\Lambda)$.
The next fact follows from Proposition \ref{prop:LambdaAndBalls}.

\begin{proposition}
    \label{prop:oneHalfofOrthogonal}
    Let $x \in \mathrm{Ext}(\Lambda)$.
    Suppose that $||x|| = \frac{1}{2}$;
    then $ x = \frac{1}{2} R$,  for $R \in \mathrm{O}(8)$.
\end{proposition}
\begin{proof}
    Let $x \in \mathrm{Ext}(\Lambda)$ and $||x|| = \frac{1}{2}$.
    Let $x = R |x|$ be the polar decomposition of $x$,
    $R \in \text{O}(8)$, $|x| = \sqrt{x^{t} x}$.
    Supose that $|x| \neq \frac{1}{2} \mathbf{1}_{8}$.
    Let $y_{1} = \frac{1}{2} \mathbf{1}_{8}$ and
    $y_{2} = 2 |x| - \frac{1}{2} \mathbf{1}_{8}$.
    Then $- \frac{1}{2} \mathbf{1}_{8} \leq y_{2} \leq \frac{1}{2} \mathbf{1}_{8}$,
    so $|| y_{2} || \leq \frac{1}{2}$
    and by Proposition \ref{prop:LambdaAndBalls},
    we have that both $R y_{1}, R y_{2} \in \Lambda$.
    Then $x = \frac{1}{2} R y_{1} + \frac{1}{2} R y_{2}$,
    and thus it cannot be extremal, a contradiction.
    Hence, $x = \frac{1}{2} R$.
\end{proof}

\begin{remark}
    By Proposition \ref{prop:LambdaAndBalls},
    we see that $x \in \text{Ext}(\Lambda)$ implies that
    $||x|| \geq \frac{1}{2}$.
    Therefore, $x = \frac{1}{2} R$, $R \in \mathrm{O}(8)$,
    are the only possible elements in $\text{Ext}(\Lambda)$,
    and so in $\text{Ext}_{0}(\Lambda)$,
    with the norm $||x|| = \frac{1}{2}$.
\end{remark}

%%%%%%%%%%%%%%%%%%%%
%%% Main results %%%
%%%%%%%%%%%%%%%%%%%%

\section{Idempotent and extremal elements of $\Lambda$}
\label{sec:main}

Let $x \in \Lambda$ and let
$\langle x \rangle \subset \Lambda$ be the semigroup generated by $x$:
$\langle x \rangle = \left \{ x^{k} \: | \: k \in \mathbb{N}, k \geq 1 \right \}$.
By $\overline{\langle x \rangle}$,
we denote the closure of $\langle x \rangle$ in $M_{8}(\mathbb{R})$.
The proof of the following proposition is presented in
    \cite[Lemma 3]{schwarz1955hausdorff}.

\begin{proposition}
    \label{prop:UniqeClusterPoint}
    Since $\Lambda$ is closed, $\overline{\langle x \rangle} \subset \Lambda$.
    The set $\overline{\langle x \rangle}$ contains a unique idempotent,
        denoted by $e_{x}$.
\end{proposition}

\begin{definition}
    For the set $\Lambda$, we define the following subsets:
    \begin{enumerate}
       \item the set of idempotents of $\Lambda$:
            $\mathcal{E}(\Lambda) = \left \{ e \in \Lambda \: |  \: e^{2} = e \right \}$;
       \item the set of nilpotent elements:
            $\mathcal{N}(\Lambda) = \left \{ x \in \Lambda \: |  \: \lim \limits_{n \rightarrow \infty} x^{n} = \hat{0} \right \}$;
       \item the group of invertible elements:
            $\mathcal{G}(\Lambda) = \left \{ x \in \Lambda \: |  \: \exists \, y \in \Lambda, xy = yx = \mathbf{1}_{8} \right \}$.
    \end{enumerate}
   For an idempotent element $e \in \mathcal{E}(\Lambda)$,
   we define the following subsets of $\Lambda$:
   \begin{enumerate}
        \item let $H(e)$ be the maximal subgroup of $\Lambda$
            containing $e \in \mathcal{E}(\Lambda)$;
        \item $Q(e) = \left \{ x \in \Lambda \: | \: e_{x} = e \right \}$,
        where $e_{x}$ is the unique idempotent element of $\overline{\langle x \rangle}$.
   \end{enumerate}
\end{definition}

\begin{remark}
\label{rem:GOfLambda}
It is a known fact from the semigroup theory that for each idempotent
element of a semigroup, there is exactly one maximal subgroup containing it.
In particular, in our case of the semigroup $\Lambda$,
$H(\hat{0}) = \left \{ \hat{0} \right \}$,
$H(\mathbf{1}_{8}) = \mathcal{G}(\Lambda)$,
obviously,
and moreover $H(P_{8}) = \left \{ P_{8} \right \}$.
Indeed,
if $x = (x_{ij})_{i,j=1}^{8} \in H(P_{8})$,
then
$x = x P_{8} = P_{8} x P_{8} = x_{88} P_{8}$.
Because there is a sequence of natural numbers $n_{k}$, $k=1,2,3,\ldots$,
such that $x^{n_{k}} \overset{k}{\rightarrow} P_{8}$, so
$|x_{88}| = 1$. But $- P_{8} \notin \Lambda$, and thus $x = P_{8}$.
\end{remark}

\begin{remark}
    \label{rem:Qof1}
It is true that $Q(\hat{0}) = \mathcal{N}(\Lambda)$.
Indeed, let $x \in Q(\hat{0})$,
then by definition, there is a sequence of natural numbers $n_{k}$ such that
$x^{n_{k}} \overset{k}{\rightarrow} \hat{0}$.
For any $l \in \mathbb{N}$, there is $k(l)$ such that
$l \leq n_{k(l)}$, and since
$||x|| \leq 1 $, by Proposition \ref{prop:LambdaAndBalls}, one has
$||y^{l}|| \leq ||y^{l - n_{k(l)}}|| \, ||y^{n_{k(l)}}|| \leq ||y^{n_{k(l)}}||
\overset{l}{\rightarrow} 0$.
Hence $y^{l} \overset{l}{\rightarrow} \hat{0}$
and $Q(\hat{0}) \subset \mathcal{N}(\Lambda)$.
The reverse inclusion is obvious.
Moreover, since we have that $H(\mathbf{1}_{8}) = \mathcal{G}(\Lambda)$,
    by \cite[Theorem 8]{schwarz1955hausdorff},
    $H(\mathbf{1}_{8}) = Q(\mathbf{1}_{8}) \cdot \mathbf{1}_{8}$,
    and hence $Q(\mathbf{1}_{8}) = \mathcal{G}(\Lambda)$.
\end{remark}

Our task is to analyse the family of sets
$\left \{ Q(e), e \in \mathcal{E}(\Lambda) \right \}$,
and in particular,
to show, where among this family the elements of
$\text{Ext}_{0}(\Lambda)$ are to be found.
To this end, we present the following series of results.

\begin{proposition}
    For $e_{1}, e_{2} \in \mathcal{E}(\Lambda)$,
    $e_{1} \neq e_{2}$,
    the sets $Q(e_{1})$ and $Q(e_{2})$ are disjoint.
    Moreover,
    $\Lambda = \! \bigcup \limits_{e \in \mathcal{E}(\Lambda)} \! Q(e)$.
\end{proposition}
\begin{proof}
    If $e_{1} \neq e_{2}$, by Proposition \ref{prop:UniqeClusterPoint},
    the sets $Q(e_{1})$ and $Q(e_{2})$ must be disjoint.
    For $x \in \Lambda$, we have that $x \in Q(e_{x}) \subset \Lambda$,
    and the assertion follows.
\end{proof}

\begin{lemma}
    \label{lem:equivClassesOfQe}
    Let $e \in \mathcal{E}(\Lambda)$ and $g \in \mathcal{G}(\Lambda)$.
    Then $Q(g e g^{t}) = g Q(e) g^{t} =
    \left \{ g x g^{t} \: | \: x \in Q(e) \right \}$.
\end{lemma}
\begin{proof}
    It is clear that $g \langle x \rangle g^{t} = \langle g x g^{t} \rangle$.
    Because the mapping $x \mapsto g x g^{t}$ is a homeomorphism,
    so $g \overline{\langle x \rangle} g^{t} = \overline{\langle g x g^{t} \rangle}$.
    Let $x \in Q(g e g^{t})$.
    Then $g e g^{t} \in \overline{\langle x \rangle}$.
    Hence $e \in g^{t} \overline{\langle x \rangle} g = \overline{\langle g^{t} x g \rangle}$.
    This in turn means that $g^{t} x g \in Q(e)$, i.e.
    $x \in g Q(e) g^{t}$, which establishes that
    $Q(g e g^{t}) \subset g Q(e) g^{t}$.
    The reverse inclusion follows from an analogous reasoning.
\end{proof}

Next, we describe the structure of the set of idempotents
in $\Lambda$.
For $e \in \mathcal{E}(\Lambda)$,
let $\mathcal{E}_{G_{3}}(e) = \left \{ g e g^{t} \: | \: g \in G_{3} \right \}$.
At first, in the following lemma, we recall a known fact
that an idempotent contractive operator on a Hilbert space
is an orthogonal projection
(see e.g. \cite[Problem 5.3.14]{abramovich2002problems}).
\begin{lemma}
    \label{lem:eIsProj}
    Let $e \in \mathcal{E}(\Lambda)$, then $e^{t} = e$, and hence,
    $e$ is an orthogonal projection in $M_{8}(\mathbb{R})$.
\end{lemma}
\begin{proof}
    Because $e^{2} = e$, so $||e|| = ||e^{2}|| \leq ||e||^{2}$,
    hence $||e|| \geq 1$.
    Since $e \in \Lambda$, by Proposition \ref{prop:LambdaAndBalls}, $||e|| =1$.
    Suppose that $\vec{n} \in \ker e$ and $\vec{m} \in \mathcal{R}(e)$,
    the range of the operator $e$.
    Let $\alpha \in \mathbb{R}$.
    Then
\begin{equation}
    || \alpha \vec{m} ||^{2} = || P (\vec{n} + \alpha \vec{m}) ||^{2} \leq
    || \vec{n} + \alpha \vec{m}||^{2} \leq ||\vec{n}||^{2} +
        2 \alpha \langle \vec{n}, \vec{m} \rangle + || \alpha \vec{m}||^{2},
\end{equation}
i.e. $||\vec{n}||^{2} + 2 \alpha  \langle \vec{n}, \vec{m} \rangle \geq 0$,
for any $\alpha \in \mathbb{R}$.
It means that
$\langle \vec{n}, \vec{m} \rangle = 0$,
for every  $\vec{n} \in \ker e$ and $\vec{m} \in \mathcal{R}(e)$,
i.e.
$\ker e \perp \mathcal{R}(e)$, which proves that $e = e^{t}$.
\end{proof}

\begin{proposition}
\label{prop:htranspose}
Let $e \in \mathcal{E}(\Lambda)$ and $h \in H(e)$.
Then $h^{t} \in H(e)$, and $h^{t} h = h h^{t} = e$.
\end{proposition}
\begin{proof}
    By \cite[Theorem 8]{schwarz1955hausdorff},
    $H(e) = Q(e) e = e \, Q(e)$.
    If $x \in Q(e)$, then $x^{t} \in Q(e)$,
    by Lemma \ref{lem:eIsProj}.
    Hence, $h^{t} \in H(e)$.
    Since $e$ is a projection, $e \leq \mathbf{1}_{8}$;
    moreover $h^{t} h \leq \mathbf{1}_{8}$, because $h \in \Lambda$.
    Thus, $\hat{0} \leq (h^{t} h)^{k} \leq h^{t} h = e h^{t} h e \leq e$,
    for any $k \in \mathbb{N}$.
    If $n_{k}$ is a sequence of natural numbers such that
    $(h^{t} h)^{n_{k}} \overset{k}{\rightarrow} e$,
    we obtain that $h^{t} h = e$.
    By the same reasoning, we have also: $h h^{t} = e$.
\end{proof}

Let us recall that for a bistochastic map $S$, by
$K_{S}$ we denote the stable subspace of $S$ defnied by
\begin{equation}
    K_{S} = \left \{ x \in M_{3} \:|\:
            \forall k \in \mathbb{N} \,\,
            || S^{k} x ||_{HS} = || S^{*k} x ||_{HS} =  ||x||_{HS}
    \right \},
\end{equation}
where $S^{*}$ is the adjoint map given by
$\text{tr} S^{*}(A) B = \text{tr} A S(B)$ for all $A, B \in M_{3}$
(see \cite[Eq. (3.3)]{miller2015stable}).
The fact that $H(\mathbf{1}_{8}) = \mathcal{G}(\Lambda)$
can be generalised to the following result.
\begin{theorem}
    Let $e \in \mathcal{E}(\Lambda)$ and
    $K_{S_{e}}$ be the stable subspace of the map $S_{e}$.
    Then $K_{S_{e}}$ is a Jordan algebra and
    $H(e) \cong \text{Aut}_{J} \, K_{S_{e}}$,
    the group of Jordan automorphisms of $K_{S_{e}}$.
\end{theorem}
\begin{proof}
    Because $e$ is idempotent, by
    \cite[Corollary 3]{miller2015stable},
    the space $K_{S_{e}} = S_{e}(M_{3})$ is a Jordan algebra.
    The map $S_{e}$ is in fact the conditional expectation onto $K_{S_{e}}$.
    Let $h \in H(e)$.
    By Proposition \ref{prop:htranspose}, for any $k\in \mathbb{N}$,
    $S_{h}^{* k} S_{h}^{k} = S_{h^{t}}^{k} S_{h}^{k} =  S_{(h^{t})^{k} h^{k}} = S_{e}$,
    and the same for $S_{h}^{k} S_{h}^{* k}= S_{e}$.
    Thus, the stable algebra $K_{S_{h}} = K_{S_{e}}$
    (compare \cite{miller2015stable}, eq. (3.3) and below).
    Again, by \cite[Corollary 3]{miller2015stable},
    $\varphi_{h} = S_{h} \big |_{K_{S_{e}}}$
    is a Jordan automorphism of the Jordan algebra $K_{S_{e}}$.

    On the other hand, if
    $\varphi$ is an arbitrary Jordan automorphism of $K_{S_{e}} \subset M_{3}$,
    then it could be extended to a bistochastic map $S_{h}$ on $M_{3}$,
    for some $h \in \Lambda$,
    by $S_{h} = \varphi \circ S_{e}$.
    Then
    $S_{h} S_{e} = S_{h} = S_{e} S_{h}$,
    because $S_{e}$ acts as the identity map on $K_{S_{e}}$.
    Hence, $he = eh = h$.
    In addition, since $\varphi$ is invertible on $K_{S_{e}}$,
    by extending $\varphi^{-1}$ to another bistochastic map
    $S_{h'}$,  $h' \in \Lambda$,
    we show that $h' \in H(e)$ and $h' h = h h' = e$,
    which proves that $h \in H(e)$.
\end{proof}

\begin{remark}
From the above theorem,
since $\mathcal{G}(\Lambda) = H(\mathbf{1}_{8})$,
 we infer that
the group $\mathcal{G}(\Lambda)$ consists of those matrices that represent
Jordan isomorphism on $M_{3}$,
i.e. for any $g \in \mathcal{G}(\Lambda)$,
there is a unitary matrix $U \in \text{SU}(3)$ such that
either $S_{g}(A) = U A U^{*}$ or $S_{g}(A) = U A^{t} U^{*}$
for all $A \in M_{3}$.
% It is evident that $G_{3} \subset \mathcal{G}(\Lambda)$.
% The elements of $G_{3}$ represent precisely those Jordan isomorphism,
% that are also ordinary isomorphisms;
% and for every $g \in \mathcal{G}(\Lambda) \backslash G_{3}$ there is
% $g' \in G_{3}$ such that $g = g' \tau$,
% where $\tau \in \mathcal{G}(\Lambda)$ is such that
% $S_{\tau}(A) = A^{t}$ for every $A \in M_{3}$,
% i.e.
% $\tau = P_{13468} - P_{257}$.
\end{remark}

\begin{theorem}
\label{thm:Idempotents}
The set $\mathcal{E}(\Lambda)$
    is a sum of seven disjoint subsets:
    \begin{equation}
        \mathcal{E}(\Lambda) = \bigcup \limits_{e_{0} \in J} \mathcal{E}_{G_{3}}(e_{0}),
    \end{equation}
    where $J = \left \{ \hat{0}, P_{8}, P_{38}, P_{138}, P_{1238}, P_{13468}, \mathbf{1}_{8} \right \}$.
\end{theorem}
\begin{proof}
    If $e \in \mathcal{E}(\Lambda)$, then as above, $S_{e}$ is a conditional
    expectation map onto the Jordan algebra $K_{S_{e}}$.
    By Theorems 5.3.8 and 6.2.3 of \cite{hanche1984jordan},
    all Jordan subalgebras of $M_{3}$ are isomorphic (unitary equivalent)
    to one of the following:
    $\mathbb{C}\mathbf{1}$,
    $\mathbb{C} E_{12} \oplus \mathbb{C} E_{3}$,
    $\mathbb{C} E_{1} \oplus \mathbb{C} E_{2} \oplus \mathbb{C} E_{3}$,
    $M_{2}^{s} \oplus \mathbb{C} E_{3}$,
    $M_{2} \oplus \mathbb{C} E_{3}$,
    $M_{3}^{s}$,
    and
    $M_{3}$ itself;
    where $M_{k}^{s}$ is the Jordan algebra of symmetric matrices of
    size $k$: $M_{k}^{s} = \{ A \in M_{k}: A = A^{t} \}$;
    $E_{i}, i = 1,2,3$, are matrix units with 1 at \emph{i}th diagonal entry
    and 0 elsewhere, and $E_{12} = E_{1} + E_{2}$.
    Hence, there is $g \in G_{3}$ such that
    $e = g e_{0} g ^{t}$, and $e_{0}$ is the orthogonal projection
    that represents the projection map onto precisely one of the algebras
    mentioned above.
    It is straightforward to check that then $e_{0} \in J$,
    and $\text{dim} \, e_{0} + 1$ is equal to the dimension of the respective
    Jordan algebra associated to it.
    Hence, $e \in \mathcal{E}_{G_{3}}(e_{0})$.
\end{proof}

\begin{corollary}
\label{cor:q}
    For $e \in \mathcal{E}(\Lambda)$, since $e$ is a projection,
    $\text{dim} \, e
    \in \left \{ 0,1,2,3,4,5,8 \right \}$.
\end{corollary}

We prove a useful decomposition of elements of $Q(e)$ in the following lemma.

\begin{lemma}
\label{lem:decomposition}
    Let $e \in \mathcal{E}(\Lambda)$.
    A matrix $x$ belongs to $\in Q(e)$, if and only if,
    $x = h + y$, where
    $h \in H(e)$, $H(e) y = y H(e) = \hat{0}$.
    and $\lim_{k \rightarrow \infty} y^{k} = \hat{0}$.
    This decomposition is unique.
\end{lemma}
\begin{proof}
    Suppose that $h + y \in \Lambda$, $h \in H(e)$, $y^{k}  \overset{k}{\rightarrow}  \hat{0}$,
    and $hy = yh = \hat{0}$.
    Because $h \in H(e)$, there is a sequence $n_{k} \in \mathbb{N}$ for $k =1,2,3,\ldots$,
    such that $h^{n_{k}} \overset{k}{\rightarrow} e$.
    Then $x^{n_{k}}  = h^{n_{k}} + y^{n_{k}}  \overset{k}{\rightarrow}  e$, i.e.
    $x \in Q(e)$.
    On the other hand,
    let us suppose that $x \in Q(e) \subset \Lambda$.
    Let also $h = e x e$, and $y = e^{\perp} x e^{\perp}$,
    where $e^{\perp} = \mathbf{1}_{8} - e$.
    Then $h \in Q(e)$, and since
    $h =  h e = e h$,
    $h \in H(e)$, by \cite[Theorem 8]{schwarz1955hausdorff}.
    For $h' \in H(e)$, we have
    $h' y = h' e y = \hat{0} = y e h' = yh'$,
    i.e. $H(e) y = y H (e) = \hat{0}$.
    There is a sequence $n_{k}$ of natural numbers such that
    $x^{n_{k}}  \overset{k}{\rightarrow}  e$.
    Hence
    $h^{n_{k}} = e h^{n_{k}}  = e x^{n_{k}}  \overset{k}{\rightarrow} e^{2}  = e$.
    It follows that $y^{n_{k}}  \overset{k}{\rightarrow}  \hat{0}$,
    which is enough to say that $y^{k} \overset{k}{\rightarrow} \hat{0}$.
    Lastly,
    suppose that $x = h + y = h_{2} + y_{2}$,
    where $h_{2} \in H(e)$ and $y_{2}$,
    $h_{2} y_{2} = y_{2} h_{2} = \hat{0}$.
    For some sequence of natural numbers $m_{k}$, we have
    $e y_{2} = \lim_{k} h_{2}^{m_{k}} y_{2} = \hat{0}$.
    Then $h = e x = e h_{2} + e y_{2} = h_{2}$, and also $y = y_{2}$.
\end{proof}

For $x \in Q(e)$, since the decomposition described above is unique,
let us denote by $h_{x}$ and $y_{x}$ the matrices such that
$x = h_{x} + y_{x}$,
$h_{x} \in H(e)$, $H(e) y_{x} = y_{x} H(e)$, and
$y_{x}^{k} \overset{k}{\rightarrow} \hat{0}$.
The above lemma justifies the following definition.

\begin{definition}
    Let $e \in \mathcal{E}(\Lambda)$.
    We define:
    $Q_{0}(e) = \left \{ x \in Q(e) \: | \: || y_{x} || < 1 \right \}$, and
    $Q_{1}(e) = \left \{ x \in Q(e) \: | \: || y_{x} || = 1 \right \}$.
    For $i = 1, 2, 3, \ldots 8$,
    let $Q_{1}^{i}(e)$ be a set consisting of those $x = h_{x} + y_{x} \in Q_{1}(e)$,
    for which the multiplicity of the highest singular value of $y_{x}$
    is equal to $i$.
\end{definition}

It is obvious that
$Q(e) = \bigcup \left \{ Q_{1}^{i}(e), i=1,2,\ldots,8 \right \} \cup Q_{0}(e)$,
and these sets are disjoint (possibly empty).

\begin{proposition}
Let $e \in \mathcal{E}(\Lambda)$.
If $\mathrm{dim} \, e \in \left \{ 5,8 \right \}$,
then
$Q(e) = Q_{0}(e)$.
If $\mathrm{dim} \, e \leq 4$,
then
$Q_{1}^{i}(e) = \emptyset$ for $i \geq 5 - \mathrm{dim} \, e$.
\end{proposition}
\begin{proof}
    If $\mathrm{dim} \, e = 8$,
    then $e = \mathbf{1}_{8}$, and since by Remark \ref{rem:Qof1},
    $Q(\mathbf{1}_{8}) = H(\mathbf{1}_{8}) = \mathcal{G}(\Lambda)$,
    obviously $Q(\mathbf{1}_{8}) = Q_{0}(\mathbf{1}_{8})$.
    Suppose that $e \neq \mathbf{1}_{8}$
    and $x = h_{x} + y_{x} \in Q(e)$.
    Then $x^{t} x = h_{x}^{t} h_{x} + y_{x}^{t} y_{x} = e + y_{x}^{t} y_{x}$,
    by Proposition \ref{prop:htranspose};
    $y_{x} e = e y_{x} = \hat{0}$,
    and because for any $k \in \mathbb{N}$, $(x^{t} x)^{k} \in \Lambda$,
    we have that $e + p = \lim_{k} x^{t} x \in \Lambda$,
    where $p$ is a orthogonal projection onto the space spanned by
    eigenvectors of $y_{x}^{t} y_{x}$ with eigenvalue 1.
    Of course, $e p = p e = \hat{0}$, so
    the matrix $e + p \in \mathcal{E}(\Lambda)$.
    It must be that $e + p \neq \mathbf{1}_{8}$,
    otherwise $x^{t} x = \mathbf{1}_{8}$, and hence
    $x \in \mathcal{G}(\Lambda) = Q(\mathbf{1}_{8})$, a contradiction.
    If $\mathrm{dim}\,e = 5$, then $p = \hat{0}$,
    because by Theorem \ref{thm:Idempotents},
    there are no idempotent elements of $\Lambda$
    with rank $6$ or $7$.
    Hence $||y|| < 1$ and $x \in Q_{0}(e)$.
    By the same argument, for $\textrm{dim}\, e \leq 4$,
    it is impossible that $\mathrm{dim} \, p  + \mathrm{dim}\, e \geq 5$,
    so $Q_{1}^{i}(e) = \emptyset$, for $i \geq 5 - \mathrm{dim} \, e$,
    because by definition, $i = \textrm{dim}\,p$.
\end{proof}

For the sake of convenience, let us introduce the following sequence
of elements of $\mathcal{E}(\Lambda)$:
$p_{0} = \hat{0}, p_{1} = P_{8}$, $p_{2} = P_{38}$,
$p_{3} = P_{138}$, $p_{4} = P_{1238}$, $p_{5} = P_{13468}$.

\begin{theorem}
\label{thm:LowerIndices}
    Let $i,j$  be integers such that
    $1 \leq i \leq 4$, $0 \leq j \leq 4$ and $i+j \leq 5$.
    If $x \in Q_{1}^{i}(p_{j})$,
    then there exist $g_{1}, g_{2} \in G_{3}$ and $z \in Q_{0}(p_{i+j})$
    such that $x = g_{1} z g_{2}$.
\end{theorem}
\begin{proof}
    Let $x \in Q_{1}^{i}(p_{j})$ and
    $x = h_{x} + y_{x}$, as above.
    Since this decomposition is unique, we can write as in the proof of
    Lemma \ref{lem:decomposition}:
    $h_{x} = p_{j} x p_{j}$, and $y_{x} = p_{j}^{\perp} x p_{j}^{\perp}$,
    where $p_{j}^{\perp} = \mathbf{1}_{8} - p_{j}$.
    Because $p_{j} = p_{j}^{t}$, then
    $h y^{t} = y h^{t} = \hat{0}$, and thus
    $x x^{t}  = h h^{t} + y y^{t} = p_{j} + y y^{t}$,
    by \mbox{Proposition \ref{prop:htranspose}}.
    Let $R_{1} (p_{i} + y_{0}) R_{2}$ be the singular value decomposition of $y$,
    i.e. $R_{1}, R_{2}  \in \text{O}(8)$ are orthogonal matrices,
    and $y_{0}$ is diagonal with the only possible non-zero entries $s_{1}, s_{2}, \ldots, s_{8-i}$,
    such that $1 > s_{1} \geq s_{2} \geq \ldots \geq s_{8-i} \geq 0$,
    and $p_{i} y_{0} = y_{0} p_{i} = \hat{0}$.
    Then for $k \in \mathbb{N}$,
    $(x x^{t})^{k} = p_{j} + R_{1}( p_{i} + (y_{0} y_{0}^{t})^{k}) R_{1}^{t} \in \Lambda$,
    and  because $\Lambda$ is closed:
    $e_{1} = p_{j} + R_{1} p_{i} R_{1}^{t} = \lim_{k} (x x^{t})^{k} \in \Lambda$.
    Also, since $h y^{t} = y h^{t} = \hat{0}$,
    we have that $p_{j} R_{1} p_{i} R_{1}^{t} = R_{1} p_{i} R_{1}^{t} p_{j} = \hat{0}$.
    It follows that $e_{1}$ is an idempotent and $\text{rank} \, e_{1} = i+j$.
    By Theorem \ref{thm:Idempotents}, there is $g_{1} \in G_{3}$ such that
    $e_{1} = g_{1} p_{i+j} g_{1}^{t}$.
    A similar argument,
    applied this time to $x^{t} x$, shows that there is $g_{2} \in G_{3}$
    such that the idempotent $e_{2} = p_{j} + R_{2}^{t} p_{i} R_{2} \in \Lambda$
    could be written as $e_{2} = g_{2}^{t} p_{i+j} g_{2}$.
    Let $z = g_{1}^{t} x g_{2}^{t}$.
    What remains to show is that $z \in Q_{0}(p_{i+j})$.
    It is evident that $z \in \Lambda$.
    One can easily check that
    $p_{i+j} z = z p_{i+j}$,
    and hence $z = h_{z} + y_{z}$,
    where $h_{z} = p_{i+j} z p_{i+j}$,
    and $y_{z} = p_{i+j}^{\perp} z p_{i+j}^{\perp}$,
    $p_{i+j}^{\perp} = \mathbf{1}_{8} - p_{i+j}$.
    Because $h_{z} = p_{i+j} h_{z} = h_{z} p_{i+j}$,
    $h_{z} \in H(p_{i+j})$.
    Obviously, $h y_{z} = y_{z} h = \hat{0}$, for any $h \in H(p_{i+j})$.
    In addition, we have
    $y_{z} = g_{1}^{t}R_{1} y_{0} R_{2} g_{2}^{t}$,
    so $||y_{z}^{k}|| \leq ||y_{0}||^{k} = s_{1}^{k} \overset{k}{\rightarrow} \hat{0}$.
    Therefore, by Lemma \ref{lem:decomposition},
    $z \in Q(p_{i+j})$.
    Since $||y_{z}|| < 1$,
    $z \in Q_{0}(p_{i+j})$, which ends the proof.
\end{proof}

The main result of this paper could be captured in the following remark.
\begin{corollary}
\label{cor:q0}
    Suppose that $x \in \text{Ext}_{0}(\Lambda)$ and $S_{x}$ is not a Jordan isomorphism.
    Then there exist $g_{1}, g_{2} \in G_{3}$
    such that $g_{1}^{t} x g_{2}^{t} \in Q_{0}(\hat{0}) \cup Q_{0}(P_{8})$.
    In other words,
    either $||x|| < 1$,
    or
    $x = g_{1} (P_{8} + y) g_{2}$,  $y P_{8} = P_{8} y = \hat{0}$,
    and $|| y || < 1$.
\end{corollary}
\begin{proof}
Let $x \in  \text{Ext}_{0}(\Lambda)$.
    By Lemma \ref{lem:equivClassesOfQe} and Theorem \ref{thm:Idempotents}, there is $g \in G_{3}$ such that
    $g^{t} x g \in Q(e_{0})$, and $e_{0} \in J$.
    Because $S_{x}$ is an extremal positive map, then by
    \cite[Theorem 2]{miller2015stable},
    $e_{0} \in \left \{ \hat{0}, P_{8}, \mathbf{1}_{8} \right \}$.
    By Remark \ref{rem:Qof1}, $x \notin Q(\mathbf{1}_{8})$, hence
    $z = g^{t} x g \in Q(\hat{0}) \cup Q(P_{8})$,
    and $z \in \text{Ext}_{0}(\Lambda)$
    (cf. \cite[Lemma 3.1.2]{stormer2013positive}).
    Suppose that $z \in Q(P_{8})$.
    By Theorem \ref{thm:LowerIndices},
    because $z \in \text{Ext}_{0}(\Lambda)$,
    $z \notin Q_{1}^{i}(P_{8})$
    for $i \geq 1$ (see  \cite[Theorem 2]{miller2015stable}).
    Hence $z \in Q_{0}(P_{8})$, and put $g_{1} = g$ and $g_{2} = g^{t}$.
    Then $x = g_{1} z g_{2}$,
    and by Lemma \ref{lem:decomposition}, because $H(P_{8}) = \left \{ P_{8} \right \}$
    (see Remark \ref{rem:GOfLambda}),
    $z = P_{8} + y$,  $y P_{8} = P_{8} y = \hat{0}$, and $||y|| < 1$.
    On the other hand, if $z \in Q(\hat{0})$,
    then by the same reasoning either $z \in Q_{0}(\hat{0})$,
    and $||z|| < 1$, because $H(\hat{0}) = \left \{ \hat{0} \right \}$, or
    $z \in Q_{1}^{1}(\hat{0})$ and then there are $g_{01}, g_{02} \in G_{3}$ such that
    $g_{01} z g_{02} \in Q_{0}(P_{8})$.
    Then put $g_{1} = g g_{01}^{t}$ and $g_{2} = g_{02}^{t} g^{t}$,
    and the assertion follows.
\end{proof}

We summarize the results presented above by saying that they allow
to narrow the task of finding positive extremal and bistochastic maps
on $M_{3}(\mathbb{C})$ to three specific groups;
and examples in all these groups have been found previously.
First, there are Jordan isomorphisms, represented by matrices from
$Q(\mathbf{1}_{8}) = \mathcal{G}(\Lambda)$.
Second, there are maps that could be called \emph{strongly ergodic}
\cite{miller2015stable},
belonging to the class represented by
$\left \{ x \in Q_{0}(\hat{0}) \:|\: ||x|| = \frac{1}{2} \right \}$,
of which the celebrated Choi map
\cite{choi1977extremal} is an example.
For a generalised Choi map $\Phi[a,b,c]$:
\begin{equation}\label{eq:choi}
\Phi[a,b,c](X)=\\
\frac{1}{2}
\begin{pmatrix}
ax_{11}+bx_{22}+cx_{33} & -x_{12} & -x_{13} \\
-x_{21} & cx_{11}+ax_{22}+bx_{33} & -x_{23} \\
-x_{31} & -x_{32} & bx_{11}+cx_{22}+ax_{33}
\end{pmatrix},
\end{equation}
where $X = (x_{ij})_{i,j = 1}^{3}$,
if we parametrise:
\begin{equation}
a(t)=\dfrac{(1-t)^2}{1-t+t^2},\quad b(t)=\dfrac{t^2}{1-t+t^2},\quad c(t)=\dfrac 1{1-t+t^2},
\end{equation}
$0 \leq t < 1$,
then $\Phi[a(t), b(t), c(t)]$ is an extremal bistochastic map on $M_{3}$.
For $t = 0$, it is the map proposed originally by Choi,
and for $t = 1$ it is a completely positive map.
See the paper by
K.-C.\,Ha and S.-H.\,Kye \cite{ha2011entanglement} for more details.
The family of matrices $x_{t}$ such that
$S_{x_{t}} = \Phi[a(t), b(t), c(t)]$ is given by
\begin{equation}
    x_{t} = \begin{pmatrix}
        - \frac{1}{2} & 0 & 0 & 0 & 0 & 0 & 0 & 0 \\
        0 & - \frac{1}{2} & 0 & 0 & 0 & 0 & 0 & 0 \\
        0 & 0 & \frac{1 - 4t + t^{2}}{4(1 - t + t^{2})} & 0 & 0 & 0 & 0 & - \frac{\sqrt{3}(1 - 4t + t^{2})}{4(1 - t + t^{2})} \\
        0 & 0 & 0 & - \frac{1}{2} & 0 & 0 & 0 & 0 \\
        0 & 0 & 0 & 0 & - \frac{1}{2} & 0 & 0 & 0 \\
        0 & 0 & 0 & 0 & 0 & - \frac{1}{2} & 0 & 0 \\
        0 & 0 & 0 & 0 & 0 & 0 & - \frac{1}{2} & 0 \\
        0 & 0 & \frac{\sqrt{3}(1 - 4t + t^{2})}{4(1 - t + t^{2})} & 0 & 0 & 0 & 0 & \frac{1 - 4t + t^{2}}{4(1 - t + t^{2})} \\
    \end{pmatrix}.
\end{equation}
It is worth noting that each
$x_{t} = \frac{1}{2} R_{t}$, where $R_{t} \in \text{O}(8)$,
as in Proposition \ref{prop:oneHalfofOrthogonal}.

Lastly, there are maps represented by elements of $Q_{0}(P_{8})$,
one example of which was proposed in \cite{miller2015stable}:
\begin{equation}
\label{eq:DefinitionOfS}
S_{0}(X) \:=\: \begin{pmatrix}
        \frac{1}{2}(x_{11} + x_{22}) & 0 & \frac{1}{\sqrt{2}} x_{13} \\
        0 & \frac{1}{2}(x_{11} + x_{22}) & \frac{1}{\sqrt{2}} x_{32} \\
        \frac{1}{\sqrt{2}} x_{31} & \frac{1}{\sqrt{2}} x_{23} & x_{33}
        \end{pmatrix}.
\end{equation}
The matrix $x \in \Lambda$ such that $S_{x} = S_{0}$ is given by
a diagonal matrix
\begin{equation}
 x =
\text{diag}(0,0,0,
\frac{1}{\sqrt{2}}, \frac{1}{\sqrt{2}}, \frac{1}{\sqrt{2}}, \frac{-1}{\sqrt{2}},
1).
\end{equation}

We say that two elements $x, y \in \Lambda$
are equivalent if, and only if, there are $g_{1}, g_{2} \in G_{3}$
such that $x = g_{1} y g_{2}$.
Then the task of finding elements in $\text{Ext}_{0}(\Lambda)$,
up to this equivalence relation,
consists of:
\begin{enumerate}
\item finding all $R \in \mathrm{O}(8)$ such that
    $\frac{1}{2}R \in \text{Ext}_{0}(\Lambda)$;
\item determining which elements $x \in \Lambda$,
    such that $\frac{1}{2} < ||x|| < 1$, belong to $\text{Ext}_{0}(\Lambda)$;
\item finding all $y$, such that
    $y P_{8} = P_{8} y = \hat{0}$, $||y|| < 1$,
    and $P_{8} + y \in \text{Ext}_0(\Lambda)$.
\end{enumerate}

In the future,
we hope that the methods proposed,
together with some other, mostly geometric techniques,
will allow to bring the research closer to the final classification
of extremal positive maps on matrix algebras.

% \paragraph{Acknowledgements.}
% The authors would like to express their gratitude to...

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

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

\end{document}


\selectlanguage{british}%

\chapter{Epilogue}

\section{Implications}

In this section, non-contextuality (see \prettyref{sec:Peres-Mermin-Revisited})
will be assumed and notation will be borrowed from \prettyref{sec:Multiplicativity}.
We will use our understanding from multiplicativity, to investigate
it's relationship between entanglement, locality and superposition.

\subsection{Superposition}

It is known that for simultaneous eigenstates of $\hat{B}_{i}$, multiplicativity
must hold. Consequently, any violation of multiplicativity must arise
from states that are superpositions (of the simultaneous eigenkets).
Note however, that entanglement is not necessary to show a violation,
since the PM test is a state independent test, where a separable state
can be used to arrive at a contradiction.

\subsection{Non Locality and Entanglement}

It is known from \prettyref{sec:Bell's-Theorem} that $\left\langle \hat{B}\right\rangle \le2$,
where $\hat{B}$ is the Bell operator as defined there. If we assume
(1), (2) and (3), as given in \prettyref{sec:Peres-Mermin-Revisited},
then also it can be proven that $\left\langle \hat{B}\right\rangle \le2$.
To see this, consider $\hat{B}_{1}=\hat{a}_{1}\otimes\hat{\mathbb{I}}$
and $\hat{B}_{2}=\hat{\mathbb{I}}\otimes\hat{b}_{1}$, so that $[\hat{B}_{1},\hat{B}_{2}]=0$
and $\hat{C}\equiv\hat{B}_{1}\hat{B}_{2}$. From multiplicativity,
it follows that $m_{1}(\hat{C})=m_{1}(\hat{B}_{1})m_{1}(\hat{B}_{2})$.
This entails that $m(\hat{a}_{1}\otimes\hat{b}_{1})=m(\hat{a}_{1}\otimes\hat{\mathbb{I}})m(\hat{\mathbb{I}}\otimes\hat{b}_{1})$,
where the subscript has been suppressed for brevity. Note that $m(\hat{*})$,
will depend on the state $\left|\psi\right\rangle $ and the hidden
variables. Therefore, averaging multiple measurements, corresponds
to averaging over the hidden variables. This is expressed by $\left\langle m(\hat{a}_{1}\otimes\hat{b}_{1})\right\rangle =\left\langle m(\hat{a}_{1}\otimes\hat{\mathbb{I}})\right\rangle \left\langle m(\hat{\mathbb{I}}\otimes\hat{b}_{1})\right\rangle $.
One can repeat this argument for each term in $\left\langle \hat{B}\right\rangle $.
Using the fact that $-1\le m(\hat{*})\le1$, and that the extrema
will occur only at the extreme values of $m$, one can plugin $\pm1$
for each $\left\langle m(\hat{*})\right\rangle $ to obtain $\left\langle \hat{B}\right\rangle \le2$.
We can therefore conclude that a violation of Bell's inequality, entails
that atleast one of the three assumptions is wrong.

One can infact try to show how a consistent (with QM) non-multiplicative
theory, must be non-local. Formally it is clear, since a violation
of Bell's inequality implies non-locality. Consequently, any consistent
completion of QM, will be non-local. More insight can be gained, although
some care is needed. The notion of compatible observables is that
commuting observables don't disturb each other and can be simultaneously
known. While the statement is not precisely stated, we only need to
note that $m_{k_{1}}(\hat{C})=m_{k_{2}}(\hat{B}_{1})m_{k_{3}}(\hat{B}_{2})$,
for $(k_{1},k_{2},k_{3})\in\{(1,2,3),(2,1,3),\dots\}$. In words,
this means that to measure $\hat{C}$, one can instead first measure
$\hat{B}_{1}$ and then measure $\hat{B}_{2}$. A multiplication of
the values obtained, can be taken to be the value a measurement of
$\hat{C}$ yields. This can be verified by measuring $\hat{C}$ subsequently.
The Bell scenario offers an interesting freedom, by restricting the
form of $\hat{B}_{i}$. To evaluate $\left\langle \hat{B}\right\rangle $,
one is required to evaluate $\left\langle \hat{B}_{1}\hat{B}_{2}\right\rangle $.
From the compatibility argument, we need to find the average value
of $m_{3}(\hat{B}_{1}\hat{B}_{2})=m_{1}(\hat{B}_{1})m_{2}(\hat{B}_{2})$,
viz. $\left\langle m_{3}(\hat{a}_{1}\otimes\hat{b}_{1})\right\rangle =\left\langle m_{1}(\hat{a}_{1}\otimes\hat{\mathbb{I}})\right\rangle \left\langle m_{2}(\hat{\mathbb{I}}\otimes\hat{b}_{1})\right\rangle $.
So far, the statements were general. Now we assume that our theory
is non-multiplicative (and non-contextual). A consistent theory (with
QM), using these assumptions, can and must violate $\left\langle \hat{B}\right\rangle \le2$.
However, if the particles are taken far away, then the only way the
theory can be non-multiplicative ($m_{1}(\hat{B}_{1})\neq m_{2}(\hat{B}_{1})$
for example), is if the theory is non-local. Locality will entail
that $m_{1}(\hat{B}_{1})=m_{2}(\hat{B}_{1})$ for instance, since
the information about which observable was measured first, can't be
propagated instantaneously. We see therefore that non-locality arises
quite naturally in consistent non-multiplicative theories.

As a remark, it maybe added that in case of the Bell Test, entanglement
is needed to show one of the three assumptions is wrong. This is so
because it can be shown that entanglement is necessary to arrive at
a violation of the inequality.

\section{Summary of Results}

Progress was made roughly in three categories, as listed.
\begin{figure}
\begin{centering}
\includegraphics[width=0.75\columnwidth]{Chapter5/Figs/Vector/flow}
\par\end{centering}

\caption{Overview of work done during the semesters. The bold faced titles
represent new results.}
\end{figure}

\begin{itemize}
\item Bohmian Mechanics

\begin{itemize}
\item Generalized the Hamiltonian based measurement scheme to continuous
variables (see \prettyref{sub:BM-measurement-to-continuous})
\item Analytic/graphical proof of consistency check using position measurements
(see \prettyref{sub:BM-Consistency-check-measurement})
\item Analytic/graphical solution to measuring entangled spins using SG
\& using the Hamiltonian scheme (see \prettyref{sub:BM-entangled-Stern-Gerlach},
\prettyref{sub:BM-Hamiltonian-Approach-Spins})
\item Alternative proof of spins can't be associated with particles, and
must only be a property of the wavefunction (see \prettyref{sub:BM-Hamiltonian-Approach-Spins})
\item BM simulator with many trajectories (one particle, one dimensional,
arbitrary potential, see \prettyref{sec:BM-Simulator})
\end{itemize}
\item Tests of Determinism and Contextuality

\begin{itemize}
\item Optimized the phase space GHZ test (see \prettyref{sub:Optimized-Extension})
\item GHZ $\to$ a test of contextuality (see \prettyref{sub:GHZ-to-contextuality})
\item PM extension to phase space (independently re-discovered, see \prettyref{sub:Peres-Mermin-phaseSpace})
\end{itemize}
\item The Contextuality situation

\begin{itemize}
\item BM was shown consistent with PM \& restricted BM was argued to be
non-contextual (see \prettyref{sub:BM-consistent-PM})
\item `Multiplicativity' and `Sequential Multiplicativity' identified, defined
and proven where they hold (see \prettyref{sec:Multiplicativity})
\item Demonstrated `non-multiplicativity' as an alternative to contextuality,
by constructing a toy model (see \prettyref{sub:Non-Contextual-Toy-Model})
\item Proposed the `discretely c-ingle' HV theory to non-contextually explain
spins (see \prettyref{sub:Discretely-C-ingle-Theory})
\end{itemize}
\end{itemize}

\section{Conclusion}

We have shown, that atleast from the Peres Mermin's proof, it doesn't
follow that contextuality is a necessary feature of QM. We have identified
a new property, which we call non-multiplicativity. We have been able
to construct a non-contextual hidden variable theory, that is completely
consistent with QM of spins and it's predictions, we call a discretely
c-ingle theory. This theory is non-multiplicative.

We also noted that upon restriction of measurement schemes, Bohmian
Mechanics (BM) can also be viewed as a non-contextual hidden variable
theory, which is non-multiplicative.

\section{Digressions}

As would've been evident so far, the developments made to address
the main problem itself have not always been in the correct direction.
In addition, certain small digressions were made, some of which have
been listed for completeness.

\subsection{Cryptography using contextuality}

Interesting collaborative progress was made in developing certain
cryptography protocols using contextuality, with Jaskaran and Kishor,
who primarily constructed the schemes. A well known idea is to use
entanglement to facilitate secure sharing of keys, where the security
assurance comes from the monogomy of Bell's inequality violations.
An analogue of this idea was used, where the contextuality inequalities
are used in place of Bell's and it was found that the said method
is encouragingly secure and less resource hungry.

\subsection{Attempt at superluminal communication with BM}

Imagine there are two particles, one with person A, and the other
with person B. Now both measure the position of their particles. Thus
the positions are precisely known. Next, they allow their particles
to evolve under a Hamiltonian (interaction) such that they become
entangled. Suppose at time $t$, the particles are entangled. Now
from the de-Broglie theory, both can predict the locations of their
particles at $t$. Now comes the interesting part. The protocol they
follow, is as follows. Say A uses this setup, only to receive signals.
If B wants to send a signal to A, all that he needs to do, is to disturb
his particle at $t$. This would cause some change in, either the
wavefunction or the position, or both, of the particle, compared to
if B had not caused any disturbance. Now A measures her particle's
position at $t+\epsilon$ and gets the value $q_{A}$. She knows what
position her particle should've been at, if B didn't do anything,
call this position $q_{A}^{(0)}$. If now $q_{A}\neq q_{A}^{(0)}$,
then she knows B sent a signal. If $q_{A}=q_{A}^{(0)}$, then she
knows nothing was sent. Since the equations are non-local, this interaction
is instantaneous, and in principle faster than speed of light.\\
Ofcourse, one can fill in the details, which is what I almost started
doing, but finding the fault in the argument is what was pivotal.
It turns out, the fault was rather straight forward, although a little
subtle. The idea is that regardless of how precise the position measurement
is, its uncertainty will spread with the wavefunction, thereby rendering
any prediction useless. Thus, in this light, chaos restores locality.
This is actually not too hard to see. Imagine you have an uncertainty
$\delta q$, when you measured the position and got the value $q$.
Now we can imagine a gaussian associated with this, as the wavefunction,
after collapse. Since the de-Broglie Bohm theory ensures that the
probability distribution $\left|\psi\right|^{2}$ is preserved by
the dynamics of the particles, as $\psi$ evolves, $\delta q$ will
increase (in case of free evolution), effectively destroying `position
information'. The idea can only be harnessed, if one can somehow decouple
the uncertainty in $q$ from the wavefunction.

\subsection{Identical Particles, an alternate approach}

One difficulty faced when we construct a statistical description of
classical particles, is the Gibbs Paradox. At its heart, is the idea
that one can always distinguish particles, on the basis of their paths.
In QM, identical particles are handled quite elegantly, by (anti-)symmetrization
of the wavefunction. In BM however, the trajectories are again well
known and one might imagine that this signals failure of BM. It so
turns out, that upon appropriately constructing the trajectory space,
invariant under permutations of particles, one is able to stay consistent
with QM and infact, able to gain further insights.

We realized however, that since QM describes reality, only through
a combination of operators and the state, and that one can take the
view that it is the observer that is incapable of distinguishing which
particle is being looked at, therefore one can imagine that (anti-)symmetrizing
operators should yield effectively the same results as (anti-)symmetrizing
the wavefunctions.

As an illustration, consider the state $\left|\psi\right\rangle =\left|01\right\rangle $.
If this state represented bosons, then we'd have to write according
to the usual methods of QM, $\sqrt{2}\left|\psi_{\text{I}}\right\rangle =\left|01\right\rangle +\left|10\right\rangle $.
Now if we measure say $\hat{\sigma}_{z}\otimes\hat{\mathbb{I}}$,
on $\left|\psi\right\rangle $, we'd obtain $+1$, while the same
measurement on $\left|\psi_{\text{I}}\right\rangle $ would yield
$0$ (on an average, in this case). However, if we instead symmetrize
the operator as $\left(\sigma_{z}\otimes\mathbb{I}+\mathbb{I}\otimes\sigma_{z}\right)/2$,
then even if we measure $\left|\psi\right\rangle $, then on average.
We'd get $0$ upon measuring $\left|\psi_{\text{I }}\right\rangle $
also, as is expected.

I was told by Prof. Mukunda that this has been discussed earlier by
Messiah and Greenberg \cite{symmetrizationIdentical}, in the context
of particle physics. However when considered in view of the Bohmian
formalism, it might yield an interesting alternative to the problem
of identical particles.

\begin{comment}

\section{First Section of the Third Chapter}

And now I begin my third chapter here . . . And now to cite some more
people \cite{prime-number-theorem,texbook,SFPT,latex}

\subsection{First Subsection in the First Section . . .}

and some more

\subsection{Second Subsection in the First Section . . . }

and some more . . .

\subsubsection{First subsub section in the second subsection . . . }

and some more in the first subsub section otherwise it all looks the
same doesn\textquoteright t it? well we can add some text to it .
. .

\subsection{Third Subsection in the First Section . . . }

and some more text . . .

\subsubsection{First subsub section in the third subsection . . . }

and some more in the first subsub section otherwise it all looks the
same doesn\textquoteright t it? well we can add some text to it and
some more and some more and some more and some more

\section{Second section with a Table}

Oh I have a table, which I can to refer (See \ref{tab:My-first-table}).

\begin{table}[H]
\hfill{}%
\begin{tabular}{|c|c|c|}
\hline
\textbf{1} & \textbf{2} & \textbf{3}\tabularnewline
\hline
\hline
4 & 5 & 6\tabularnewline
\hline
7 & 8 & 9\tabularnewline
\hline
\end{tabular}\hfill{}

\caption{\label{tab:My-first-table}My first table (I know, it is a really
intuitive name) }
\end{table}
\end{comment}
\selectlanguage{english}%


\section{Experiments}

\subsection{Data}
\label{sec:data}

We briefly introduce our synthetic shape completion benchmarks, derived from ShapeNet \citep{Chang2015ARXIV} and ModelNet \citep{Wu2015CVPR} (\cf \figref{fig:data-shapenet-modelnet}), and our data preparation for KITTI \citep{Geiger2012CVPR} and \Kinect \citep{Yang2018ARXIVb} (\cf \figref{fig:data-kitti-yang}); \tabref{tab:data} summarizes key statistics \red{including the level of supervision computed as the fraction of observed voxels, \ie $\nicefrac{|\{x_{n,i} \neq \uk\}|}{HWD}$, averaged over observations $x_n$.}

\boldparagraph{ShapeNet}
%
We utilize the truncated SDF (TSDF) fusion approach of \cite{Riegler2017THREEDV} to obtain watertight versions of the provided car shapes allowing to reliably and efficiently compute occupancy grids and SDFs. Specifically, we use $100$ depth maps of $640 \ntimes 640$ pixels resolution, distributed uniformly on the sphere around the shape, and perform TSDF fusion at a resolution of $256^3$ voxels. Detailed watertight meshes, without inner structures, can then be extracted using marching cubes \citep{Lorensen1987SIGGRAPH} and simplified to $5\text{k}$ faces using MeshLab's quadratic simplification algorithm \citep{Cignoni2008EICC}, see \figref{fig:data-shapenet-modelnet-a} to \subref{fig:data-shapenet-modelnet-c}. Finally, we manually selected $220$ shapes from this collection, removing exotic cars, unwanted configurations, or shapes with large holes (\eg, missing floors or open windows).

The shapes are splitted into $|\mathcal{Y}| = 100$ reference shapes, $|\mathcal{Y}^*| = 100$ shapes for training the inference model, and $20$ test shapes. We randomly perturb rotation and scaling to obtain $5$ variants of each shape, voxelize them using triangle-voxel intersections and subsequently ``fill'' the obtained volumes using a connected components algorithm \citep{Jones2001}. For computing SDFs we use SDFGen\footnote{\url{https://github.com/christopherbatty/SDFGen}.}. We use three different resolutions: $H \ntimes W \ntimes D = 24 \ntimes 54 \ntimes 24$, $32 \ntimes 72 \ntimes 32$ and $48 \ntimes 108 \ntimes 48$ voxels. Examples are shown in \figref{fig:data-shapenet-modelnet-d} to \subref{fig:data-shapenet-modelnet-f}.

Finally, we use the OpenGL renderer of \cite{Guney2015CVPR} to obtain $10$ depth maps per shape. The incomplete observations $\mathcal{X}$ are obtained by re-projecting them into 3D and marking voxels with at least one point as occupied and voxels between occupied voxels and the camera center as free space. We obtain more dense point clouds at $48 \ntimes 64$ pixels resolution and sparser point clouds using depth maps of $24 \ntimes 32$ pixels resolution. For the latter, more challenging case we also add exponentially distributed noise (with rate parameter $70$) to the depth values, or randomly (with probability $0.075$) set them to the maximum depth to simulate the deficiencies of point clouds captured with real sensors, \eg, on KITTI. These two variants are denoted {\bf\clean} and {\bf\noisy}.
The obtained observations are illustrated in \figref{fig:data-shapenet-modelnet-e}.

\input{fig_data_real}

\boldparagraph{KITTI}
%
We extract observations from KITTI's Velodyne point clouds using the provided ground truth 3D bounding boxes to avoid the inaccuracies of 3D object detectors (train/test split by \cite{Chen2016ARXIV}). As the 3D bounding boxes in KITTI fit very tightly, we first padded them by factor $0.25$ on all sides; afterwards, the observed points are voxelized into voxel grids of size $H \ntimes W \ntimes D = 24 \ntimes 54 \ntimes 24$, $32 \ntimes 72 \ntimes 32$ and $48 \ntimes 108 \ntimes 48$ voxels. To avoid taking points from the street, nearby walls, vegetation or other objects into account, we only consider those points lying within the original (\ie, not padded) bounding box. Finally, free space is computed using ray tracing as described above. We filter all observations to ensure that each observation contains a minimum of $50$ observations. For the bounding boxes in the test set, we additionally generated partial ground truth by accumulating the 3D point clouds of $10$ future and $10$ past frames around each observation. Examples are shown in \figref{fig:data-kitti-yang}.

\boldparagraph{ModelNet}
%
We use ModelNet10, comprising $10$ popular object categories (bathtub, bed, chair, desk, dresser, monitor, night stand, table, toilet) and select, for each category, the first $200$ and $20$ shapes from the provided training and test sets. Then, we follow the pipeline outlined in \figref{fig:data-shapenet-modelnet}, as on ShapeNet, using $10$ random variants per shape. Due to thin structures, however, SDF computation does not work well (especially for low resolution, \eg, $32^3$ voxels). Therefore, we approximate the SDFs using a 3D distance transform on the occupancy grids. Our experiments are conducted at a resolution of $H \ntimes W \ntimes D = 32^3$, $48^3$ and $64^3$ voxels. Given the increased difficulty, we use a resolution of $64^2$, $96^2$ and $128^2$ pixels for the observation generating depth maps. In our experiments, we consider bathtubs, chairs, desks and tables individually, as well as all $10$ categories together (resulting in $100\text{k}$ views overall). For \Kinect, we additionally used a dataset of rotated chairs and tables aligned with \Kinect's ground plane.

\input{tab_data}

\boldparagraph{\Kinect}
%
Yang \etal provide Kinect scans of various chairs and tables. They provide both single-view observations as well as ground truth from ElasticFusion \citep{Whelan2015RSS} as occupancy grids. However, the ground truth is not fully accurate, and only $40$ views are provided per object category. Still, the objects have been segmented to remove clutter and are appropriate for experiments in conjunction with ModelNet10. Unfortunately, Yang \etal do not provide SDFs; again, we use 3D distance transforms as approximation. Additionally, the observations do not indicate free space and we were required to guess an appropriate ground plane. For our experiments, we use $30$ views for training and $10$ views for testing, see \figref{fig:data-kitti-yang} for examples.


\documentclass[a4paper]{article}

\usepackage{fullpage} % Package to use full page
\usepackage{parskip} % Package to tweak paragraph skipping
\usepackage{tikz} % Package for drawing
\usepackage{amsmath}
\usepackage[colorlinks=true, allcolors=blue]{hyperref}
\usepackage{enumitem}
\usepackage{graphicx}
\usepackage{tabularx}
\usepackage{float}
\usepackage{amssymb}
\usepackage[usestackEOL]{stackengine}
\usepackage[a4paper,top=0.54cm,bottom=2.54cm,left=2.54cm,right=2.54cm,marginparwidth=1.75cm]{geometry}
\usepackage{indentfirst}

% \renewcommand{\abstractname}{Aim}
\setlength{\parindent}{3ex}
\title{\Large{Pre-Processing}}
\author{Saumil Sachdeva}
\date{\today}
\stackMath
\begin{document}

\maketitle

\section{Approach}
In any image processing or computer vision application, the pre-processing of the image frame is the starting point and the initial step for the rest of the process. In this stage, the input is a Truecolor image (RGB) and the output is an intensity image with the focus on alteration of the input image to prepare the image for further operations on it. The pre-processing stage is equivalent to laying the groundwork for further operations on the image. This involves operations for enhancement of certain features, removing noise and distortions, and geometric transformations in an image.\cite{Sonka1993}
\par
For this project, the pre-processing stage readies the image frame for ball-detection and ball-tracking stages. The main motivation for this stage is to extract a foreground in the image frame by subtracting the background in the image. In fact, the two terms, Foreground extraction and Background subtraction go hand in hand as they perform the same task which is the separation of regions of interest in an image frame from the other insignificant details in a frame. \par
The steps undertaken in this stage can be observed in \autoref{fig:fe}
\begin{figure}[H]
\centering
\includegraphics[width=0.7\textwidth]{Foreground_Extraction.png}
\caption{\label{fig:fe}Steps undertaken for extracting the foreground}
\end{figure}
First off, the colored RGB image frames are converted to their Grayscale equivalent to visualize the motion more precisely, followed by filtering of the image frames to reduce noise. The frames are then combined using frame differencing and Boolean operations to a single image which captures the complete motion in an image frame while muting the background. This combined image is thresholded to form a binary image which helps to focus on objects that are of interest. The process is continued by performing certain morphological operations- dilation and erosion that focuses on the shapes in the image by alleviating discontinuity and enhancing the objects in the image. The pre-preocessing stage is concluded by performing a final blurring operation to smoothen the shapes of the objects in the image frame.\par
\newpage

\section{Dataset}

\newpage

\section{Foreground Extraction}
Foreground extraction is the process of separating moving objects in a frame from the static background objects that remain unchanged in every frame. The moving objects are the main focus of tracking algorithms in sports, whether it be tracking a moving player or tracking a high-speed ball or both. Foreground Extraction(or Background Subtraction) is the first step to achieve that goal. \par
As discussed in the literature, there exists two common ways to perform foreground extraction. A difference in consecutive video frames can be taken to identify objects in motion as the value of those pixels will change in the corresponding frame implying motion in those pixels. This is generally performed first by converting the frames to a Grayscale representation and is also followed by Boolean operations to extract the moving parts of the required frame from its previous or next frame.\par
Another method is to first build a background model of the scene in the video, either by recording a video for a small duration of time of a still and empty court or by providing the system with a pre-built background model. By subtracting this background model from a video frame, moving objects can be separated in the frame. Although, the frame-differencing approach is faster, the second approach of creating a background model tends to be more robust towards noise. \par

\subsection{Conversion to Grayscale}
The frame differencing step is performed after first converting the frames from RGB color space to a Grayscale representation. This is performed using \autoref{eq:grayscale} as defined by the standard set by the International Telecommunication Union, in their recommendation BT.601 (CCIR 601).\par
\begin{equation} \label{eq:grayscale}
    Y = 0.299 R + 0.587 G + 0.114 B
\end{equation}
where, R G \& B represent the color planes of the colors Red, Green and Blue.\par
This conversion is done mainly due to two main reasons. One, the luminance component in an image captures more information as compared to  the chrominance component and is important to distinguish the various visual features in an image. As in human vision, computer vision looks for features in an image based on contrasting patterns in the image pixels as compared to texture and color information. \par
Second, by converting the image frame to a Grayscale representation, the complexity of further operations gets reduced significantly. A RGB image is composed of three separate 8-bit channels representing the three color planes, but a Grayscale image is an 8 bit image with every pixel a shade of gray with values ranging from 0 to 255. This conversion simplifies the process and reduces computational requirements.\cite{kanan2012color}  \par
Moreover, as the property of color is not needed to capture the movement, conversion to Grayscale doesn't affect the detection process.
\subsection{Gaussian Filtering}
Following the conversion to Grayscale representation, the three frames are filtered to remove noise by using a Gaussian filter with a 7x7 kernel size.
A gaussian filter is a weighted average filter with a large weight at the center compared to smaller weights at the boundary of the kernel. The Gaussian filter is formulated as
\begin{equation} \label{eq:Gaussian}
    G(x,y) = \frac{1}{{2\pi \sigma^2}}e^{{{ - \left( {x^2 + y^2 } \right)} \mathord{\left/ {\vphantom {{ - \left( {x - \mu } \right)^2 } {2\sigma ^2 }}} \right. \kern-\nulldelimiterspace} {2\sigma ^2 }}}
\end{equation}
where x and y are the distances of the pixel coordinate from the origin and $\sigma$ is the standard deviation. \par
The standard deviation is represented as inter-pixel space and has an effect on the weight of the elements in the Gaussian kernel. For instance, a large standard deviation corresponds to a greater weight of the boundary elements signifying the  effect of the far-off pixels on the average. This leads to loss of detail in the image along with the noise. A smaller $\sigma$ on the other hand won't have much of an effect as the weights of the pixels off the center will be small. The standard deviation has been calculated using the kernel size with the formula,
\begin{equation} \label{eq:sigma}
    \sigma = 0.3*((ksize-1)*0.5 - 1) + 0.8
\end{equation}
This means for the kernel-size of 7, the $\sigma$ corresponds to a value of 1.4 pixels.\par

The size of the kernel pre-dominantly depends on the size of the objects in the image frames. This means, that the kernel size in a filter varies with every image processing/computer vision application.
A large sized kernel can be in-efficient in removing small salt \& pepper noise whereas a very-small sized kernel might filter out the ball candidate from the frame due to the small size of the squash ball. For this application, a kernel-size of 7x7 strikes the perfect balance to filter out the unnecessary noise in the image frame while maintaining suitable detail in the image to capture the motion.\par

The implementation of the Gaussian Filter used in this project is of that in the Open Source Computer Vision library. The Gaussian filter coefficients are computed using the formula,
\begin{equation}
    G_i= \alpha *e^{-(i-( \texttt{ksize} -1)/2)^2/(2* \texttt{sigma} )^2}
\end{equation}
where, $ i=0..\texttt{ksize}-1$ and $\alpha$ is a scale factor chosen such that $ \sum_i G_i=1.$
For a $ksize=7$ and calculating $\sigma$ from \autoref{eq:sigma}, the Gaussian filter coefficients are obtained as \[([0.03125 ],
       [0.109375],
       [0.21875 ],
       [0.28125 ],
       [0.21875 ],
       [0.109375],
       [0.03125 ])\]
It can be observed that these are coefficients for a 1-D filter, to obtain the coefficients for a 2-D Gaussian filter for the same dimensions in x and y directions, the coefficient matrix has to be transposed and multiplied to obtain a 7x7 matrix of Gaussian filter coefficients. This results in the filter coefficient matrix,

\begin{table}[H] \label{tab:coeff}
\resizebox{\textwidth}{!}{%
\begin{tabular}{|l|l|l|l|l|l|l|}
\hline
% C1	&C2	&C3	&C4	&C5	&C6	&C7 \\ \hline
0.0009765625	&0.00341796875	&0.0068359375	&0.0087890625	&0.0068359375	&0.00341796875	&0.0009765625     \\ \hline
0.00341796875	&0.011962890625	&0.02392578125	&0.03076171875	&0.02392578125	&0.011962890625	&0.00341796875 \\ \hline
0.0068359375	&0.02392578125	&0.0478515625	&0.0615234375	&0.0478515625	&0.02392578125	&0.0068359375 \\ \hline
0.0087890625	&0.03076171875	&0.0615234375	&0.0791015625	&0.0615234375	&0.03076171875	&0.0087890625     \\ \hline
	0.0068359375	&0.02392578125	&0.0478515625	&0.0615234375	&0.0478515625	&0.02392578125	&0.0068359375 \\ \hline
	0.00341796875	&0.011962890625	&0.02392578125	&0.03076171875	&0.02392578125	&0.011962890625	&0.00341796875 \\ \hline
	0.0009765625	&0.00341796875	&0.0068359375	&0.0087890625	&0.0068359375	&0.00341796875	&0.0009765625 \\ \hline
\end{tabular}%
}
\caption{7x7 Gaussian Filter Coefficients}
\end{table}

An important property used for optimisation is that of separable convolution. As observed above, the 2D Convolution matrix can be separated into two 1D matrices. Since convolution is associative, instead of performing a convolution of the image with the 2D matrix, two separate convolutions can be performed with the 1D matrices in the horizontal and vertical dimensions i.e. the image can be convolved first with the 1D matrix in the horizontal dimension and then can be convolved with the 1D matrix in the vertical direction. Convolution is much faster with single dimension matrices and the results obtained are same as by a convolution with a 2D matrix. %Equation daale kya?
%https://blogs.mathworks.com/steve/2006/10/04/separable-convolution/

% C1	C2	C3	C4	C5	C6	C7
% 1	0.0009765625	0.00341796875	0.0068359375	0.0087890625	0.0068359375	0.00341796875	0.0009765625
% 2	0.00341796875	0.011962890625	0.02392578125	0.03076171875	0.02392578125	0.011962890625	0.00341796875
% 3	0.0068359375	0.02392578125	0.0478515625	0.0615234375	0.0478515625	0.02392578125	0.0068359375
% 4	0.0087890625	0.03076171875	0.0615234375	0.0791015625	0.0615234375	0.03076171875	0.0087890625
% 5	0.0068359375	0.02392578125	0.0478515625	0.0615234375	0.0478515625	0.02392578125	0.0068359375
% 6	0.00341796875	0.011962890625	0.02392578125	0.03076171875	0.02392578125	0.011962890625	0.00341796875
% 7	0.0009765625	0.00341796875	0.0068359375	0.0087890625	0.0068359375	0.00341796875	0.0009765625

\par
The choice of a Gaussian filter in this application, rather than an averaging filter or a Median filter is motivated by two reasons $-$ performance and efficiency. A Gaussian filter is  a linear filter as compared to the Median filter which is non-linear. This means computation of the new pixel value after convolution with a Gaussian filter is much faster compared to that of a Median Filter.
Another property of the Gaussian filter is that of not preserving any sharp edges in the image. This is especially useful in the scenario of Squash. Squash broadcasts that are used in the project contain a number of Advertisement \& Tournament labelling which if filtered through a Median filter introduces noise due to the sharp edges of those labels. This noise interferes in the Ball Detection stage and makes the detection process more difficult.

\subsection{Frame Differencing}
The method employed to perform foreground extraction in this Thesis work is that of Frame Differencing. Unlike traditional frame-differencing approaches which takes the difference of two consecutive frames, the approach in this project rather utilizes two frame differencing images generated from three consecutive video frames. The reason for such an approach lies in the fact that the game of Squash has many components that can induce noise. A squash broadcast video with all the advertisement \& score labels, glass fibre walls with reflections and transparent front wall with crowd sitting behind them, generates various noisy components that are difficult to differentiate from the interested motion in the frame. \par
By utilizing three consecutive frames, i.e. for every frame in which motion has to be separated, two other frames, one preceding frame and one succeeding frame is taken in the process pipeline. Then, two separate frame-difference images are generated by differencing the current frame with the previous one, and by differencing the next frame with the current frame. This process can be observed in figure...... and can be represented in \autoref{eq:currprev} and \autoref{eq:nextcurr}
\begin{equation} \label{eq:currprev}
    \delta_- = I(t) - I(t-1)
\end{equation}
\begin{equation} \label{eq:nextcurr}
    \delta_+ = I(t+1) - I(t)
\end{equation}
where, $I(t)$ represent an image frame at time t, and $\delta$ represents a frame differential image.
\par
The process of frame-differencing is quite fast in performance and takes very little time in execution which makes it an optimal approach to isolate motion in a frame.
\par

\subsection{Boolean Combination}
The two frame-differential images are combined together with a Boolean AND operation. This step, ensures the absence of any static objects present throughout those three frames while retaining the motion present in the current frame. Thus, the frame-differential image in \autoref{eq:framediff} contains moving objects present only in the frame that is being analyzed.
\par

\begin{equation} \label{eq:framediff}
    \delta = \delta_- \wedge \delta_+
\end{equation}
\newpage

\section{Thresholding}
The frame-differential image is processed further and converted into a binary image by performing a thresholding operation. The conversion from a grayscale image to a binary image is a common step performed in image processing and computer vision applications to detect regions of interest. By converting into a binary image, the processing is simplified as there are either pixels of value '1' which are of interest or of value '0' which are not of any interest in a video frame. \par
There are various thresholding methods commonly utilized in computer vision applications that involve either the user providing the threshold value such as the Simple Thresholding method, or there are methods that derive the optimum threshold value such as the Adaptive Threshold method. The simple thresholding method works for the cases where  the knowledge of a global threshold value is known before-hand. The adaptive threshold method is more applicable to cases where the threshold value is expected to change quite frequently and is never constant such as in images with a lot of varying information (per frame) in it. \par
There is another popular image threshold method, Otsu's Binarization, which has been utilized in this project. Otsu's thresholding method works well for a bimodal image, where there are two peaks of pixel values in the histogram of the image. This means, for images that have a very clear separation between the foreground and the background, the Otsu's method works well. Otsu's thresholding method automatically calculates the optimum threshold value to divide the group of pixels in the image. The way it does that is by finding a threshold value which lies in between the two peaks in the histogram of the image, which minimizes the variance to both groups of pixels being thresholded. It is easy to observe why this method is the ideal choice to perform the thresholding operation, as in each frame there is always a majority of pixels with the value near to '0' that correspond as the background in the frame, and a very few pixels with larger values(grayish-white pixels) that indicate objects with motion in the frame. By separating these two types of pixels, the resulting thresholded image quite clearly shows the moving objects in the frame over a black background. \par
%histogram image
\newpage

\section{Morphological Operations}
The frame difference and thresholding operations result in a binary representation of the video frame which is highly disconnected and infused with noise. This implies the need to perform further image processing operations to further refine the image and remove the noise from the binary image.\par

For this task, morphological operations are performed to improve the
\newpage
\section{Final Touch}
The choice of a median filter is made in accordance with the fact that the median filter uses an existing pixel value from the surrounding pixels as the new pixel value. This is different as compared with an Average filter or a Gaussian filter which can completely change the pixel value to one that doesn't exist in the frame. By using an existing pixel value, there is no loss of information from the frame especially considering the fact that the size of the ball in the frame is too small, while it simultaneously filters out small noise present in the frame, making a median filter as the ideal choice.\par
\newpage
\newpage
\bibliographystyle{ieeetr}
\bibliography{bibliography.bib}
\end{document}


\subsubsection{\stid{3.04} ATDM SNL Math Libraries} \label{subsubsect:trilinos}

\paragraph{Overview}
The major project outcome for the SNL ATM Math Libraries project is to provide re-usable and convenient, math-related tools for component-based software engineering of Exascale apps.

This project develops and integrates scalable, modular, and cross-cutting software infrastructure components for ATDM and other future Exascale applications that utilize, where appropriate, ATDM Core CS components: Kokkos performance portability, Sacado/ROL embedded sensitivity analysis and optimization technology, DARMA asynchronous many-tasking, and DataWarehouse.  These components include:
\begin{enumerate}
\item	KokkosKernels (KK):  performance-portable sparse/dense linear algebra and graph kernels that utilize the hierarchical memory subsystem expected in future architectures;
\item	Scalable Solvers (SS):  optimal linear solver algorithms that exploit fine-grain parallelism for vector/SIMT and thread scaling and leverage next-generation execution and communication capabilities;
\item	Agile Components (AC):  tools for interface abstractions, discretization, time integration, and solution of nonlinear PDEs; and
\item Embedded Analysis (EA):  tools for enabling advanced analysis workflows, focusing on embedded sensitivity analysis and optimization with use of derivatives for uncertainty quantification.
\end{enumerate}

This project combines algorithmic R\&D with delivery of interoperable software components that are expected to be crucial capabilities that will enable Sandia's ATDM application codes to be performance portable across next-generation computing architectures such as GPUs and Xeon Phis.  This work will include integration of these components into the application codes and improving their design and interfaces for mission relevant use cases.

\paragraph{Key  Challenges}
There are several challenges associated with the work this project is conducting. Part of the complexity arises because profiling tools are not yet full mature for advanced architectures and in this context profiling involves the interplay of several factors which require expert judgment to improve performance.  Another challenging aspect is working on milestones that span a variety of projects and code bases. There is a strong dependence on the various application code development teams for our own team's success. In addition, we face a constant tension between the need for production ready tools and components in a realm where the state-of-the-art is still evolving.

\paragraph{Solution Strategy}
To address the challenges above, the SNL ATM Math Libraries project is taking a staged approach to profiling in regards to target architectures and the algorithms involved. We are also coordinating on a regular basis with the other projects that are involved in our work to minimize impediments. In response to the need for production ready tools, we are focusing on a hierarchical approach that involves producing robust, hardened code for core algorithms while simultaneous pursuing research ideas where appropriate.

\paragraph{Recent Progress}
In this section we provide several high-level snapshots of recent progress in the Math Libraries project
\begin{itemize}
\item The EA team has completed the integration of sensitivity analysis and ROL optimization tools with Tempus in support of transient full-space optimization.
\item The KK team completed development of a prototype for unified SIMD types as Kokkos SIMD type
\item The KK team built batched BLAS kernels based on the Kokkos SIMD type to be run on GPUs. On a P100 GPU, the Kokkoskernels triangular solve and dense matrix-matrix multiply provide up to 2x and 170x speedup, respectively, compared to NVIDIA?s cuBLAS.
\item Profiling of the miniEM application in Panzer by the SS team, using a mesh provided by EMPIRE developers, has identified memory growth in problems during setup which has led to a reduced memory footprint.
\item Initial results, gathered by the SS team, for performance of Tpetra stack (Belos,MueLu,Ifpack2) have been gathered for the solve phase on GPUs. This resulted in the identification of performance bottlenecks that either are in the process of or have been resolved.
\item The AC team completed construction and testing of the operator-split stepper in Tempus. This is required for time integrating the PIC and E-field solves.
\item The AC team implemented and verified a variable time-stepping algorithm (Denner, 2014) within Tempus for use with the BDF2 time-integration scheme and other Tempus schemes.
\end{itemize}

\paragraph{Next Steps}
The following list details the next steps being taking by each component of the ATDM SNL Math Libraries project:

\begin{itemize}
\item The SS team is investigating, in collaboration with the University of Wyoming, the use of Multilevel solvers, which will eventually get integrated into SPARC via MueLu.
\item The KK team will continue to work on Integration of Kokkoskernels into IFPACK2 line preconditioners as well as testing on Volta GPUs.
\item The AC team will be focusing on the integration of Tempus into EMPIRE-PIC.
\item The EA team will extend the work that was done for adjoint sensitivities to transient, full-space optimization.

\end{itemize}


The ValueFlow aspect is used in all four modeling activities, designs (Component Assemblies), Components, Design Space models (DesignContainers), and Test Benches. This aspect is used to express the static properties of a component or an assembly of components, and the relationships and dependencies between those values. By static, we mean that these values are set at design time, and do not change while the system is functioning. For example, the weight and length of an engine component are captured within the ValueFlow aspect. The ValueFlow aspect also captures the formulas needed to describe parametric components. For example, a driveshaft component design with parametric length will include a formula to describe its weight as a function of material density, diameter, and length. Formulas are evaluated at by an interpreter.

\subsubsection{Primary Concepts / Example}
Properties are represented by various types of value flow objects in the model. Value flow objects can be connected to each other representing assignment of the objects's numerical value from a source value flow object to a destination object. They also serve as inputs and outputs to formula objects via connections.

There are three main classes of value flow objects: Property, Parameter, and Metric. Since the three represent measurement of some physical quantity, they have a common attribute called Value that represents the current numerical value in addition to referencing a unit of measurement object in the model. Units of measurement are defined in a seperate aspect and will not be discussed here.

\begin{figure}
\centering
\includegraphics[scale=0.40]{Figures/cadParameter_VF.png}
\caption{Hull and Chassis Model.}
\label{fig:cadParameterVF}
\end{figure}
A Parameter object represents a static property of an object that can be tuned by a system designer at design-time. CADParameter is a specialization of Parameter. When a CAD model is built, the value of this object is used to set a specific parameter in the component's CAD representation. This is useful with parametrically-sizeable components, where the size of a component (or a feature of a component) depends on the size of another component that it is composed with. Figure \ref{fig:cadParameterVF} shows the Hull and Chassis portion of the IFV design space model. The VU\_Chassis\_8x8 component's TurretSectionLength and EngineSectionLength CADParameter objects get their Value attribute populated by VU\_Turret\_Section\_Alum\_BAL-7P's Depth Property object and VU\_Engine\_Section\_Alum\_BAL-7P's ChassisDepthMount Property object respectively.

\begin{figure}
\centering
\includegraphics[scale=0.40]{Figures/Property_VF.png}
\caption{Drivetrain Design Space Model.}
\label{fig:propertyVF}
\end{figure}
A Property object represents a static property of an object or assembly. Properties of components cannot directly be changed at design time during design space model construction. Examples of Property are the weight of a damper and max power of a transfer case. Properties can be calculated from Parameters and other Properties using formula objects. Figure \ref{fig:propertyVF} shows the IFV\_Drivetrain design space model. In the figure, the Drivetrain\_Weight Property object is the sum of the Weight Property objects of Driveline and PowerPlant\_and\_Transmission. CADProperty is a specialization of Property. In practice, the value of a CADProperty must be calculated within a CAD tool, after which the result can be written back to the model. Examples of CADProperty in the current IFV model is the center of gravity and density of a Driver Hatch.

\begin{figure}[t]
\centering
\includegraphics[scale=0.40]{Figures/Metric_VF.png}
\caption{Weight TestBench Model.}
\label{fig:metricVF}
\end{figure}
A Metric object is only used in test benches, test environments for testing composed systems, to capture outputs of running a test. A test bench is typically run on multiple designs of a system with the resulting metrics sometimes visualized in a GUI tool called Dashboard and compared across the designs. Figure \ref{fig:metricVF} shows the Weight TestBench model whose sole purpose is used for calculating the metric Weight and FuelCapacity of different IFV designs given an initial set of tunable input Parameter objects like HullSideThickness, ChassisThickness, etc.

\subsubsection{Using Formulas}
Formulas define relationship of connected value flow objects. There are two types of formulas in the CyPhy model used for describing calculation of property, parameter and metric quantities in the model. SimpleFormula are used for addition, multiplication, minimum, maximum, and geometric and arithmetic means. CustomFormula is a user defined algebraic expression using names of value flow objects or user define variable names. Incoming connections to a formula connects value flow objects  to the formula represents inputs used in the formula calculation. Outgoing connections represent output destinations to assign the calculated value to. A formula needs at least one input (incoming connection) and can be assigned to multiple value flow objects as well as other formulas.

A SimpleFormula has an attribute called Method which lets the user pick from the set of predefined mathematical functions to use on the input value flow objects. Addition, minmum, maximum, and average operations require that the units of input and output value flow objects be of the same dimension. If an input object doesn't not have an assigned unit, an attempt is made during evaluation process to automatically assign a compatible unit. For multiplication operations, the unit of inputs do not need to have the same dimesions. During evaluation process, the output's expected dimension is calculated based on the inputs' dimensions and checked against the actual dimension of the output's assigned unit. Figure \ref{fig:simpleformula} shows a SimpleFormula with inputs from Drivetrain, Hull and Chassis, and Turret assemblies and feeding the resulting sum to a Property object called Weight.
\begin{figure}[t]
\centering
\includegraphics[scale=0.40]{Figures/simpleFormula_VF.png}
\caption{Simple Formula.}
\label{fig:simpleformula}
\end{figure}

A CustomFormula does not have any predefined operations. The user needs to type in a mathematical expression in the Expression attribute. During the evaluation process, third-party tool APIs (muParser) are called to parse and evaluate the expression. CustomFormulas are used primarily for surrogate equations in the IFV model. Units are not checked on CustomFormula intputs and outputs. The next subsection gives more detail on the syntax of CustomFormulas.

\paragraph{Formula Syntax}
CustomFormula supports algebraic expressions formed by combining constants, variables, mathematical operators and predefined functions. Variables can be the name of the input value flow object or the Variable Name attribute on the incoming value connection of a CustomFormula object. The supported operators and functions are listed in Tables \ref{tab:builtinfcntable} and \ref{tab:optable}. Built-in functions can support one more arguments, multiple arguments need to be seperated by commas and enclosed within a parenthesis. The arguments can be either constants or variables. The syntax for using an operator is (x operator y) where x and y are constants or variables.

\begin{table}
\parbox{.45\linewidth}
{
	\centering
	\begin{tabular}{ | l | l |}
	\hline
   Name & Num Argc \\ \hline
    sin&1 \\ \hline
    cos&1 \\ \hline
    tan&1 \\ \hline
    asin&1 \\ \hline
    acos&1 \\ \hline
    atan&1 \\ \hline
    sinh&1 \\ \hline
    cosh&1 \\ \hline
    tanh&1 \\ \hline
    asinh&1 \\ \hline
    acosh&1 \\ \hline
    atanh&1 \\ \hline
    log2&1 \\ \hline
    log10&1 \\ \hline
    ln&1 \\ \hline
    exp&1 \\ \hline
    sqrt&1 \\ \hline
    sign&1 \\ \hline
    rint&1 \\ \hline
    abs&1 \\ \hline
    min&$>$1 \\ \hline
    max&$>$1 \\ \hline
    sum&$>$1 \\ \hline
    avg&$>$1 \\ \hline
   \end{tabular}
   \caption{Supported Functions}
   \label{tab:builtinfcntable}
   }
\hfill
\parbox{.45\linewidth}
{
	\centering
	\begin{tabular}{ | l | l |}
	\hline
    Name & Meaning \\ \hline
    =&assignment \\ \hline
    \&\&&logical and \\ \hline
    ||&logical or \\ \hline
    <=&less or equal \\ \hline
    >=&greater or equal \\ \hline
    !=&not equal \\ \hline
    ==&equal \\ \hline
    >&greater than \\ \hline
    <&less than \\ \hline
    +&addition \\ \hline
    -&subtraction \\ \hline
    *&multiplication \\ \hline
    /&division \\ \hline
    $\wedge$&raise x to the power of y \\ \hline
  \end{tabular}
  \caption{Supported Operators}
  \label{tab:optable}
  }
\end{table}

Figure \ref{fig:customformula} shows two ways of writing a CustomFormula in the IFV\_DriveTrain design space model. The CustomFormula expression on the left used the name of input Property objects, Drivetrain\_Weight and PowerPlant\_MaxPower, along with constants. The example on the right used the VariableName attribute of the connections between CustomFormula and Drivetrain\_Weight and PowerPlant\_MaxPower Property objects. Notice that the attribute is displayed on both of the connections themselves. Both ways of writing the expression is valid and VariableName attribute should be used when there are multiple input value flow objects with the same name for a CustomFormula.
\begin{figure}
\centering
\includegraphics[scale=0.40]{Figures/customFormula_VF.png}
\caption{Custom Formula Using Name of Property Objects and VariableName Attribute on Connections.}
\label{fig:customformula}
\end{figure}