text:
\subsubsection*{HIGHLIGHTS}

\section{INTRODUCTION}
Complex Networks and Multi-Agent Systems, are very active fields of research.
They entail the study of networks of interacting agents whose structure is
irregular, complex and dynamically evolving with time \cite{linked, Barabasi,
cn, kwapiendrozdzPR12}. Most real systems in biology, chemistry, engineering,
socioeconomics, are made up of millions and millions of interacting agents (i.e
atoms, electrons, people as the case may be) which account for fluctuations in
the overall behaviour of the system. Over the years, it has also been discovered
that non-linear mathematical models  replicate the dynamics of real systems
better than the linear ones \cite{djvu, strogatz}. An example of such former
models is the Lotka-Volterra model  \cite{Lot,vot},  and its generalisation
\cite{bank,ecology,ecom,low, Ma,Ada,PhA389.10NKVZIDMAideol,ACSmigration,coop,
comp, rep}, which is also known as the prey-predator model \cite{pekalskirevPP}.

The Lotka-Volterra model has been used in various ways to model complex
systems\cite{bank,ecology,ecom,low, Ma,
Ada,PhA389.10NKVZIDMAideol,ACSmigration}. For instance, in \cite{ecom}, the
model was used in e-commerce web sites in a competitive scenario to explore its
effects and the characteristic of ``rich gets richer'' on Internet economy, and
the ``winner-takes-all" phenomenon. This was an improvement on \cite{ Ma, Ada}
where interacting agents where discovered to be ``sharing the market". The
Verhulst-Lotka-Volterra model was  generalized in \cite{comp} through the
introduction of a non-linear, symmetric interaction function, used to
investigate a competitive scenario. This resulted in a self-organising
clustering of agents, which were either chaotic or/and non chaotic in nature as
a result of their dependence on the agent's size and  their initial state
conditions. Cooperative scenarios examined in \cite{coop} were modeled
individually without imposing any ``market condition". This resulted in the
growth of different clusters of interacting agents beyond their capacity   in
contrast to the competitive case. A complex network representation of the
competitive and the cooperative scenarios was presented in \cite{rep}, in order
to give another description of some generalized Verhulst-Lotka-Volterra model.

This present paper offers new insights on the effects of competitive and/or
cooperative interaction in a multi-agent system when $n$ agents have some common
resources to share in the ``market".

The main contribution of our paper is two folds: firstly, we generalize the
Verhulst-Lotka-Volterra model by introducing a network effect through an
undirected but weighted graph. The weights suitably represent competition or
cooperation. The elements of the resulting adjacency matrix replaces the
strength parameter in the interaction function of the\cite{comp, coop} model in
order to enable a mixed-type of interactions, i.e., having a system in which
competitive and cooperative scenarios are considered to occur simultaneously
amongst the various  interacting agents.

Secondly, we introduce a market capacity in the model to replace individual
agent's capacity:  this is  a realistic constraint, i.e., the maximum level
which all the agents may reach in the market, like in Verhulst model of limited
population growth \cite{v1,v2}- thereby enforcing a natural (endogenous) limit
on agent's size growth.

Such competition, cooperation and  mixed-type of interactions are analyzed below
for triad interacting agents through the evaluation of the eigenvalues of  the
relevant Jacobian matrix computed at corresponding fixed points, in order to
investigate the system stability.  This triad system has been chosen as the most
simple yet complex enough as  representative of basic networks
\cite{EPJB86.13GRMAcomplex}.   Notice that the model goes well away for the 2-player prisoner (dilemma) game.

Thus, a mixed-type of interactions between agents, made possible through the
network effect in the generalized Verhulst-Lotka-Volterra model, markedly
differs  from previous works \cite{comp,rep,coop}, and seems more realistic.

This paper is organized as follows: in Section 2, the generalized Verhulst-Lotka-Volterra model is discussed. Section 3 contains the outline of the mathematical model used in this paper. The fixed point analysis and state stability are investigated in Section 4. In  Section 5,  initial size conditions and convergence to a steady state of the triad interacting agents are further illustrated through simulations. We demonstrate the presence of growth and/or
decay effects in various scenarios, - sometimes rather complex, but  {\it a posteriori} understandable. The paper is concluded in Section 6. It appears that the model is suitable for describing not only  an ``economic market" but other
agent based cases such as co-autorship, or more generally team working, or any other small or large network   based  complex systems.

\section{THE GENERALIZED VERHULST-LOTKA-\\VOLTERRA MODEL}
\noindent A generalized Verhulst-Lotka-Volterra Model introduced in \cite{comp}
is given by:
\begin{equation}
 \dot{s_{i}} = \alpha_{i} s_{i}(\beta_{i} - s_{i}) - \sum_{i \neq j}
\gamma(s_{i},s_{j}) s_{i} s_{j}, \quad \quad \quad i=1,\ldots,n, \label{2a}
\end{equation}
where $s_{i}$ is the size of agent $i$ such that $0\leq s_{i} \leq 1$;
$\dot{s_{i}}$ is its time derivative; $\alpha_{i}$ is agent's growth rate if no interaction is present, $\beta_{i}$ is the agent's maximum capacity and
$\gamma(s_{i},s_{j})$ is the interaction function. The first term is a Verhulst-like term \cite{v1,v2} and the others stem from the Lotka-Volterra model
\cite{Lot,vot}.

The interaction function $\gamma(s_{i},s_{j})$  is defined by
 \begin{equation}
  \gamma(s_{i},s_{j}) = K \exp \left[- \left(\frac{s_{i}-
s_{j}}{\sigma}\right)^{2}\right]; \label{2b}
\end{equation} it is a continuously differentiable function that allows a proper theoretical analysis of the system dynamics leading to conclusions which will appear to be likely model independent. The positive parameter $\sigma$ controls
or scales the intensity of agent size similarity and the parameter $K$ determines the scenarios of agent's interaction.

The model is used in \cite{comp} to analyze a system of $n$ agents in competition for some common resources with competition becoming more aggressive
between agents with similar size. This is because as $|s_{i} - s_{j}|\rightarrow 0$, the interaction function $\gamma(s_{i}, s_{j}) \rightarrow K$ for a constant parameter $\sigma$, its maximum value. The  competition weakens  when  agents
have distinctly different sizes, thereby suggesting  a peer-to-peer competition modelling.

For the peer-to-peer interaction system,  presented in \cite{comp,coop}, a strength parameter $K$  was  introduced: $K>0$ was considered to show  the presence of competition in the market, while $K<0$ implied cooperation. Under
the cooperative scenario, the interaction function is  defined  in the interval $-K < \gamma(s_{i},s_{j}) < 0$. In order to avoid complexity and instability of
the system, the value of $K$ was chosen carefully through fixed point analysis of agents with equal sizes\cite{coop}, whose eigenvalues are
\begin{equation}
 \lambda_{1, \ldots, n} = \frac{K-1}{1 +(n-1)K}, \label{2c}
\end{equation}
 so that, the $K$ range interval $- \frac{1}{n-1} < K < 0$ ensures the stability of the system.

\section{THE MODEL}
\noindent This paper is a study of the Verhulst-Lotka-Volterra model when competition and cooperation can occur between linked agents. The market capacity $\beta$ becomes the amount of product/service sales that could be reached within a certain period of time by any agents in the ``market" \cite{capacity}. The relationship between the individual agent's maximum capacity $\beta_{i}$ and $\beta$ is given by:
\begin{equation}
\beta_{i} = \beta - \sum_{i \neq j} s_{j}, \label{2d}
\end{equation}
\noindent so that the  initial Verhulst-Lokta-Volterra model becomes:
\begin{equation}
 \alpha_{i} s_{i}(\beta_{i} - s_{i}) = \alpha_{i} s_{i}\left(\beta - \sum_{i= 1}
s_{i}\right).\label{2e}
\end{equation}
In addition, interaction among agents is introduced and modeled by a matrix
$\textbf{K}$ with elements $k_{ij} = k_{ji}$, which are zero on the diagonal, and can be +1 or -1 off the diagonal. Thus, the interaction function becomes:
\begin{equation} \gamma(s_{i},s_{j}) = k_{ij} \exp \left[- \left(\frac{s_{i}-
s_{j}}{\sigma}\right)^{2}\right]
\end{equation}
with $0< \gamma(s_{i},s_{j}) < |k_{ij}|$.

This matrix $\textbf{K}$ is the adjacency matrix of a network represented by a weighted and undirected graph. The weights are $0,-1$  and $+1$ indicate no interaction, cooperation and competition respectively.
Furthermore, we assume that there is no loop, that is, an agent cannot compete or cooperate with herself.
For some special matrices $\textbf{K}$, we obtain the model in \cite{coop,comp}.
For instance, when
\begin{equation} \scriptstyle \nonumber \textbf{K}  \equiv \left[
                    \begin{array}{ccccc}
                     0 & 1& . & . & 1  \\
                       1 & 0&  & .&1  \\
                       .& & . &  & . \\
                       .& &  & . & .\\
                     1 & 1  & . & . & 0
                    \end{array} \right]
\end{equation}
\noindent we obtain the full competitive scenario as in \cite{comp}. For
\begin{equation} \scriptstyle \nonumber \textbf{K} \equiv \left[
                    \begin{array}{ccccc}
                     0 & -1& . & . & -1  \\
                       -1 & 0&  & .&-1  \\
                       .& & . &  & . \\
                       .& &  & . & .\\
                     -1 & -1  & . & . & 0
                    \end{array}\right],
\end{equation}
\noindent this is the full cooperative scenario \cite{coop}. In addition the
network matrix
\begin{equation} \scriptstyle \nonumber \textbf{K}  \equiv \left[
                    \begin{array}{ccccc}
                     0 & k_{12}& . & . & k_{1n}  \\
                       k_{21} & 0&  & .&k_{2n}  \\
                       .& & . &  & . \\
                       .& &  & . & .\\
                     k_{n1} & k_{n2}  & . & . & 0\\
                    \end{array}
                  \right]
                   \end{equation}
ensures a mixed-type of interaction amongst the agents in the model, when $k_{ij} (= k_{ji})$ takes the value +1 or -1. That is, when competition and cooperation occur simultaneously amongst interacting agents in the system. For
example, for $n=3$, in our model, we can have two agents collaborating in order to compete effectively with the third agent. This can be compared with the case of two small companies collaborating to compete against a big company which had previously monopolized the market or when two political parties merge together for the purpose of winning  over a ruling (or  over a potentially ruling) party in an election or when scientific teams or authors cooperate on some research
topics.

Thus suppose that there exist  $n$ agents sharing some common resources. Let us assume that agents increase in size if they acquire some portion of the resources or have  their size reduced if any market portion is lost. Our
mathematical model is defined by an $n$-dimensional differential equation:
\begin{equation}  \dot{s}_{i} = \alpha_{i} s_{i}\left(\beta - \sum_{i= 1}^{n}
s_{i}\right) - \sum_{i \neq j} k_{ij} \exp \left[- \left(\frac{s_{i}-
s_{j}}{\sigma}\right)^{2}\right] s_{i}s_{j}, \quad \quad \quad \quad i = 1,
\ldots ,n
\label{2f}
\end{equation}
where $s_{i}$ is the agent  size such that $0 < s_{i} \leq 1$; $\dot{s}$ is its time derivative; $\alpha_{i}$ is the growth rate of agent $i$ if no interaction is present; $\beta$ is the market capacity and $k_{ij}$ is the element of the network matrix $\textbf{K}$ which determines the interaction between agent $i$ and $j$. The interaction function $\gamma(s_{i},s_{j})$ is composed of dynamic parameters
that result from the difference between agents in relation; the parameter $\sigma$ is a positive parameter that regulates the difference in the agent's size. Note that while $\textbf{K}$ indicates what interaction is present,
$\sigma$ determines the ``range" of interaction of the agents.
Indeed, in contrast to the ``large"  interaction between equal size agents, the intensity of interactions between ``agents with bigger market share" and ``those with small market share"   occurs to be weak, since as $\mid s_{i} - s_{j}\mid \rightarrow \infty$, the interaction function $\gamma(s_{i},s_{j}) \rightarrow 0$; on the contrary,
indeed, as $\mid s_{i} - s_{j}\mid \rightarrow 0$,
$\gamma(s_{i},s_{j}) \rightarrow \pm 1$ depending on $k_{ij}$,
which signifies a strong interaction between agents with similar sizes.

For the sake of simplicity, without much losing generality, it can be  assumed
that the agents have the same dynamic properties $\alpha_{i} = 1$, while  the
market capacity  can be $\beta = 1$. Therefore, equation (\ref{2f}) becomes:
\begin{equation}  \dot{s}_{i} =  s_{i}\left(1 - \sum_{i= 1}^{n} s_{i}\right) -
\sum_{i \neq j}  k_{ij} \exp \left[- \left(\frac{s_{i}-
s_{j}}{\sigma}\right)^{2}\right]
s_{i}s_{j}, \quad \quad \quad \quad i = 1, \ldots ,n
\label{2g}
\end{equation}
where, as stated earlier, $k_{ij}$, $i,j=1,\ldots,n$ are elements of the interaction matrix $\textbf{K}$.
\section{FIXED POINT ANALYSIS AND STABILITY}
In this section, the fixed point analysis of the model is done in order to investigate the stability of the system for all  scenarios. A triad system of agent (i.e. $n = 3$) was chosen as a simple yet complex representative of a
basic network, in order to illustrate some of the properties of the model analytically.

Suppose $A_{1}, A_{2}$ and $A_{3}$ are triad interacting agents with market sizes ${s}_{1}, {s}_{2}$ and ${s}_{3}$ respectively, from  equations (3.3) the system of triads becomes:
\begin{eqnarray}  \dot{s}_{1} &=&  s_{1}(1 - s_{1} - s_{2} - s_{3}) -  k_{12}
\exp^ {- \left(\frac{s_{1}-s_{2}}{\sigma}\right)^{2}}s_{1}s_{2} - k_{13} \exp^{-
\left(\frac{s_{1}-s_{3}}{\sigma}\right)^{2}}s_{1}s_{3},
\label{4a}\\  \dot{s}_{2} &=&  s_{2}(1 - s_{1} - s_{2} - s_{3}) -  k_{12} \exp^
{- \left(\frac{s_{2}-s_{1}}{\sigma}\right)^{2}}s_{2}s_{1} - k_{23} \exp^{-
\left(\frac{s_{2}-s_{3}}{\sigma}\right)^{2}}s_{2}s_{3},
\label{4b}\\  \dot{s}_{3} &=&  s_{3}(1 - s_{1} - s_{2} - s_{3}) -  k_{13} \exp^
{- \left(\frac{s_{3}-s_{1}}{\sigma}\right)^{2}}s_{3}s_{1} - k_{23} \exp^{-
\left(\frac{s_{3}-s_{2}}{\sigma}\right)^{2}}s_{3}s_{2}.
\label{4c}
\end{eqnarray}

The possible $\textbf{K}$-matrices for describing the  different scenarios of interaction amongst the agents $A_{1}, A_{2}$ and $A_{3}$ are:
\begin{equation} \scriptstyle \nonumber  \textbf{K}_{1} = \left[
                    \begin{array}{ccccc}
                     0& 1& 1 \\
                      1 & 0& 1  \\
                       1&1 & 0\\
                    \end{array}
                  \right], \textbf{K}_{2} = \left[
                    \begin{array}{ccccc}
                     0& 1& 1 \\
                      1 & 0& -1  \\
                       1&-1 & 0\\
                    \end{array}
                  \right],\textbf{K}_{3} = \left[
                    \begin{array}{ccccc}
                     0 & -1& -1 \\
                      -1& 0& 1  \\
                       -1&1 & 0\\
                    \end{array}
                  \right], \textbf{K}_{4} = \left[
                    \begin{array}{ccccc}
                     0 & -1& -1 \\
                      -1 & 0& -1  \\
                       -1&-1 & 0\\
                    \end{array}
                  \right]
                  \label{4d}
\end{equation}
where $\textbf{K}_{1}$ represents the matrix for a full competitive system with three interacting agents; $\textbf{K}_{2}$ is a matrix for  mixed-type of interaction system, where one agent compete with two other agents in cooperation. In this case, agent $A_{1}$ competes with agent $A_{2}$ and agent
$A_{3}$ which are in cooperation. $\textbf{K}_{3}$ is a matrix for mixed-type of interaction system, where one agent cooperates with two other agents in competition, in this case, agent $A_{1}$ cooperates with agent $A_{2}$ and agent
$A_{3}$ which are in competition with each other.  $\textbf{K}_{4}$ represents the matrix for a full cooperative system amongst the three interacting agents. It can be observed that other cases of the mixed-type of interaction are
isomorphic to the ones here presented.

The fixed point analysis of the system entails the evaluation of the eigenvalues of the relevant Jacobian matrix computed at each corresponding fixed point, thus
used to determine the stability of the system. When the real part of all the eigenvalues is negative, the system is said to be stable. If at least one eigenvalue has a positive real part, the system is unstable.
\subsection{Fully Competitive and Fully Cooperative Scenario}
\noindent In this paragraph, the stability of the system under either the fully competitive or fully cooperative scenarios is discussed, that is, the model with network matrix $\textbf{K}_{1}$ and $\textbf{K}_{4}$. By definition, a fixed
point is a point in the phase space where all the time derivatives are zero, i.e., $\dot{s}_{i} = 0$ for $i = 1\ldots,n$.
The following fixed points were detected analytically from equations (\ref{4a})-
(\ref{4c}):
\begin{enumerate}
\item[(I)] $s_{i}= 0$ for $i = 1, 2, 3$. i.e. all agents with zero size.
\item[(II)]   $s_{i}= 1$ and  $s_{j}= 0$ for every $i \neq j$ i.e. one agent
monopolizes the market.
\item[(III)] $s_{i}= b$ for $i = 1, 2, 3$, $0 < b \leq 1$. i.e. all agents own
an equal share of the market.
\end{enumerate}

Moreover it can be easily shown that the elements of the Jacobian matrix of the
triads are:

\begin{equation} [J]_{(i,k)}=\frac{\partial \dot{s_{i}}}{\partial s_{k}}=\left\{
                  \begin{array}{ll}
                    1 - 2s_{i} - \sum_{i \neq j} s_{j}\left(1 +
\gamma(s_{i},s_{j})\left[1 - \frac{2}{\sigma^{2}} s_{i}(s_{i} -
s_{j})\right]\right), & \hbox{ for $k = i$;} \\ \nonumber \\
                    -s_{i} - s_{i}\gamma(s_{i},s_{k})\left[1 -
\frac{2}{\sigma^{2}} s_{k}(s_{i} - s_{k})\right], & \hbox{for $k \neq i$,}
                  \end{array}
                 \right  .
\end{equation}

from which the stability conditions are to be found at each fixed point.
\subsubsection*{Type (I) Fixed Point}
 \noindent The type (I) fixed point analysis is the case in which all agents have size zero, i.e., $s_{i}= 0$ for $i = 1, 2, 3$. The evaluated Jacobian matrix at the type (I) fixed point, is given by:
 \begin{equation} \nonumber \textbf{J} = \left[
                    \begin{array}{ccccc}
                     1 & 0& 0 \\
                      0 & 1& 0  \\
                       0&0 & 1\\
                    \end{array}
                  \right]
 \end{equation}
 \noindent whose eigenvalues are all equal to 1 (i.e.,
 $\lambda_{1} = \lambda_{2} = \lambda_{3} = 1$). Therefore, it is an unstable fixed point. At this fixed point, competition or cooperation is not applicable since all agents are at level zero. In other words, these results do not depend
on the network matrix $K$.
  \subsubsection*{Type (II) Fixed Point}
\noindent The type (II) fixed point analysis corresponds to the case in which one agent eventually monopolizes the market and satisfies the whole demand (i.e., $s_{1} = 1$); all others have size zero (i.e., $s_{2} = s_{3} = 0$).
Evaluating the Jacobian matrix at the type (II) fixed point, we obtain:
 \begin{equation} \nonumber \textbf{J} = \left[
                    \begin{array}{ccccc}
                     -1 & -1-\phi_{12}& -1-\phi_{13} \\
                      0 &-\phi_{12}& 0 \\
                       0& 0& -\phi_{13} \\
                    \end{array}
                  \right],
 \end{equation}
\noindent where $\phi_{ij} = k_{ij} \exp(- \sigma^{-2})$, for $i,j = 1,2,3$ and
$i\neq j$.
The eigenvalues are obtained from
\begin{equation}
\nonumber (-1-\lambda)(-\phi_{12}-\lambda)(-\phi_{13}-\lambda) = 0
\end{equation}
which implies that $\lambda_{1} = -1$, $\lambda_{2} = -\phi_{12}$ and $\lambda_{3} = -\phi_{13}$.

In the fully competitive scenario, all $k_{ij} = 1$ for $i \neq j$, thereby resulting to an all negative eigenvalues of \textbf{J}. Indeed, this implies stability of the system at this fixed point. This is applicable in real systems:
if an agent monopolises the competitive market, the agent will ensure  that such a domination is not lost, whence keeping the market stable.

 On the contrary, in the fully cooperative scenario, $\lambda_{2}$ and $\lambda_{3}$ are positive, since all $k_{ij} = -1, i \neq j$, thereby making the system unstable. This is also realistic, since in cooperation, the ultimate
goal is the maximisation of all agents gain in the market. Therefore, it can be emphasized that monopoly and cooperation are not compatible terms. This accounts for  systemic  instability.

 In conclusion, the type (II) fixed point is stable in a full competitive scenario because of the possibility of monopoly, but is unstable under full cooperation.
 \subsubsection*{Type (III) Fixed Point}
 \noindent The type (III) fixed point analysis is the case in which all agents are eventually owning the same share of the market, i.e.,  $s_{i}= b$ for $i =
1, 2, 3$, $0< b <1$.  When evaluating the Jacobian matrix at this fixed point, the constant $b$ has first to be calculated by substituting $s_{i} = b$ and $\dot{s}_{i} = 0$ into Equations (\ref{4a})-(\ref{4c}). From (\ref{4a}), it can
be deduced that:
 \begin{eqnarray}   0 &=& b(1 - 3b)- (k_{12} + k_{13})b^{2}
 \\ \nonumber \\  &= & 1 - b(3 + (k_{12} + k_{13}).
 \end{eqnarray}
 \noindent Therefore,
 \begin{equation}  b = \frac{1}{(3 + (k_{12} + k_{13}))}.
 \label{4h}
\end{equation}
\noindent Similarly from (\ref{4b}) and (\ref{4c}) respectively, the following is obtained:
\begin{equation}  b = \frac{1}{(3 + (k_{12} + k_{23}))}.
\label{4i}\end{equation}
\begin{equation}  b = \frac{1}{(3 + (k_{13} + k_{23}))}.
\label{4j}\end{equation}

Therefore, from equations (\ref{4h})-(\ref{4j}), it can be deduced that in a fully competitive system (i.e. $k_{12} = k_{13}= k_{23} = 1$), the agent size is  $b = \frac{1}{5}$. This implies that the aggregate size of the three agents does
not reach the market maximum possible capacity, which may be the negative result of the competition amongst peers.

Thus, for a full competition of agents with the same size, the Jacobian matrix with $b=\frac{1}{5}$ is:
 \begin{equation} \nonumber \textbf{J} = \frac{1}{5} \left[
                    \begin{array}{ccccc}
                     -1 & -2& -2 \\
                      -2 &-1& -2 \\
                       -2&-2 & -1\\
                    \end{array}
                  \right],
 \end{equation}
\noindent the eigenvalues are obtained from the characteristic polynomial
\begin{eqnarray}
 \nonumber(-1- \lambda)^{3} -12 (-1-\lambda) -16 &=& 0
\end{eqnarray}

 The solution to the above cubic equation is $\lambda_{1} = \lambda_{2} = 1$ and $\lambda_{3} = -5$. This shows that the system is unstable at this fixed point.
When all the agents have an equal size in a competitive market, the system will be unstable; because the major goal of  each  agent is to $individually$ dominate the market.  According to the model, agents with ``similar" sizes are
strongly interacting;   this leads to  a ``survival of the fittest"  scenario in
such a competitive system, - thereby making the system unstable.

In contrast, for a cooperative system (i.e. $k_{12} = k_{13}= k_{23}= -1$), we have $b = 1$, that is, collaboration makes all agents reach the market full capacity with agent sizes  as a function of time possibly intersecting one another.

The corresponding Jacobian matrix for the cooperative system with $b=1$ is:
 \begin{equation} \nonumber \textbf{J} =  \left[
                    \begin{array}{ccccc}
                     -1 & 0& 0 \\
                      0 &-1& 0 \\
                       0&0 & -1\\
                    \end{array}
                  \right];
 \end{equation}
\noindent the eigenvalues are obtained from the equation:
\begin{equation}
 \nonumber(-1- \lambda)^{3}= 0
\end{equation}
 \noindent which implies that  the system is stable,  since $\lambda_{1,2,3} = -1.$ When all the agents with $quasi$ equal market share cooperate, with the collective goal of maximizing their profit (size) in the market, the system will
definitely be stable; their goal will be achieved since the strongest possible
interaction exists amongst agents with similar sizes.

 It can be noted that when $b=\frac{1}{3}$, (i.e. $k_{12} = k_{13}= k_{23}= 0$), there exists no interaction amongst the triads agents of equal sizes and this leads to the case whereby the agents ``share the market" equally.

In conclusion to this section, a summary of the fixed point analysis of our model with the network matrix $\textbf{K}_{1}$ and $\textbf{K}_{4}$, i.e, under the fully competitive and fully cooperative scenarios is presented in Table
\ref{table:sum}. In this table, it is  shown that systemic stability is observed under full competitive scenario only when one agent monopolizes the market, but under the fully cooperative scenario, stability occurs only when all the agents own an equal share of the market.
\begin{center}
\begin{table}[]
\centering
\begin{tabular}{|c|c|c|c|c|}
\hline
\multicolumn{4}{|c|}{Fixed Point Analysis and Stability} \\
\hline
Scenario &(I.) $s_{i}= 0$ $
\forall i$ & (II.) $s_{i}= 1$, $s_{j}=0$, $i \neq j$& (III.) $s_{i}= b$ $\forall
i$\\
\hline
\multirow{4}{*}{Full Competition} & $\lambda_{1} = 1$  & $\lambda_{1} = -1$ &
$\lambda_{1} = 1$ \\ & $\lambda_{2} = 1$ & $\lambda_{2} = -\phi_{12}$ &
$\lambda_{2} =  1$ \\
& $\lambda_{3} = 1$ & $\lambda_{3} =  -\phi_{13}$ & $\lambda_{3} = -5$ \\
& Unstable & Stable & Unstable \\
\hline
\multirow{4}{*}{Full Cooperation} & $\lambda_{1} = 1$  & $\lambda_{1} = -1$ &
$\lambda_{1} = -1$ \\ & $\lambda_{2} = 1$ & $\lambda_{2} = -\phi_{12}$ &
$\lambda_{2} =  -1$ \\
& $\lambda_{3} = 1$ & $\lambda_{3} =  -\phi_{13}$ & $\lambda_{3} = -1$ \\
&Unstable & Unstable & Stable \\
\hline
\end{tabular}
\label{table:sum}
\caption{Summary of analytical results under Full Competition and Full Cooperation with $\phi_{ij} = k_{ij} \exp(-\sigma^{-2})$ and $k_{ij} = \pm 1$ depending on interaction between agent $i$ and $j$.}
\end{table}
\end{center}

\subsection{Mixed Interaction Scenario}
 \noindent For the mixed interaction system of triads, two possible cases  can be considered; according to the number of cooperation pairs the other cases can be easily found  isomorphic to these, i.e.,
 \begin{itemize}
 \item $G_{2}$: Agent $A_{1}$ is competing both with agent $A_{2}$ and agent
$A_{3}$, these two being in one cooperation scheme, i.e., the model with network matrix $\textbf{K}_{2}$. This implies that in equations (4.1)-(4.3),  $k_{12} =
1$, $k_{13} = 1$ and $k_{23} = -1$.
 \item $G_{3}$:  Agent $A_{1}$ cooperated with both agent $A_{2}$ and agent
$A_{3}$, but these two are in competition, i.e., the model with network matrix
$\textbf{K}_{3}$. Therefore,  $k_{12} = -1$, $k_{13} = -1$ and $k_{23} = 1$  for
equations (\ref{4a})-(\ref{4c}).
\end{itemize}
Analytically, only one fixed point was detected for the mixed interaction of triad agents which is a case of market duopoly. The coordinates of the fixed points are given by:\\
  \noindent $s_{i}= 1$, $s_{j} =1$, $s_{k} = 0$, for some $i,j,k= 1,2,3$,
indeed, i.e. outlining the case of duopoly in a mixed interaction market.

\begin{figure}
    \begin{center}
	{\includegraphics[width=0.24\textwidth, angle=-90]{Fig_1a}\label{subfig:graph_1}}
	{\includegraphics[width=0.24\textwidth, angle=-90]{Fig_1b}\label{subfig:graph_2}}
   {\includegraphics[width=0.24\textwidth, angle=-90]{Fig_1c}\label{subfig:graph_3}}
    {\includegraphics[width=0.24\textwidth, angle=-90]{Fig_1d}\label{subfig:graph_4}}
	\caption{Graphical illustration of the four scenarios. An edge with solid line signifies a competitive interaction while an edge with dashed line signifies a cooperative interaction. Pictures respectively refers to: (a)
$G_{1}$, (b) $G_{2}$, (c) $G_{3}$ and (d) $G_{4}$}\label{fig:Graph}
\end{center}
\end{figure}
\subsubsection*{Fixed point Analysis}
\noindent For the fixed point analysis of the two possible mixed interaction
scenarios, the Jacobian matrix is given by:
\begin{equation}  \textbf{J} = \left[
                    \begin{array}{ccccc}
                      -2-k_{12}& -1-k_{12}& -1-\phi_{13} \\
                      -1-k_{12} &-2-k_{12}& -1-\phi_{23} \\
                       0&0 & -1-\phi_{13} - \phi_{23}\\
                    \end{array}
                  \right],
                  \label{4k}
\end{equation}
where $\phi_{ij} = k_{ij} \exp(-\sigma^{-2})$ and $i,j =1,2,3$ for $i \neq j$.
Considering the two possible cases of the mixed interaction scenarios, two different Jacobian matrices emerge depending on the values of each $k_{ij}$. When one agent competes  with two other agents, themselves  in cooperation,
$k_{12} = 1$, $k_{13} = 1$ and $k_{23} = -1$ which after  substitution into (\ref{4k}) leads to the Jacobian matrix
\begin{equation} \nonumber \textbf{J} =  \left[
                    \begin{array}{ccccc}
                     -3 & -2& -1-\phi_{13} \\
                      -2 &-3& -1-\phi_{23} \\
                       0&0& -1-\phi_{13}-\phi_{23}\\
                    \end{array}
                  \right].
\end{equation}
\noindent Solving the characteristic equation
\begin{equation} \nonumber (-1-\phi_{13}-\phi_{23} - \lambda)[(-\lambda - 3)^{2}
- 4] = 0
\end{equation}
 the eigenvalues of the Jacobian matrix is obtained to be $\lambda_{1} = -5,
\lambda_{2}= \lambda_{3} = -1$. This signifies systemic stability under the first case of mixed interaction scenarios with the network matrix $\textbf{K}_{2}$.

When one agent cooperates with two other agents  themselves in competition with each other, $k_{12} = -1$, $k_{13} = -1$ and $k_{23} = 1$;  substitution into
(\ref{4k}) implies that the Jacobian matrix is:
\begin{equation} \nonumber \textbf{J} =  \left[
                    \begin{array}{ccccc}
                     -1 & 0& -1-\phi_{13} \\
                      0 &-1& -1-\phi_{23} \\
                       0&0& -1-\phi_{13}-\phi_{23}\\
                    \end{array}
                  \right].
\end{equation}
\noindent The corresponding eigenvalues obtained from
\begin{equation}
 \nonumber (-1-\phi_{13}-\phi_{23} - \lambda) [(-1- \lambda)^{2}] = 0.
\end{equation}
 \noindent is $\lambda_{1,2,3} = -1$. Hence, for the fixed point analysis under second possible case of mixed interaction scenario with a network matrix $\textbf{K}_{3}$ in our model, stability is observed in the system.

In conclusion of this section, for the two types of mixed interactions amongst triad agents, systemic stability is observed; this further shows the relevance
of examining the co-existence of competition and cooperation amongst agents in the market.

\section{SIMULATION RESULTS}
In this section, we present results  from numerical simulations emphasizing  the initial conditions and the convertgence of triad agent sets for all interesting
and  possible  scenarios, for each network matrix  type
$\textbf{K}=\{\textbf{K}_{1}, \textbf{K}_{2}, \textbf{K}_{3}, \textbf{K}_{4}\}$.

For the sake of clarity, in Fig \ref{fig:Graph}, the four possible scenarios are illustrated through undirected  graphs with three vertices representing agents
$A_{1}, A_{2}$ and $A_{3}$ and three edges which signify the type of interaction amongst the agents. An edge with solid line signifies a competitive interaction
while an edge with dashed lines signifies a cooperative interaction. Therefore, it can be deduced that in Fig \ref{fig:Graph}, graph $\textbf{G}_{1}$ represents
the full competitive scenario, $\textbf{G}_{2}$ represents the first case of the mixed-interactive scenario in which agent $A_{1}$ competes with $A_{2}$ and $A_{3}$, themselves in cooperation. Graph $\textbf{G}_{3}$ represents the second
case of the mixed-interactive scenario in which agent $A_{1}$ cooperates with $A_{2}$ and $A_{3}$, themselves in competition and $\textbf{G}_{4}$ represents the full cooperative scenario.

We have tested different sets of initial conditions; see a few exemplary cases in Table \ref{table:nonlin}. We have verified the coherence of results. This suggested to us to present only cases when the initial conditions of agents
sizes are rather different or quite similar, assuming a constant parameter that controls the size similarity, $\sigma =1$. The dynamic change in agent's size and relative behavior have been observed for each scenario. Finally, note that
agent's sizes initial conditions were chosen within a small interval in order to allow some ``meaningful"  interaction amongst the agents; since  within our
model, indeed, as $\mid s_{i} - s_{j}\mid \rightarrow \infty$, the interaction
function $\gamma(s_{i},s_{j}) \rightarrow 0$.
\subsection{Fully Competitive Scenario ($G_{1}$)}
\begin{figure}
	\includegraphics[width=0.5\textwidth, angle=-90]{Fig_2a}
\includegraphics[width=0.5\textwidth, angle=-90]{Fig_2b}
	\caption{Fully Competitive Scenario ($G_{1}$) with  different (lhs) and similar (rhs) agent's initial sizes.}\label{fig:competitive scenario}
\end{figure}
\noindent  The fully competitive scenario with different initial conditions for the agent's size is observed in Fig \ref{fig:competitive scenario} with a
consideration on dynamical change in the agent size; the market eventually ends in a monopoly. For all the permutations of the initial conditions, the agent that starts with the highest initial size, i.e $s_{0} = 0.4$, eventually monopolizes the market by attaining the market capacity, while the other two agents fade out of the market. This is possible because the two agents with smaller sizes compete too weakly with the agent that eventually dominates the market.

 On the contrary, when agents sizes are similar in Fig \ref{fig:competitive scenario}, the competition becomes very ``fierce" and all agents are struggling for their survival in the market. After some  time span, it is observed that the
agents eventually have an equal share of the market;  their total market share is  however lower than the market capacity. Thus, strong competition among peers is shown to  lead to a reduction in the aggregate output due to the selfish
interest of the individual agents. Indeed, observe that the final state ($\sum s_{i} = 0.6$). Convergence is generally slower in the competitive scenario when
compared with the other scenarios due to the nature and effect of competition amongst the interacting agents.
\subsection{Fully Cooperative Scenario ($G_{4}$)}
\begin{figure}
	\includegraphics[width=0.5\textwidth, angle=-90]{Fig_3a}
	\includegraphics[width=0.5\textwidth, angle=-90]{Fig_3b}
	\caption{Fully Cooperative Scenario ($G_{4}$) with different (lhs) and similar (rhs) agent's sizes.}\label{fig:cooperative scenario}
\end{figure}
\noindent The fully cooperative scenario ($G_{4}$) is analyzed for  different initial sizes  of the triads and  illustrated in Fig \ref{fig:cooperative scenario}. The cooperation amongst the agents enables all agents to  grow in size up to this market capacity, thereby increasing the total market size, -
which is the essence of cooperation $(\sum s_{i}> 1.0)$. A simple  analogy  can be  drawn with the case of publishing research in journals with a demand of just three papers in a journal edition (i.e. market capacity). For simplicity,  let
it be assumed that the three authors have the same quality standard (i.e. initial condition), under full competition, each author will have one article published making up three papers. However, the ``best" situation occurs under
full cooperation when  each author cooperates in writing the articles; they eventually have three papers each published to their credit. Hence, the final result will be three papers for the editor and three papers for each author. One
other example pertains to car owners who may own more than one car, e.g., three cars from three different manufacturers. These simple examples show that the agent's sizes can intersect each other during full cooperation.

The simulation  leads to the same effect, even if the initial conditions are permuted amongst the triads and when the agents have  similar initial sizes as shown in Fig \ref{fig:cooperative scenario}. Also, agents tend  to "quickly
agree", thereby converging within a short time lapse.
\subsection{The single pair cooperation ($G_{2}$).}
\begin{figure}
\includegraphics[width=0.5\textwidth, angle=-90]{Fig_4a}
\includegraphics[width=0.5\textwidth, angle=-90]{Fig_4b}
\caption{ Mixed Interaction Scenario ($G_{2}$), $A_{1}$ competes with $A_{2}$
and $A_{3}$ in pair cooperation, for different initial sizes.}\label{fig:mixed A}
\end{figure}
\begin{figure}
\includegraphics[width=0.5\textwidth, angle=-90]{Fig_5a}
\includegraphics[width=0.5\textwidth, angle=-90]{Fig_5b}
\caption{ Mixed Interaction Scenario ($G_{2}$):  $A_{1}$ competes with $A_{2}$ and $A_{3}$ in a pair cooperation, for different (lhs) or similar (rhs) initial sizes.}\label{fig:mixed B}
\end{figure}

\noindent The mixed interaction scenario ($G_{2}$), when agent  $A_{1}$ competes with agents $A_{2}$ and $A_{3}$  themselves in cooperation is shown in Fig \ref{fig:mixed A} - Fig \ref{fig:mixed B} for  different permuted initial
conditions of agent's sizes. It can be observed that in all simulations, the sizes of agents $A_{2}$ and $A_{3}$ in cooperation grow dynamically with time up to the market capacity but agent $A_{1}$ decreases in size until it fades out of the market. The most interesting simulation is seen in Fig \ref{fig:mixed B}, with different initial conditions $s_{0} = \{0.4,0.2,0.1\}$ where agent $A_{1}$
initially possesses the biggest share of the market with $s_{1} = 0.4$, competes with the two other agents $A_{2}$ and $A_{3}$ that alternate a smaller
size  $0.1$ and $0.2$. Note that the sum of the two initial shares of the cooperating agents is lower than the share of the competing agents.
Interestingly, after  some  time, the collaboration between agents $A_{2}$ and $A_{3}$ knocks out agent $A_{1}$ from the market. An example of this scenario was experienced in  2015 in the Nigerian political history, where a political
party that ruled the country for 16 years after democracy was restored, was defeated in a tight competition between the incumbent president and an aspirant that emerged from a strategic collaboration of three smaller political
parties\cite{nig}. However, this is not possible if the intensity of interactions is very low amongst the agents; that is, when $A_{1}$  is  ``extremely bigger" in size when compared to agents $A_{2}$ and $A_{3}$.

When all the agents have similar initial conditions, the pattern is similar with agents $A_{2}$ and $A_{3}$ totally taking over the market by growing up to
the market capacity as seen in Fig \ref{fig:mixed B}.
\subsection{The double pair cooperation ($G_{3}$)}
\begin{figure}
\includegraphics[width=0.5\textwidth, angle=-90]{Fig_6a}
\includegraphics[width=0.5\textwidth, angle=-90]{Fig_6b}
\caption{Mixed Interaction Scenario ($G_{3}$), $A_{1}$ cooperates with $A_{2}$
and $A_{3}$ in competition for different  initial sizes.}\label{fig: mixed 2A}
\end{figure}
\begin{figure}
\includegraphics[width=0.5\textwidth, angle=-90]{Fig_7a}
\includegraphics[width=0.5\textwidth, angle=-90]{Fig_7b}
\caption{Mixed Interaction Scenario($G_{3}$), $A_{1}$ cooperates with $A_{2}$ and $A_{3}$ in competition for different (lhs) or similar (rhs) initial
sizes.}\label{fig: mixed 2B}
\end{figure}

\noindent Finally, the second possible case of mixed interaction scenario ($G_{3}$) is shown in Fig \ref{fig: mixed 2A} - Fig \ref{fig: mixed 2B}; agent
$A_{1}$ cooperates with agents $A_{2}$ and $A_{3}$  themselves in competition, for different permuted initial conditions of agent's sizes.

\begin{table}[t] \begin{centering}
	\begin{tabular}{|c|ccc|ccc|}
\hline
Scenario & \multicolumn{3}{|c|}{Initial Sizes $s_i(0)$} &
\multicolumn{3}{|c|}{Growth (+) / Decay (-)} \\ [0.5ex]
\hline
\multirow{2}{*}{Full Competition $G_1$} & 0.1 & 0.2 & 0.4 & \qquad - \qquad & \qquad - \qquad & \qquad +
\qquad\\ & 0.1 & 0.4 & 0.2 & \qquad - \qquad &\qquad  + \qquad & \qquad  - \qquad\\
\multirow{5}{*}{\includegraphics[width=0.2\textwidth, angle=-90]{Fig_1a} }& 0.4 & 0.1 & 0.2 & \qquad + \qquad & \qquad - \qquad & \qquad -
\qquad\\
& 0.4 & 0.2 & 0.1 & \qquad + \qquad & \qquad - \qquad & \qquad - \qquad\\
& 0.2 & 0.4 & 0.1 & \qquad - \qquad & \qquad + \qquad & \qquad - \qquad\\
& 0.2 & 0.1 & 0.4 & \qquad -\qquad  & \qquad - \qquad & \qquad + \qquad\\
		& 0.15 & 0.15 & 0.15  & \qquad + \qquad & \qquad + \qquad & \qquad +
\qquad\\
		& 0.3 & 0.3 & 0.3  & \qquad - \qquad & \qquad - \qquad & \qquad -
\qquad\\
		\hline
		\multirow{2}{*}{
			Mixed Interaction $G_2$ 		}
		& 0.1 & 0.2 & 0.4 & \qquad - \qquad & \qquad + \qquad & \qquad +
\qquad\\
		& 0.1 & 0.4 & 0.2 & \qquad - \qquad & \qquad + \qquad & \qquad +
\qquad\\
		\multirow{5}{*}{
			\includegraphics[width=0.2\textwidth, angle=-90]{Fig_1b} 		}
		& 0.4 & 0.1 & 0.2 & \qquad - \qquad & \qquad + \qquad & \qquad +
\qquad\\
		& 0.4 & 0.2 & 0.1 & \qquad - \qquad & \qquad + \qquad & \qquad +
\qquad\\
		& 0.2 & 0.4 & 0.1 & \qquad - \qquad & \qquad + \qquad & \qquad +
\qquad\\
		& 0.2 & 0.1 & 0.4 & \qquad - \qquad & \qquad + \qquad & \qquad +
\qquad\\
		& 0.15 & 0.15 & 0.15 & \qquad - \qquad & \qquad + \qquad & \qquad +
\qquad\\
		& 0.3 & 0.3 & 0.3 & \qquad - \qquad & \qquad + \qquad & \qquad +
\qquad\\
		\hline
		\multirow{2}{*}{
			Mixed Interaction $G_3$ 		}
		& 0.1 & 0.2 & 0.4 & \qquad + \qquad & \qquad - \qquad & \qquad +
\qquad\\
		& 0.1 & 0.4 & 0.2 & \qquad + \qquad & \qquad + \qquad & \qquad -
\qquad\\
		\multirow{5}{*}{
			\includegraphics[width=0.2\textwidth, angle=-90]{Fig_1c} 		}
		& 0.4 & 0.1 & 0.2  & \qquad + \qquad & \qquad - \qquad & \qquad +
\qquad\\
		& 0.4 & 0.2 & 0.1  & \qquad + \qquad & \qquad + \qquad & \qquad -
\qquad\\
		& 0.2 & 0.4 & 0.1  & \qquad + \qquad & \qquad + \qquad & \qquad -
\qquad\\
		& 0.2 & 0.1 & 0.4  & \qquad + \qquad & \qquad - & \qquad + \qquad\\
		& 0.15 & 0.15 & 0.15 & \qquad + \qquad & \qquad + \qquad & \qquad +
\qquad\\
		& 0.3 & 0.3 & 0.3 & \qquad + \qquad & \qquad - \qquad & \qquad -
\qquad\\
		\hline
		\multirow{2}{*}{
			Full Cooperation $G_4$ 		}
		& 0.1 & 0.2 & 0.4  & \qquad + \qquad & \qquad + \qquad & \qquad +
\qquad\\
		& 0.1 & 0.4 & 0.2  & \qquad  + \qquad & \qquad + \qquad & \qquad +
\qquad\\
		\multirow{5}{*}{
			\includegraphics[width=0.2\textwidth, angle=-90]{Fig_1d}
		}
		& 0.4 & 0.1 & 0.2  & \qquad + \qquad & \qquad + \qquad & \qquad +
\qquad\\
		& 0.4 & 0.2 & 0.1  & \qquad + \qquad & \qquad + \qquad & \qquad +
\qquad\\
		& 0.2 & 0.4 & 0.1  & \qquad + \qquad & \qquad + \qquad & \qquad +
\qquad\\
		& 0.2 & 0.4 & 0.1  & \qquad + \qquad & \qquad + \qquad & \qquad +
\qquad\\
		& 0.15 & 0.15 & 0.15 & \qquad + \qquad & \qquad + \qquad & \qquad +
\qquad\\
		& 0.3 & 0.3 & 0.3 & \qquad + \qquad & \qquad + \qquad & \qquad +
\qquad\\

		\hline
	\end{tabular} \caption{Summary  of the effect of initial size conditions for the various scenarios  as obtained from simulations, i.e. changing the relative initial sizes of the agents}
  \end{centering}	\label{table:nonlin}
\end{table}

When agent $A_{1}$ cooperates  strongly with the agent with a  higher initial condition  and
cooperates weakly with the other one. The effect of cooperation makes agent
$A_{1}$ (irrespective of its initial condition) and any one of the two agents that cooperates strongly with agent $A_{1}$ grows up to the market capacity,
while the effect of weak cooperation and competition between agents $A_{2}$ and $A_{3}$ makes the agent with
the lowest initial condition vanishing from the market.

Surprisingly, when the three agents have the same initial size, the simulation turns out interesting also, as seen in Fig \ref{fig: mixed 2B}, - unlike the first case of mixed interaction.    When agent $A_{1}$ cooperates strongly with
agents $A_{2}$ and $A_{3}$ which are in strong competition with each other, the effect of this strong and opposite interaction in the system results in a final state in which no agent is attaining the market capacity, but each agent
nevertheless grows above its initial size;  all  three agents remained active in the market.

 A summary of the simulations of the triad interaction agents is presented in Table 1. The characteristic values pertain to agent's size initial conditions, final size and the time of convergence. It can be observed that convergence is
slower during competition,  due to the conflicting interests of interacting agents; in contrast, during cooperation, agents tend to ``agree", thereby converging within a shorter   time lapse. For the mixed interaction cases, when agent $A_{1}$ competes with agents $A_{2}$ and $A_{3}$ in cooperation, a
scenario with two collaborating  agents in conflict with one, the time of convergence is seen to be faster than when agent $A_{1}$ cooperates with agents $A_{2}$ and $A_{3}$ in competition: this can be understood  due to the
collaborative effect of mixed interactions  being higher in the first case than in the second case.

\subsection{Emphasis on the Double pair Cooperation Scenario  ($G_{3}$) with
Non-smooth Evolutions}\label{bumps}

In conclusion of this simulation results section, we would like to further emphasize the two most interesting cases  $G_{3}$ and $G_{4}$,
from a qualitative point of view in this subsection, and for a practical point of view, considering a time scale reasoning,
in the next subsection, \ref{timescale}.

 It can be usually noticed that the size evolution is rather smooth, - in fact remembering the (positive or negative)  logistic behavior found
 from Verhulst equation. However, it is worth emphasizing that the double pair cooperation ($G_{3}$) can lead to a non-smooth evolution;
 see Fig \ref{fig: mixed 2B}. Observe the figure with different initial sizes, in particular, the evolution of agent  $A_{2}$  which starts
 with the lowest initial size. Its size first increases, but reaches a maximum; thereafter,  due to the cooperation of  agent  $A_{1}$ and agent
  $A_{3}$, agent  $A_{2}$ is removed from the market, - even though agent  $A_{1}$  (which started with the biggest size) cooperates with agent
    $A_{2}$. {\it In fine}, $A_{1}$  ``prefers to cooperate" with  $A_{3}$, - and eliminate agent  $A_{2}$, because $A_{1}$  and $A_{3}$,
    starting in the most advantageous positions.

 This situation does not need to be explicitly illustrated with many practical cases; it
occurs of course in economic markets, like when two top soda companies (Coca-Cola and Pepsi-Cola, sorry for such a publicity) wish to control a country market. The same occurs in scientific competition: a well known case of war between (USA) famous laboratories occurred after the discovery of the high  $T_c$ superconducting ceramics \cite{HighTcwar}. In sport, cooperation (within theoretical competition) in order to win a race leads to temporary cooperation; see cyclism races \cite{SSJ8.91.341bicyclecoopcompet,complexityracing} or sumo  wrestling \cite{sumocompet} competitions. Competition AND cooperation between political parties in order to form a coalition have already been mentioned.

The other interesting case is found when all agents start with same sizes in Fig. \ref{fig: mixed 2B}.  They all start to grow, but the two competing agents with each other, agent  $A_{2}$ and agent  $A_{3}$,   loose their impetus to agent  $A_{1}$ however cooperating with both of them. In this case, agent $A_{2}$  and agent  $A_{3}$  are $not$ removed from the market,  but only reach some level yet above their initial size.  Of course, in so doing, agent  $A_{1}$ does not reach the full market capacity.

This  ``bumpy behavior" is reminiscent of the behavior found when, in Verhulst equation, the growth rate and/or the capacity are/is time dependent \cite {IJCAS30.14GompertzVerhulst}. Such a mapping into time dependent extensions of the parameters in Verhulst equation is of course outside the aim of the present paper and is left for further work.

\subsection{Time scale effects} \label{timescale}

Even though qualitative aspects of cooperation/competition behavior seem well described, it seems of interest to discuss whether the control parameters of the size evolution are reasonable. First recall that $\alpha$ in
Eq.(\ref{2a}) was chosen to be equal to 1. This growth rate parameter takes values of the order of 0.04  $yr^{-1}$ for  steady populations, like in USA, e.g., in the last century. Indeed, one could estimate that the possible
bearing time of a woman was about 25 years, and during that time she would bear one child who would be surviving. Therefore in a strict Verhulst model, the rise
in (population) size, going roughly from 0 to 1 on the size axis, and from 1 to 10,  on the simulation scale time axis, according to all the presented figures,
proposes a growth rate $\simeq 1/10$, - thus roughly twice as large as in reality.

It is easy to observe that the time scale due to the competition parameter is rather measured through the ratio $\alpha/k_{ij}$; see Eq.(\ref{2f}). Since we have assumed for simplicity that $k_{ij}\sim K$, the previous reasoning holds,
leading to a convincingly reasonable value of $K\simeq 1$ for most cooperation/competition scenarios in Òreal lifeÓ. It seems reasonable to consider that the simulation scale is measured in usual time spans: years to
hours. From the various examples that we have pointed out as applications, it is obvious that the cooperation/competition mixed cases occur over different time horizons, - whence scaling the various $ k_{ij}$  strengths.

\section{CONCLUSION}
\noindent In this paper, the Verhulst-Lotka-Volterra model for competition and cooperation was extended through the introduction of  some notion hereby called
``market capacity",  in place of the individual agent's own capacity, thereby imposing a limit on agent's size growth. This improves previous studies in which
agent's capacity are modeled individually, - studies which  resulted in agents unrealistically growing above their capacity in  a fully cooperative scenario.

Furthermore, a network effect is introduced through   undirected and weighted graphs, which enable  a mixed-type interactive scenario, i.e., competitive and cooperative scenarios, amongst the agents.

The  present model has emphasized the basic plaquette of a network,  a triad system; it was chosen as a simple yet complex representative of any   network through which some properties of the model  can be  investigated analytically.
In addition to this, through simulations,  dynamic changes in the agent's size and relative behavior  are observed,   for all  (4 possible)  scenarios.

We have emphasized that the initial relative sizes of agents is very relevant for the evolution of the system, leading to market sharing, or sometimes removal of agents form the ``market". Interesting scenarios occur even if the initial
size of agents are similar. When the initial sizes are quite different, the steady is of course more quickly reached. We have emphasized that in some
scenarios, a non smooth behavior can be found. The influence of initial conditions on the co-evolution of networks has been in this respect pointed out in \cite{PhA390.11.392RL}.

We consider that the model allows to describe the evolution of various types of agents, and is a basis for investigating more complex networks. We have pointed practical cases of interest
throughout the text; recall co-authorship behavior in scientific publications, political
manipulations along democratic lines, the cases of sport in which individuals from different
teams can cooperate against rivals and reach a better status, in so doing.
As pointed out by Porter: {\it ``The presence of multiple rivals and strong incentives influences  the
intensity of competition among firms/agents;   yet, competition and cooperation can coexist
because they are on different dimensions or because cooperation at some levels is part of winning
the competition at other levels"}.

Other examples where the model can be useful may be found, beside general aspects \cite{LEMitchell}, in econophysics,
like when there is cooperation in financial or food price speculation \cite{Chowduryfoodhike}, in auction collusions
\cite{auctioncooperation}, or in practical economic life, e.g. when two companies decide to tie up over the introduction
 of autonomous driving taxi \cite{UberHyundai}.

Notice that cooperation can also be corruption
\cite{sumocompet},   but can also be used to resist speculation.
The case of false,  i.e. misleading  cooperation could also be interestingly considered, but needs further work, data, and debate.

We have provided a discussion pertaining to the possible time scales and their measure in order to give some reasonable range for the parameters of the model.

A final warning: it must be noticed that the interactions  are time independent and occur only amongst agents with size similarities.

Beside  including time dependence of the interaction parameters, external field effects, memory \cite{RLNatComMemory} and learning \cite{PhA368.09.1849Lipowski}
effects could be included in further studies. Moreover, the simultaneous up-dating might be challenged for a sequential up-dating in order to find more complex behaviors. In particular, we have pointed out that  destruction of
agents may occur; in contrast network growth can allow for creation of agents. This is relevant to observe our extension of the basic VLV modeling: the  most interesting difference between agent-based herding model and Lotka-Volterra
model is the possibility of  investigating systems with a variable number of agents.

Finally, asymmetric interactions, e.g. removing the constraint due to the square of the
exponential in Eq.(\ref{2b}) would be highly interesting. Can it be {\it in fine} pointed
out that the above matrices could be asymmetric, thus sometimes, with complex eigenvalues
\cite{EPJB86.13GRMAcomplex}, whence possibly cyclic behaviors. Indeed, so called alternating
and cut-off ways of cooperation can be envisaged \cite{KaplanRuffle}. Many developments and much work are obviously ahead.

\\ \\
\noindent{\bf Acknowledgements}
\\ \\
   This work is part of activities in COST ACTION TD1210  and in COST Action
TD1306, both being gratefully acknowledged  for easing networking. In particular
MA  has benefited of  the STSM-TD1306-33054. Comments by R. Grassi are
appreciated.

\newpage

redpajama_set_name: RedPajamaArXiv


text:
\section{Introduction} \label{Intro}

In today's digital era, companies are collecting data about our online activities, browsing the Internet, posting on social media, etc. Together, such collected data make up a digital identity for each person. There is no official list of what data is collected or leaves the consumer devices, they are also confused about where they are being tracked. Across the world, people are uncomfortable with how their data is being used by companies, even when it comes to worthy causes like COVID-19 tracking. We report that consumers often have to sacrifice their privacy to access their desired services, thus leading to decreasing levels of trust. There are \emph{3 Ts} namely Tracking, Trust, and Time that reveal the trade-offs faced by consumers when using online services. This report will summarise the findings of that survey. Our report is a summary of data from Cshub \footnote{https://www.cshub.com/whitepapers}.

\section{Awareness on Social Media Tracking}

As consumers scroll through their feeds, they need to have a general awareness that companies are tracking their data. Many believe that social media companies track at least one element of their personal data. People from the Netherlands likely expect social media companies to actively collect data on their posts and only 40\% do not think their data is safe. In France, 59\% of French people are not aware that their posts are being tracked by social media companies, and 45\% of Australians agree that their data is being tracked.

There is a popular expression that \emph{if you're not paying for the product, you are the product}. The Internet provides a wealth of information and free services to consumers. But people often forget that the free service they receive from an Internet search, and social media account are being funded, and advertisers are buying access to them. From a recent report from Cambridge Analytica, the My Health Record in Australia has suffered potential data breaches, shrinking levels of privacy. Yet, many consumers are not aware of the routine private data tracking and data harvesting that is common today.

\section{Tracking a Global Pandemic like COVID-19}

Recently people have been immersed with COVID-19 news, which provides rapid updates about case counts, reopening plans, etc. Hence, just 4\% of Australians are unaware of the smartphone data collection efforts that aim to track the spread of COVID-19. In other countries like Dutch, 14\% of respondents are unaware, 35\% of Americans are unaware,  and 17\% of Germans are unaware of data tracking efforts to contain the novel coronavirus. In Australia, 19\% of people are opposed to data tracking even for the COVID-19 purpose. Hence COVID-19 is closing the data tracking education gap. Whether or not people understand which data is being tracked, they are overall unhappy about companies tracking their data, regardless of its purpose of collection. Around 91\% of people are uncomfortable with at least one kind of company tracking their data.

\section{Can Edge Analytics Protect Real-life Data}

In addition to the data collection concerns, people worry more if the data collected are used to directly make money. Around 93\% of people considered in the survey are uncomfortable with companies selling their data. Nine out of 10 Australians are upset with companies profiting using any of their collected personal data. More importantly, the sale of biometric data, passwords, and offline conversations cause the most concern at 86\% each. Hence, there is a strong need for analytics and data processing to be performed offline on the device owned by the consumers. i.e., data should not be transmitted out of the device even for authentication or for advanced analytics purposes. In the following, we brief some of the recent works that accomplish the tasks demanded by users, offline, at the device level.

Today's DL models when efficiently deployed can convert normal IoT devices into intelligent IoT devices that can solve a wide variety of problems. For example, in \cite{aics19smartspeaker}, a face recognition algorithm was trained using Deep Neural Network and deployed on their modern Alexa smart speaker prototype. This model, without disturbing the smart speaker routine, can detect and identify a human face and start the Alexa voice service only when an authorized face is present in the live video frames. Similarly, in \cite{aivision}, a DL and Open CV based object detection model was deployed in their smart speaker. Here, whenever the user calls out the command \emph{Alexa, ask Friday what she sees}, the smart speaker camera turns on and executes the deployed model and calls out the names of detected objects as a response to the user's command. The models optimized using methods such as \emph{Edge2train}  \cite{edge2trainiot2020} and \emph{RCE-NN} \cite{rcenniot2020} can run on the IoT devices. Processing data at the edge level without depending on the cloud improves latency, reduces subscription \& cloud storage costs, processing requirements, and bandwidth requirements. It also can address privacy and security issues by avoiding the transmission of sensitive or identifiable data over the network.

Hybrid or composite approaches involving conventional CV and DL should be used to take great advantage of the limited computing resource available at the edge. Such heterogeneous systems consist of a combination of multiple processors and chipsets. For example, in the Smart Hearing Aid prototype from \cite{smarthearingaid}, the users have integrated a DSP-based microphone array with a Linux SBC to perform edge level audio processing such as noise suppression, the direction of arrival estimation, etc., without depending on the internet. The IoT devices can be power efficient when the user assigns different workloads to the most efficient compute engine \cite{internetcomputing}. For Deep Learning (DL) use cases, the SIFT \cite{sift}, SURF \cite{surf}, BRIEF \cite{brief} feature descriptors need to be generally combined with traditional machine learning classification algorithms \cite{sptiot} \cite{classpercom21} such as SVMs \cite{covidaway2020}, SVRs \cite{wfiot2020}, Random Forests \cite{sramoptimized}, Decision Trees \cite{anomalies} to solve the CV problems. DL is sometimes overkilling when the given problem is simple and if it can be solved by CV techniques. Algorithms like pixel counting, SIFT, simple color thresholding are not class-specific. i.e., they are very general and perform the same for any number of images.

\section{Distrust of Social Media Providers}

Almost half of the people have doubts that their conversations and biometric data are being tracked by companies, although there is consensus as to which type of services/companies are collecting data. People from the Netherlands show the highest rate of discomfort since 90\% of people are saying they are upset with personal conversation tracking, and 88\% are uncomfortable with biometric data gathering. The majority of people from various age groups, for example, 43\% of Australians are totally not comfortable with any form of personal data collected for any purpose. The most common data that people think companies are tracking is location data. 57\% are uncomfortable with services tracking their location. Recently in \cite{nakashima_2018_ap}, Google was storing location data on smartphones even if the consumer had turned off location access.

The companies that provide us free service own our data that is generated when using their services. To give consumers control over their data being provided to companies, recently, some studies \cite{posner_2018_on} have proposed the idea that the services that collect personal data should pay the data owner (source of data generation). Although there is a provision for people to get compensated for their data, still 37\% say no, and 27\% are unsure if a one-time payment is worth the data. But for specific types of data (critical ones), 76\% of people are unwilling to sell at least one type of their data at any price. Hence, consumers value their data more than earning money.

\section{Summary}

We believe it is important to balance privacy and innovation. Consumers deserve to have control over their data, but at the same time, data is often essential to building new technologies and serving the common good like accurate tracking the spread of COVID-19. To strike a balance, organizations around the globe must embrace transparency and help their customers understand how their data is being used.

\begin{spacing}{0.92}


text:
\section{Introduction}

Similar to the classical case a quantum convolutional code (QCC)
encodes an incoming stream of quantum information into an outgoing
stream.  A basic theory of quantum convolutional codes obtained from
infinite stabilizer matrices has been developed recently, see
\cite{OlTi04}.

Only few constructions of quantum convolutional codes are known, see
\cite{Chau:98,Chau:99,AlPa04,FoGu05,FGG05,GR:2005,OlTi04}. In this
paper, we construct some new quantum convolutional codes using a
CSS-type construction which uses the same principle as the CSS
construction for block codes \cite{NC:2000}. Furthermore, we
revisit the product code construction introduced in \cite{GR:2005} and
show that for these codes the algorithm presented in \cite{GR:2006}
for computing a non-catastrophic encoder takes a particularly simple
form. This allows us to show that the depth of the encoding circuit is
polynomial in the frame size and the constraint length of the code.

\section{Quantum convolutional codes}\label{sec:qccs}
\subsection{Basic definitions}

QCCs are defined as infinite versions of quantum stabilizer codes.
The appropriate generalization of stabilizer block codes to QCCs is
provided by the polynomial formalism introduced in \cite{OlTi04}.  We
briefly sketch this approach.\footnote{We describe the approach for
  $q$ dimensional subsystems (qudits) which is a straightforward
  generalization of the binary case.}

The code is specified by its stabilizer which is a subgroup of the
infinite version ${\cal G}_{\infty}$ of the Pauli group, which consists of tensor
products of generalized Pauli matrices acting on an semi-infinite
stream of qudits. The stabilizer can be described by a matrix with
polynomial entries
\begin{equation}\label{stab-mat}
S(D)=(X(D)|Z(D))
\in{\mathbb{F}}_q[D]^{(n-k)\times 2n}.
\end{equation}

\begin{definition}\label{def:QCCparams}
  Let $\cal C$ be a QCC defined by a full-rank stabilizer matrix as in
  eq.~(\ref{stab-mat}). Then $n$ is called the frame size, $k$ the
  number of logical qudits per frame, and $k/n$ the rate of the QCC. The
  constraint lengths are defined as $\nu_i = \max_{1 \leq j \leq
    n}(\max(\deg X_{ij}(D),\deg Z_{ij}(D)))$, the overall constraint
  length is the defined as the sum $\nu = \sum_{i=1}^{n-k} \nu_i$, and
  the memory $m$ is given by $m= \max_{1 \leq i \leq n-k} \nu_i$.
\end{definition}

Like in the classical case, a QCC can also be described in terms of a
semi-infinite stabilizer matrix $S$ which has entries in ${\mathbb{F}}_q \times
{\mathbb{F}}_q$. First, we write $S(D) = \sum_{i=0}^m G_i D^i$ using $m+1$
matrices $G_0, G_1, \ldots, G_m$ which are of size $(n-k) \times n$
each.  Then we define the semi-infinite matrix
\begin{equation}\label{semi-inf}
S:=\left(
\begin{array}{cccccccc}
G_0 & G_1 & \ldots & G_m    & 0      & \ldots &        & \\
0 &   G_0 & G_1    & \ldots & G_m    & 0      & \ldots & \\
\vdots &         & \ddots & \ddots &        & \ddots &\ddots
\end{array}
\right).
\end{equation}
Note that $S$ has a block band structure where each block is of size
$(n-k)\times (m+1) n$. A useful property of $S$ is that every qudit in
the semi-infinite stream of qudits is acted upon non-trivially by only
a finite number of generators. Moreover, those generators have bounded
support.  Hence their eigenvalues can be measured as soon as the
corresponding qudits have been received.  Therefore, it is possible to
compute the error syndrome for the quantum convolutional code online.

There is a condition to check whether $S$ is well-defined, {\em i.\,e.}, if
it defines a commutative subgroup of ${\cal G}_{\infty}$ \cite{OlTi04}. If $S(D)
= (X(D) | Z(D))$ as in eq.~(\ref{stab-mat}), then the condition of
symplectic orthogonality of $S$ translates to
\begin{equation}\label{eq:symp_condition}
X(D) Z(1/D)^t - Z(D) X(1/D)^t = 0.
\end{equation}

\begin{example}
  As an example we consider the QCC defined by the stabilizer matrix
  (see \cite{FoGu05})
\[
S(D)=\left(
\begin{array}{ccc|ccc}
  1+D&   1& 1+D&  0  &  D  & D\\
    0&   D&   D& 1+D & 1+D & 1
\end{array}
\right).
\]
This code is derived from the classical ${\mathbb{F}}_4$-linear code generated
by $(1+D, 1+\omega D, 1+\omega^2 D)$. We can easily check
self-orthogonality by computing $X(D) Z(1/D)^t - Z(D) X(1/D)^t$ which
turns out to be the $2\times 2$ all zero matrix. Hence the code indeed
is self-orthogonal to all shifted versions of itself, {\em i.\,e.}, it
defines a QCC where $n=3$, $k=1$, and $m=1$. To illustrate the
structure in terms of Pauli matrices we consider the corresponding
semi-infinite stabilizer matrix, which is given (in Pauli form) as
follows:
\[
\arraycolsep0.4\arraycolsep
S=
\left(
\begin{array}{cccccccccccccc}
X&X&X&X&Z&Y& & & & & & & \\
Z&Z&Z&Z&Y&X& & & & & & & \\
 & & &X&X&X&X&Z&Y& & & & \\
 & & &Z&Z&Z&Z&Y&X& & & & \\
 & & & & & &X&X&X&X&Z&Y& \\
 & & & & & &Z&Z&Z&Z&Y&X& \\
 & & & & & & & & & & & & \ddots
\end{array}
\right)
\]
It is easy to see that the QCC corresponding to $S$ can correct an
arbitrary number of errors, as long as they do not occur in {\em
  bursts}, meaning in this example that at least six unaffected qubits
are between two erroneous ones.
\end{example}

\subsection{Encoding circuits}
In \cite{GRB:2003} it has been shown that for any block quantum
error-correcting code ${\cal C}=\QECC(n,k,d,q)$ there is quantum
circuit of polynomial size for encoding.  In order to encode $k$
qudits into $n$ qudits, the circuit acts on the $k$ input qudits and
$n-k$ ancillae which are initialized in the state $\ket{0}$.  The
input state can be described by a $Z$-only stabilizer matrix
$S_0=(X|Z)=(0|I\:0)$, where $I$ is an $(n-k)\times(n-k)$ identity
matrix.  The operation of the encoding circuit corresponds to a
transformation changing $S_0$ into the stabilizer $S$ of the quantum
code.  This idea can be adapted to quantum convolutional codes (see
\cite{GR:2006} for qubit codes).  The encoding circuit can be realized
by generalized Clifford gates whose action is summarized in
Table~\ref{table:clifford}, for the gates and the corresponding
actions, see \cite[Theorem~2]{GRB:2003}.

\begin{table}[tb]\small
\caption{\small Action of various generalized Clifford operations.
Conjugation by the unitary $U$ corresponds to the action of
$\overline{U}$ on the columns of $S(D)=(X(D)|Z(D))$.
\label{table:clifford}}
\vskip-2ex
\[\def1}\arraycolsep0.5\arraycolsep\begin{pmatrix{1.5}
\begin{array}{@{}cc@{}}
\hline
\text{unitary gate $U$} & \text{matrix $\overline{U}$}\\
\hline\\[-2ex]
\text{Fourier transform ${\rm DFT}$} &
\overline{{\rm DFT}}
={\def1}\arraycolsep0.5\arraycolsep\begin{pmatrix{1}\arraycolsep0.5\arraycolsep\begin{pmatrix}0&-1\\1&0\end{pmatrix}}\in{\mathbb{F}}_q^{2\times 2}\\[3ex]
\hline\\[-2ex]
\text{multiplication gate $M_\gamma$}&
\overline{M_\gamma}
={\def1}\arraycolsep0.5\arraycolsep\begin{pmatrix{1}\arraycolsep0.5\arraycolsep\begin{pmatrix}\gamma^{-1}&0\\0&\gamma\end{pmatrix}}\in{\mathbb{F}}_q^{2\times 2}\\[3ex]
\hline\\[-2ex]
\text{diagonal gate $P_\gamma$}&
\overline{P_\gamma}
={\def1}\arraycolsep0.5\arraycolsep\begin{pmatrix{1}\arraycolsep0.5\arraycolsep\begin{pmatrix}1&\gamma\\0&1\end{pmatrix}}\in{\mathbb{F}}_q^{2\times 2}\\[3ex]
\hline\\[-2ex]
{\rm ADD}^{(i,j+\ell n)}, i\not\equiv j\pmod n &
\overline{{\rm ADD}}=
{\def1}\arraycolsep0.5\arraycolsep\begin{pmatrix{1}\arraycolsep0.5\arraycolsep
\left(\begin{array}{@{}cc|cc@{}}
1 & D^\ell & 0         & 0\\
0 & 1      & 0         & 0\\
\hline
0 & 0      & 1         & 0\\
0 & 0      & -D^{-\ell} & 1
\end{array}\right)}\\[5ex]
\hline\\[-2ex]
P_\ell:=\text{{\rm CPHASE}}^{(i,i+\ell n)},\ell\ne 0 &
\overline{P_{\ell}}=
{\def1}\arraycolsep0.5\arraycolsep\begin{pmatrix{1}\arraycolsep0.5\arraycolsep\begin{pmatrix}
1 & D^\ell-D^{-\ell}\\
0 & 1
\end{pmatrix}}\\[3ex]
\hline
\end{array}
\]
\vskip-4.5ex
\end{table}

\begin{figure*}[hbt]
$$
\begin{array}{r|llll|l|l}
\nu & g_1(D) & g_2(D) & g_3(D) & g_4(D) & d^\bot & N_{d^\bot}\\
\hline
 3 & 1100        & 1110        & 1001        & 1101        & 3 & 2 \\
\hline
 4 & 11001       & 11101       & 10011       & 10111	   & 4 & 1 \\
 4 & 10001       & 10101       & 11011       & 11111	   & 4 & 1 \\
\hline
 5 & 110010      & 111010      & 100001      & 110111	   & 5 & 14\\
\hline
 6 & 1010010     & 1111010     & 1000101     & 1100111	   & 6 & 63\\
\hline
 7 & 10101001    & 11111001    & 10000011    & 11000111	   & 6 & 8 \\
\hline
 8 & 101100001   & 100100101   & 111110011   & 111011011   & 6 & 2 \\
\hline
 9 & 1001001001  & 1100111101  & 1110110111  & 1010101111  & 7 & 10\\
\hline
10 & 11011011001 & 10100001101 & 10011000011 & 11001001111 & 8 & 67 \\
\hline
11 & 101101100011 & 101010110011 & 111101001011 & 110001101111 & 8 & 25
\end{array}
$$
\caption{Generators for self-orthogonal binary convolutional codes of
  rate $1/4$ yielding quantum convolutional codes of rate $2/4$ found
  by random search.\label{table:QCC_CSS_1_2}}
\end{figure*}

\section{Efficient encoders for CSS type QCCs}\label{sec:CSS_codes}
The CSS-like construction of QCCs uses two classical convolutional
codes $C_1=(n,k_1)$ and $C_2=(n,n-k_2)$ with equal frame length $n$ and $C_2^\bot
\subseteq C_1$.  The stabilizer matrix $(X(D)|Z(D))$ is of block
diagonal form, given by
\begin{equation}\label{eq:CSS_code}
\left(
\begin{array}{c|c}
H_2(D) & 0\\
0      & H_1(D)
\end{array}
\right)\in {\mathbb{F}}_q[D]^{(n-k_1+k_2)\times 2n},
\end{equation}
where $H_1(D),H_2(D)$ denote parity check matrices of $C_1$ and $C_2$,
respectively.  We assume that both $H_1(D)$ and $H_2(D)$ correspond to
non-catastrophic, delay-free encoders and have full ranks $n-k_1$ and
$k_2$, respectively.  This implies that their Smith normal form is
$(I\: 0)$ with a suitable unit matrix $I$ (see
\cite[Chapter~2]{JoZi99}).  In particular there are unimodular
matrices $A_1(D)\in {\mathbb{F}}_q[D]^{k_2\times k_2}$ and $B_1(D)\in
{\mathbb{F}}_q^{n\times n}$ such that
\begin{equation}
A_1(D) H_2(D) B_1(D) = (I\: 0).
\end{equation}
There is an algorithm for computing the Smith normal form and the
transformation matrices $A_1(D)$ and $B_1(D)$ whose bit-complexity is
polynomial in the size and degree of the matrix $H_2(D)$ \cite{Ka85}.
This implies that the corresponding quantum circuit implementing the
matrix $B_1(D)$ can be realized using polynomially many generalized
Clifford gates.  The transformed stabilizer matrix is given by
\begin{equation}
(X'(D)|Z'(D))=\left(
\begin{array}{cc|c}
I & 0 & 0\\
0 & 0 & Z_2(D)
\end{array}
\right).
\end{equation}
The action of the gates results in a modified $Z$-part as well.  From
condition (\ref{eq:symp_condition}) it follows that $Z_2(D)$ is of the
form $Z_2(D)=(0\: Z'_2(D))$ with $Z_2'(D)\in{\mathbb{F}}_q[D]^{(n-k_1)\times
  (n-k_2)}$. Using Fourier transformation (DFT) gates on the last
$n-k_2$ qudits, the stabilizer matrix reads
\begin{equation}
(X'(D)|Z'(D))=\left(
\begin{array}{cc|c}
I & 0       & 0\\
0 & Z'_2(D) & 0
\end{array}
\right).
\end{equation}
Computing the Smith form of $Z'_2(D)$ yields matrices $A_2(D)$ and
$B_2(D)$ with $A_2(D)Z'_2(D)B_2(D)=(I\:0)$.  Another Fourier transform
on the first $n-k_1+k_2$ qudits yields an $Z$-only stabilizer matrix
of the form $(0|I 0)$.  The resulting quantum code encodes $k_1-k_2$
qudits per frame of size $n$. Overall, we obtain the following result.

\begin{theorem}
  Let ${\cal C}$ be a quantum convolutional code constructed using the
  CSS-like construction from two classical convolutional codes $C_1$
  and $C_2$ with stabilizer matrix as in
  eq.~(\ref{eq:CSS_code}). Denote the frame size with $n$ and the
  constraint length with $\nu$.  Then ${\cal C}$ has an encoding
  circuit whose depth is finite, {\em i.\,e.}, does not depend on the
  length of the input stream.  Furthermore, the depth of this circuit
  is upper bounded by $poly(n,\nu)$.
\end{theorem}

\section{CSS-type QCCs of rate $2/4$}
In \cite{FGG05}, optimal quantum convolutional codes of rate $1/3$ are
listed which are based on self-orthogonal binary convolutional codes
of rate $1/3$.  In order to construct quantum convolutional codes of
rate $2/4$, we search for self-orthogonal binary convolutional codes
$C$ of rate $1/4$ which have a dual code $C^\bot$ with high minimum
distance $d^\bot$.  Applying the CSS construction with
$C_1=C_2=C^\bot$, we then obtain a quantum convolutional code of rate
$2/4$ and minimum distance $d^\bot$.

The results of a randomized search for such codes is presented in
Table~\ref{table:QCC_CSS_1_2}.  The entries of the generator matrix
$g(D)=(g_1(D),g_2(D),g_3(D),g_4(D))$ of the code $C$ are given in
abbreviated form, listing the coefficients in increasing order.  For
example, the generator matrix of the first code with constraint length
$\nu=3$ is $g(D)=(1+D,1+D+D^2,1+D^3,1+D+D^3)$.  The last column lists
the number $N_{d^\bot}$ of sequences of minimum weight. Note that it
is desirable to have as few sequences of minimum weight as
possible. The size of the search space grows with $O(2^{4\nu}$), so we
have only performed an exhaustive search up to constraint length
$\nu=6$, and a randomized search for larger values of $\nu$.

\section{Efficient encoders for product codes}
\subsection{Product code construction}
The following theorem, taken from \cite{GR:2005}, allows to construct
a quantum convolutional code using a classical convolutional code and
a quantum code.
\begin{theorem}\label{th:product}
Let $C_1=(n_1,k_1)_p$ be a classical convolutional code over ${\mathbb{F}}_p$
with dual distance $d_1^\bot$ and let $G_1(D)$ be a generator matrix
of $C_1$ corresponding to a non-catastrophic, delay-free encoder.
Furthermore, let ${\cal C}$ be a quantum error-correcting code for
$q$-dimensional quantum systems ($q=p^\ell$) with minimum distance
$d_2$ and stabilizer matrix $S_2=(X|Z)$ if ${\cal C}$ is a block code
or $S_2=(X(D)|Z(D))$ if ${\cal C}$ is a convolutional code.  Then the
stabilizer matrix
\begin{equation}\label{eq:tensorprod}
G(D)=G_1(D) \otimes_p S_2
\end{equation}
defines a quantum convolutional code with minimum distance $d\le
\min(d_1^\bot,d_2)$.
\end{theorem}

The tensor product $\otimes_p$ corresponds to the Kronecker product of
the stabilizer matrices.  We use the index $p$ to stress that the
coefficients of the polynomials in the matrix $G_1(D)$ are in the
prime field ${\mathbb{F}}_p$ while the stabilizer matrix $S_2$ might be defined
over an extension field ${\mathbb{F}}_q={\mathbb{F}}_{p^\ell}$.

\subsection{Encoding product codes}
Instead of applying the general algorithm of \cite{GR:2006} to the
matrix $G(D)$ in order to compute an encoding circuit for the product
code, we will exploit the additional structure of the stabilizer
matrix.  The first step is to compute an inverse encoding circuit for
the quantum code ${\cal C}$ with stabilizer $S_2$.  The quantum
circuit corresponds to a symplectic transformation yielding the
trivial $Z$-only stabilizer $S_0=(0|I\:0)$. Note that the trivial
stabilizer is of this form, regardless whether the code ${\cal C}$ is
a block or a convolutional quantum code. Omitting the final Fourier
transformation gates in the quantum circuit, we obtain an $X$-only
stabilizer $S'_0=(I\:0|0)$.

Expanding the matrix $G_1(D)$ as semi-infinite matrix, we get the
following semi-infinite version of the stabilizer matrix $G(D)$ of
eq. (\ref{eq:tensorprod}):
\begin{small}
\[
\arraycolsep0.2\arraycolsep
\left(
\begin{array}{ccccccccc}
g_{11}S_2 & g_{12}S_2 & \ldots &g_{1,n_1} S_2\\
g_{21}S_2 & g_{22}S_2 & \ldots &g_{2,n_1} S_2\\
\vdots &\vdots&\ddots&\vdots\\
g_{k_1,1}S_2 & g_{k_1,2}S_2 & \ldots & g_{k_1,n_1} S_2\\[2ex]
&&&g_{11}S_2 & g_{12}S_2 & \ldots &g_{1,n_1} S_2\\
&&&g_{21}S_2 & g_{22}S_2 & \ldots &g_{2,n_1} S_2\\
&&&\vdots &\vdots&\ddots&\vdots\\
&&&g_{k_1,1}S_2 & g_{k_1,2}S_2 & \ldots & g_{k_1,n_1} S_2\\
&&&&&&\vdots&\ddots
\end{array}
\right)
\]
\end{small}%
This matrix indicates that we have to apply the inverse encoding
circuit of the code ${\cal C}$ to every block of qudits corresponding
to the submatrices $g_{ij}S_2$.  This first step corresponds to the
leftmost boxes marked ${\rm BC}$ in the example of
Fig.~\ref{fig:circ_prod}.  The stabilizer matrix is now of the form
\begin{equation}\label{eq:CSS_prod}
G'(D)=G_1(D)\otimes_p (I\:0|0)=(G_1(D)\otimes I | 0).
\end{equation}
This $X$-only generator matrix corresponds to a CSS code (see
eq.~(\ref{eq:CSS_code})) where
\[
H_2(D)=\left(
\begin{array}{ccc}
G_1(D)\\
& \ddots\\
&& G_1(D)
\end{array}
\right).
\]
Using the algorithm of Sect.~\ref{sec:CSS_codes}, we obtain an inverse
encoding circuit for the convolutional CSS code corresponding to
$G_1(D)$.  This circuit has to be repeated $r$ times if the identity
matrix in eq.~(\ref{eq:CSS_prod}) has rank $r$.  The $j$-th copy of this
quantum circuits acts on qudits $j,j+r,j+2r,\ldots$ (see the blocks
marked ${\rm CC}_j$ in the example of Fig.~\ref{fig:circ_prod}).
Overall, we obtain the following result.

\begin{theorem}
  Let ${\cal C}$ be a quantum convolutional code which has been
  constructed using the product code construction described in
  Theorem~\ref{th:product}. Denote the frame size with $n$ and the
  constraint length with $\nu$. Then ${\cal C}$ has an encoding
  circuit whose depth is finite, {\em i.\,e.}, does not depend on the length
  of the input stream. Furthermore, the depth of this circuit is upper
  bounded by $poly(n,\nu)$.
\end{theorem}

\subsection{QCCs from products of cyclic codes}
In \cite[Theorem 8]{GR:2005}, we have shown that product codes based
on Reed-Solomon codes achieve the upper bound on the minimum distance
of the resulting quantum code.  Here we consider the following
variant:
\begin{theorem}\label{theorem:cyclic}
Let $C$ be a cyclic code over ${\mathbb{F}}_q$ of composite length $n=n_1 n_2$
with $n_2|(q-1)$.  Furthermore, we assume that $C$ can be decomposed
as $C=C_1\otimes C_2$ where $C_2$ has generator polynomial
$g_2(X)=\prod_{i=1}^{d-1}(X-\alpha^i)$ where $d-1\le n_2/2$ and
$\alpha$ is an $n_2$-th root of unity in ${\mathbb{F}}_q$.  Then the code $C$ is
self-orthogonal and has dual distance $d^\bot \ge\min(\delta_1,d)$
where $\delta_1$ is the BCH bound of $C_1^\bot$.
\end{theorem}
\begin{proof}
The code $C_2$ is generated by
$$
G_2=\left(
\begin{array}{ccccc}
\alpha^0 & \alpha & \alpha^2 & \ldots & \alpha^{n_2-1}\\
\alpha^0 & \alpha^2 & \alpha^4 & \ldots & \alpha^{2(n_2-1)}\\
\vdots   & \vdots   & \vdots & \ddots & \vdots\\
\alpha^0 & \alpha^{d-1} & \alpha^{2(d-1)} & \ldots & \alpha^{(d-1)(n_2-1)}
\end{array}
\right).
$$
The inner product of row $i$ and row $j$ of $G_2$ is
$$
\sum_{\ell=0}^{n_2-1}\alpha^{(i+j)\ell}=0
$$
as $i+j\not\equiv 0 \bmod n_2$. Hence $C_2$ is self-orthogonal and so
is $C$.  The bound on the minimum distance follows from the
two-dimensional BCH bound \cite[p. 320]{Bla03}.
\end{proof}

Starting with a generator matrix $G=G_1\otimes G_2$ of a (permuted)
cyclic code as in Theorem~\ref{theorem:cyclic}, we can construct
convolutional quantum codes of CSS type.  The semi-infinite generator
matrix of the corresponding self-orthogonal convolutional code is
formed by the copies of the generator matrix $G$ which overlap in $\mu
n_2$ positions. For $\mu=2$ we get

\begin{small}
\begin{equation}\label{eq:QCC_cyclic}
\arraycolsep0.2\arraycolsep
\left(
\begin{array}{ccccccccc}
g_{11}G_2 & g_{12}G_2 & \ldots &g_{1,n_1} G_2\\
g_{21}G_2 & g_{22}G_2 & \ldots &g_{2,n_1} G_2\\
\vdots &\vdots&\ddots&\vdots\\
g_{k_1,1}G_2 & g_{k_1,2}G_2 & \ldots & g_{k_1,n_1} G_2\\[2ex]
&&g_{11}G_2 & g_{12}G_2 & \ldots &g_{1,n_1} G_2\\
&&g_{21}G_2 & g_{22}G_2 & \ldots &g_{2,n_1} G_2\\
&&\vdots &\vdots&\ddots&\vdots\\
&&g_{k_1,1}G_2 & g_{k_1,2}G_2 & \ldots & g_{k_1,n_1} G_2\\
&&&&&\vdots&\ddots
\end{array}
\right).
\end{equation}
\end{small}%
The inner product of any two rows of this matrix is zero, as already
$G_2\cdot G_2^t=0$.  The dual distance of the dual of the convolution
code defined by eq.~(\ref{eq:QCC_cyclic}) is lower bounded by the dual
distance of $C$, as any sequence in the dual of the convolutional code
fulfills the parity checks given by the matrix $G$.  Note that the
encoder corresponding to the matrix (\ref{eq:QCC_cyclic}) might be
catastrophic. Then, in some cases, the minimal non-catastrophic
encoder can have constraint length zero, {\em i.\,e.}, corresponds to
a block code.

\section{Example}
We illustrate the product construction and the corresponding encoding
circuit using the five qubit code $\QECC(5,1,3,2)$ and a classical
convolutional code of rate $R=2/3$.
\begin{figure}[hbt]
\unitlength0.65\unitlength
\centerline{
\inputwires[,,$\left.\ket{\phi_{\text{out}}}\rule{0pt}{45\unitlength}\right\{\!\!$](5)
\kern-15\unitlength%
\CNOT(1,4,5)%
\kern-4\unitlength%
\rlap{\OneQubitGate[3](2,2){$H$}}%
\rlap{\OneQubitGate[2](1,1){$H$}}%
\OneQubitGate(1,2){$H$}%
\kern-4\unitlength%
\rlap{\CNOT(1,2,5)}%
\rlap{\CNOT(1,3,5)}%
\CNOT(1,4,5)\kern-5\unitlength%
\kern-4\unitlength%
\rlap{\CNOT(2,3,5)}%
\rlap{\CNOT(2,4,5)}%
\CNOT(2,5,5)%
\kern-4\unitlength%
\OneQubitGate(5,5){$H$}%
\kern-4\unitlength%
\CNOT(2,5,5)\kern-5\unitlength%
\kern-4\unitlength%
\CNOT(3,4,5)%
\rlap{\OneQubitGate[1](4,4){$H$}}%
\OneQubitGate(1,1){$H$}%
\kern-4\unitlength%
\rlap{\CNOT(3,4,5)}%
\CNOT(3,5,5)
\kern-4\unitlength%
\OneQubitGate(4,5){$H$}%
\rlap{\OneQubitGate[4](1,1){$H$}}%
\rlap{\OneQubitGate[3](1,1){$H$}}%
\rlap{\OneQubitGate[2](1,1){$H$}}%
\OneQubitGate(1,2){$H$}%
\kern-7\unitlength%
\outputwires[$\ket{0}$,$\ket{0}$,$\ket{0}$,$\ket{0}$,$\ket{\phi_{\text{in}}}$](5)
\kern-13\unitlength}
\caption{Inverse Encoding Circuit for the five qubit code.\label{fig:circ5qubit}}
\end{figure}

Using the inverse encoding circuit shown in Fig.~\ref{fig:circ5qubit},
the stabilizer
\begin{eqnarray}
S&=&
\left(
\begin{array}{*5c|*5c}
1&0&0&1&0&1&1&1&1&0\\
0&1&0&0&1&0&1&1&1&1\\
1&0&1&0&0&1&0&1&1&1\\
0&1&0&1&0&1&1&0&1&1
\end{array}
\right)\label{eq:stab5qubit}
\end{eqnarray}
of the five qubit code is transformed into
\begin{eqnarray*}
S'&=&
\left(
\begin{array}{*5c|*5c}
0&0&0&0&0 &1&0&0&0&0\\
0&0&0&0&0 &0&1&0&0&0\\
0&0&0&0&0 &1&1&1&0&0\\
0&0&0&0&0 &0&1&1&1&0
\end{array}
\right).
\end{eqnarray*}
Note that the two Hadamard transforms on the fourth qubit cancel, but
when omitting the final four Hadamard transformations, we obtain an
$X$-only stabilizer.

In \cite[Table 8.14]{JoZi99} we find a nonsystematic rate
$R=2/3$ convolutional code with memory $\nu=2$ and free distance $d_{\text{free}}=3$.
An encoding matrix for that code is
\begin{eqnarray*}
G(D)&=&
\left(
\begin{array}{*3c}
  D+D^2 &   1     &  1+D^2\\
   1    & D + D^2 &  1+D+D^2
\end{array}
\right).
\end{eqnarray*}
A minimal polynomial generator matrix for the dual code is given by
\begin{eqnarray}
H(D)&=&
\left(
\begin{array}{c}
 1 + D + D^4\\
  1 + D^2 + D^3 + D^4\\
 1 + D^2 + D^4
\end{array}
\right)^t.\label{eq:conv_code}
\end{eqnarray}

If we apply our algorithm to the stabilizer code with $X$-only
stabilizer matrix $(X(D)|Z(D)):=(H(D)|0)$ we obtain the circuit shown
in Fig.~\ref{fig:class_circ}.  The resulting transformed stabilizer is
of the simple form $(XII)$

\begin{figure}[hbt]
\unitlength0,7\unitlength
\centerline{\footnotesize%
\inputwires[,$\left.\rule{0pt}{28\unitlength}\text{block}_1\right\{\!\!$,,,
$\left.\rule{0pt}{28\unitlength}\text{block}_2\right\{\!\!$,,,
$\left.\rule{0pt}{28\unitlength}\right\{\!\!$](7)%
\kern-15\unitlength%
\rlap{\CNOT(1,2,7)}%
\rlap{\CNOT(1,2,4)}%
\CNOT(1,2,1)%
\kern-4\unitlength%
\rlap{\CNOT(1,3,7)}%
\rlap{\CNOT(1,3,4)}%
\CNOT(1,3,1)%
\kern-4\unitlength%
\rlap{\CNOT(2,4,7)}%
\rlap{\CNOT(2,4,4)}%
\CNOT(2,4,1)%
\kern-4\unitlength%
\rlap{\CNOT(1,2,7)}%
\rlap{\CNOT(1,2,4)}%
\CNOT(1,2,1)%
\kern-4\unitlength%
\rlap{\CNOT(3,4,7)}%
\rlap{\CNOT(3,4,4)}%
\CNOT(3,4,1)%
\kern-4\unitlength%
\rlap{\CNOT(1,6,7)}%
\CNOT(1,6,1)\kern-10\unitlength%
\kern-4\unitlength%
\CNOT(4,9,7)%
\rlap{\CNOT(2,4,7)}%
\rlap{\CNOT(2,4,4)}%
\CNOT(2,4,1)%
\kern-4\unitlength%
\rlap{\CNOT(1,2,7)}%
\rlap{\CNOT(1,2,4)}%
\CNOT(1,2,1)%
\outputwires[$\ket{0}$,$\ket{\phi_{11}}$,$\ket{\phi_{12}}$,$\ket{0}$,$\ket{\phi_{21}}$,$\ket{\phi_{22}}$,$\ket{0}$](7)
\begin{picture}(0,0)
\put(0,-4){\makebox(0,0)[tr]{\White{\rule{300\unitlength}{100\unitlength}}}}
\end{picture}
}
\caption{Quantum circuit transforming the stabilizer
  $(X(D)|Z(D)):=(H(D)|0)$ into the simple form $(XII)$.\label{fig:class_circ}}
\end{figure}

Using the product construction, we take the tensor product of the
stabilizer matrix $S$ in eq.~(\ref{eq:stab5qubit}) and the generator
matrix $H(D)$ of the binary convolutional code in
eq.~(\ref{eq:conv_code}).  The stabilizer matrix has the form
\begin{equation}\label{eq:prod1}
S_{\text{product}}=\bigl( H(D)\otimes S_X\bigm| H(D)\otimes S_Z\bigr),
\end{equation}
where $S_X$ and $S_Z$ denote the corresponding parts of $S$.

Note that the circuit shown in Fig.~\ref{fig:circ5qubit} corresponds
to a binary symplectic matrix $T=T_1 T_2$, i.e., $S T=S'$, where $T_2$
corresponds to the last four Hadamard gates.  Replicating the circuit
without these Hadamard gates three times as indicated in
Fig.~\ref{fig:circ_prod}, we get the matrix $I_3\otimes T_1$, where
$I_3$ denotes a $3\times 3$ identity matrix.  Now the $Z$-part of the
stabilizer is zero, and the $X$-part has the form
\[
\left(
\begin{array}{c}
 1 + D + D^4\\
  1 + D^2 + D^3 + D^4\\
 1 + D^2 + D^4
\end{array}
\right)^t
\otimes
\left(
\begin{array}{*5c}
1&0&0&0&0\\
0&1&0&0&0\\
1&1&1&0&0\\
0&1&1&1&0
\end{array}
\right).
\]
So replicating the circuit of Fig.~\ref{fig:class_circ} four times
(but spread out to any every fifth qubit), we get an $X$-only stabilizer.  The
final four Hadamard gates in Fig.~\ref{fig:circ_prod} transform it
into a $Z$-only stabilizer.

The structure of the whole encoding circuit is illustrated in
Fig.~\ref{fig:circ_prod}. Only the first block is shown, but every
quantum gate in the circuit has to be applied repeatedly, shifted by
the corresponding number of qubits.  Each block encodes 11 qubits into
15. The inputs marked with $bc^{(i)}$ correspond to the input of the
$i$-th copy of the block code $[\![5,1,3]\!]$, the inputs of the four
copies of the convolutional code are marked with $cc^{(j)}$.  The
boxes marked with ${\rm BC}$ correspond to the encoder for the block
code in Fig.~\ref{fig:circ5qubit}, the blocks ${\rm CC}_j$ correspond
to the encoding circuit for the convolutional code in
Fig.~\ref{fig:class_circ}.

\begin{figure}[hbt]
\def\runter{%
\begin{picture}(20,10)
\put(0,0){\line(1,0){5}}
\put(5,-5){\oval(10,10)[tr]}
\put(15,-5){\oval(10,10)[bl]}
\put(15,-10){\line(1,0){5}}
\end{picture}%
}
\def\rauf{%
\begin{picture}(20,10)
\put(0,0){\line(1,0){5}}
\put(5,5){\oval(10,10)[br]}
\put(15,5){\oval(10,10)[tl]}
\put(15,10){\line(1,0){5}}
\end{picture}%
}

\unitlength0.44\unitlength\footnotesize%
\begin{picture}(60,300)
\multiput(0,10)(0,20){15}{\line(1,0){10}}
\thicklines
\multiput(10,5)(0,100){3}{\framebox(40,90){${\rm BC}$}}
\thinlines
\multiput(50,10)(0,20){15}{\line(1,0){10}}
\multiput(30,-20)(0,-8){3}{\makebox(0,0){.}}
\end{picture}%
\begin{picture}(100,300)
\multiput(0,10)(0,100){3}{\runter}
\multiput(20,0)(0,100){3}{\line(1,0){60}}
\multiput(80,0)(0,100){3}{\rauf}
\multiput(0,30)(0,100){3}{\runter}
\multiput(20,20)(0,100){3}{\line(1,0){60}}
\multiput(80,20)(0,100){3}{\rauf}
\multiput(0,50)(0,100){3}{\runter}
\multiput(20,40)(0,100){3}{\line(1,0){60}}
\multiput(80,40)(0,100){3}{\rauf}
\multiput(0,70)(0,100){3}{\runter}
\multiput(20,60)(0,100){3}{\line(1,0){60}}
\multiput(80,60)(0,100){3}{\rauf}
\multiput(0,90)(0,100){3}{\line(1,0){20}}
\multiput(80,90)(0,100){3}{\line(1,0){20}}
\thicklines
\put(20,-25){\line(0,1){320}}
\multiput(20,-25)(0,-6){4}{\line(0,-1){3}}
\put(20,295){\line(1,0){60}}
\put(50,280){\makebox(0,0){${\rm CC}_1$}}
\put(80,-25){\line(0,1){320}}
\multiput(80,-25)(0,-6){4}{\line(0,-1){3}}
\end{picture}%
\begin{picture}(100,300)
\multiput(0,10)(0,100){3}{\runter}
\multiput(20,0)(0,100){3}{\line(1,0){60}}
\multiput(80,0)(0,100){3}{\rauf}
\multiput(0,30)(0,100){3}{\runter}
\multiput(20,20)(0,100){3}{\line(1,0){60}}
\multiput(80,20)(0,100){3}{\rauf}
\multiput(0,50)(0,100){3}{\runter}
\multiput(20,40)(0,100){3}{\line(1,0){60}}
\multiput(80,40)(0,100){3}{\rauf}
\multiput(0,70)(0,100){3}{\line(1,0){20}}
\multiput(80,70)(0,100){3}{\line(1,0){20}}
\multiput(0,90)(0,100){3}{\runter}
\multiput(20,80)(0,100){3}{\line(1,0){60}}
\multiput(80,80)(0,100){3}{\rauf}
\thicklines
\put(20,-25){\line(0,1){320}}
\multiput(20,-25)(0,-6){4}{\line(0,-1){3}}
\put(20,295){\line(1,0){60}}
\put(50,260){\makebox(0,0){${\rm CC}_2$}}
\put(80,-25){\line(0,1){320}}
\multiput(80,-25)(0,-6){4}{\line(0,-1){3}}
\end{picture}%
\begin{picture}(100,300)
\multiput(0,10)(0,100){3}{\runter}
\multiput(20,0)(0,100){3}{\line(1,0){60}}
\multiput(80,0)(0,100){3}{\rauf}
\multiput(0,30)(0,100){3}{\runter}
\multiput(20,20)(0,100){3}{\line(1,0){60}}
\multiput(80,20)(0,100){3}{\rauf}
\multiput(0,50)(0,100){3}{\line(1,0){20}}
\multiput(80,50)(0,100){3}{\line(1,0){20}}
\multiput(0,70)(0,100){3}{\runter}
\multiput(20,60)(0,100){3}{\line(1,0){60}}
\multiput(80,60)(0,100){3}{\rauf}
\multiput(0,90)(0,100){3}{\runter}
\multiput(20,80)(0,100){3}{\line(1,0){60}}
\multiput(80,80)(0,100){3}{\rauf}
\thicklines
\put(20,-25){\line(0,1){320}}
\multiput(20,-25)(0,-6){4}{\line(0,-1){3}}
\put(20,295){\line(1,0){60}}
\put(50,240){\makebox(0,0){${\rm CC}_3$}}
\put(80,-25){\line(0,1){320}}
\multiput(80,-25)(0,-6){4}{\line(0,-1){3}}
\end{picture}%
\begin{picture}(100,300)
\multiput(0,10)(0,100){3}{\runter}
\multiput(20,0)(0,100){3}{\line(1,0){60}}
\multiput(80,0)(0,100){3}{\rauf}
\multiput(0,30)(0,100){3}{\line(1,0){20}}
\multiput(80,30)(0,100){3}{\line(1,0){20}}
\multiput(0,50)(0,100){3}{\runter}
\multiput(20,40)(0,100){3}{\line(1,0){60}}
\multiput(80,40)(0,100){3}{\rauf}
\multiput(0,70)(0,100){3}{\runter}
\multiput(20,60)(0,100){3}{\line(1,0){60}}
\multiput(80,60)(0,100){3}{\rauf}
\multiput(0,90)(0,100){3}{\runter}
\multiput(20,80)(0,100){3}{\line(1,0){60}}
\multiput(80,80)(0,100){3}{\rauf}
\thicklines
\put(20,-25){\line(0,1){320}}
\multiput(20,-25)(0,-6){4}{\line(0,-1){3}}
\put(20,295){\line(1,0){60}}
\put(50,220){\makebox(0,0){${\rm CC}_4$}}
\put(80,-25){\line(0,1){320}}
\multiput(80,-25)(0,-6){4}{\line(0,-1){3}}
\multiput(130,-20)(0,-8){3}{\makebox(0,0){.}}
\end{picture}%
\rlap{\OneQubitGate[14](1,1){\scriptsize$H$}}%
\rlap{\OneQubitGate[13](1,1){\scriptsize$H$}}%
\rlap{\OneQubitGate[12](1,1){\scriptsize$H$}}%
\OneQubitGate(1,12){\scriptsize$H$}%
\outputwires[$\ket{0}$,$\ket{0}$,$\ket{0}$,$\ket{0}$,%
$bc^{(1)}$,$cc^{(1)}$,$cc^{(2)}$,$cc^{(3)}$,$cc^{(4)}$,%
$bc^{(2)}$,$cc^{(1)}$,$cc^{(2)}$,$cc^{(3)}$,$cc^{(4)}$,%
$bc^{(3)}$](15)%
\vskip30\unitlength

\caption{Schematic inverse encoding circuit for the quantum
  convolutional code of rate $R=11/15$ obtained by the product code
  from the quantum block code $\QECC(5,1,3,2)$ and a classical
  convolutional code with rate $R=2/3$.
\label{fig:circ_prod}}
\end{figure}

\enlargethispage{-17mm}

\section{Conclusions}

The problem of constructing quantum convolutional codes and their
encoders was addressed. Using a CSS-type construction, we derived new
examples of QCCs of rate $2/4$. For constraint lengths up to $\nu=6$ we
performed an exhaustive search of the search space, and for constraint
lengths up to $11$ we employed a randomized search which found several
good codes. Using a product code construction which takes as inputs a
classical convolutional code on the one hand and a quantum block code
on the other, it is possible to derive many examples of QCCs. We show
that these codes all have the property that their encoder is of
polynomial depth. We conjecture that any stabilizer QCC has a
polynomial depth encoder. It seems that a more detailed study of the
algorithm given in \cite{GR:2006}, which is based on iterative Smith
normal form computation on the stabilizer matrix, would be required to
resolve this question.