# Flexible involutive meadows

Emanuele Bottazzi and Bruno Dinis

###### Abstract.

We investigate a notion of inverse for neutrices inspired by Van den Berg and
Koudjeti’s decomposition of a neutrix as the product of a real number and an
idempotent neutrix. We end up with an algebraic structure that can be
characterized axiomatically and generalizes involutive meadows. The latter are
algebraic structures where the inverse for multiplication is a total
operation. As it turns out, the structures satisfying the axioms of flexible
involutive meadows are of interest beyond nonstandard analysis.

##  1\. Introduction

Neutrices and external numbers (which can be seen as translations of neutrices
over the hyperreal line) were introduced by Van den Berg and Koudjeti in [16]
as models of uncertainties, in the context of nonstandard analysis, and
further developed in [15, 18, 8, 7, 11]. Neutrices were named after and
inspired by Van der Corput’s groups of functions [19] in an attempt to give a
mathematically rigorous formulation to the art of neglecting small quantities
– _ars negligendi_.

One of the long-standing open questions in the theory of external numbers is
the definition of a suitable notion of inverse of a neutrix. For zeroless
external numbers, that is, external numbers that don’t contain $0$ and
therefore cannot be reduced to a neutrix, there is a notion of inverse,
defined from the Minkowski product between sets (see Definition 2.4 below),
but this cannot be generalized to neutrices.

A meadow (see Sections 2.1 and 2.2 below for further details) is a commutative
ring with a multiplicative identity element and a total multiplicative inverse
operation. Two of the main classes of meadows are involutive meadows, where
the inverse of zero is defined to be zero, and common meadows, that instead
introduce an error term that propagates through calculations [4].

One of the motivations for the study of structures where the inverse of zero
is defined comes from equational theories [5, 14, 17]. For instance, Ono and
Komori introduced such structures motivated from the algebraic study of
equational theories and universal theories of fields, and free algebras over
all fields, respectively. A long-standing result by Birkhoff states that
algebraic structures with an equational axiomatization – namely, whose axioms
only involve equality, besides the functions and constants of the structure
itself – are closed under substructures. Algebraic structures where the
inverse is defined only for nonzero elements are not equational, since they
have to use inequalities or quantifiers in their definition of a
multiplicative inverse. Instead, involutive meadows and common meadows, that
define the inverse of zero as zero or a new error term, respectively, admit
equational axiomatizations.

Equational axiomatizations of meadows based on known algebraic structures,
such as $\mathbb{Q}$ and $\mathbb{R}$, are also of interest to computer
science. According to Bergstra and Tucker [5], such equational axiomatizations
allow for simple term rewriting systems and are easier to automate in formal
reasoning.

Another motivation for the study of meadows is a philosophical interest in the
definition of an inverse of zero (see e.g. [3, Section 3]). If one wants to
assign a meaning to expressions such as $0^{-1}$ or $1/0$ (Bergstra and
Middleburg argue that, in principle, these two operations need to be
distinguished [3]), the theory of meadows allows for two main options: $(i)$
involutive meadows which define $0^{-1}=0$, resulting into an equational
theory closer to that of the original structure, $(ii)$ common meadows which
define $0^{-1}$ as a new error term that propagates through calculations.

It turns out that external numbers are particularly suitable for expressing
the kind of concepts involved in the definition of the inverse of zero. The
key insight is that, being convex subgroups of the hyperreal numbers (i.e. the
extension of the real number system which includes nonstandard elements such
as infinitesimals), neutrices are “error” terms, which can also be seen as
generalized zeros and are therefore suitable to build models of meadows. The
fact that one is using hyperreals (or other non-archimedean field extensions
of the real numbers) is crucial, because the real numbers only have two convex
subgroups: $\\{0\\}$ and $\mathbb{R}$, while in the context of the hyperreals
there are countably infinitely many, e.g. the set of all infinitesimals –
denoted $\oslash$ – and the set of all limited numbers – denoted $\pounds$
(see the examples after Definition 2.1). In turn, external numbers are of the
form $a+A$, where $a$ is a hyperreal number and $A$ is a neutrix and can
therefore be seen as translations of neutrices. According to the
interpretation of neutrices as error terms or generalized zeroes, external
numbers can be interpreted as expressing a quantity with a degree of
uncertainty.

By introducing an alternative way to define the inverse of a neutrix, inspired
by a result by Van den Berg and Koudjeti [16] stating that every neutrix can
be decomposed as the product of an hyperreal number and an idempotent neutrix,
we end up with an algebraic structure that can be characterized axiomatically
and generalizes involutive meadows. Since the new class of structures involves
error terms, we call it _flexible involutive meadow_ , in the spirit of [13].

##  2\. Preliminary notions

In this section we recall the axioms of common meadows and involutive meadows,
with some comments, as well as some background on the external numbers.

###  2.1. Involutive meadows

The axioms of involutive meadows are listed in Figure 1.

$(\mathrm{I}_{1})$ |  | $(x+y)+z=x+(y+z)$ |
---|---|---|---
$(\mathrm{I}_{2})$ |  | $x+y=y+x$ |
$(\mathrm{I}_{3})$ |  | $x+0=x$ |
$(\mathrm{I}_{4})$ |  | $x+(-x)=0$ |
$(\mathrm{I}_{5})$ |  | $(x\cdot y)\cdot z=x\cdot(y\cdot z)$ |
$(\mathrm{I}_{6})$ |  | $x\cdot y=y\cdot x$ |
$(\mathrm{I}_{7})$ |  | $1\cdot x=x$ |
$(\mathrm{I}_{8})$ |  | $x\cdot(y+z)=x\cdot y+x\cdot z$ |
$(\mathrm{I}_{9})$ |  | $(x^{-1})^{-1}=x$ |
$(\mathrm{I}_{10})$ |  | $x\cdot(x\cdot x^{-1})=x$ |
Figure 1. Axioms for involutive meadows

The term _involutive_ refers to the fact that taking inverses is an
involution, as postulated by axiom $(\mathrm{I}_{9})$. With the exception of
axiom $(\mathrm{I}_{10})$, the remaining axioms are quite standard, as they
postulate the existence of operations of addition $+$ and multiplication
$\cdot$ which are associative, commutative, admit a neutral element (denoted
$0$ and $1$ respectively). Furthermore, there is an inverse for addition and
multiplication is distributive with respect to addition.

Axiom $(\mathrm{I}_{10})$ replaces the more usual $x\cdot x^{-1}=1$, which is
false for $x=0$. This hints at the fact that one should not take the
definition of $a^{-1}$ as the number satisfying $a\cdot a^{-1}=1$. This also
ties in with rejecting division as the “inverse” of multiplication.

###  2.2. Common meadows

The axioms of common meadows are listed in Figure 2 (see also [4]).

$(\mathrm{M}_{1})$ |  | $(x+y)+z=x+(y+z)$ |
---|---|---|---
$(\mathrm{M}_{2})$ |  | $x+y=y+x$ |
$(\mathrm{M}_{3})$ |  | $x+0=x$ |
$(\mathrm{M}_{4})$ |  | $x+(-x)=0\cdot x$ |
$(\mathrm{M}_{5})$ |  | $(x\cdot y)\cdot z=x\cdot(y\cdot z)$ |
$(\mathrm{M}_{6})$ |  | $x\cdot y=y\cdot x$ |
$(\mathrm{M}_{7})$ |  | $1\cdot x=x$ |
$(\mathrm{M}_{8})$ |  | $x\cdot(y+z)=x\cdot y+x\cdot z$ |
$(\mathrm{M}_{9})$ |  | $-(-x)=x$ |
$(\mathrm{M}_{10})$ |  | $x\cdot x^{-1}=1+0\cdot x^{-1}$ |
$(\mathrm{M}_{11})$ |  | $(x\cdot y)^{-1}=x^{-1}\cdot y^{-1}$ |
$(\mathrm{M}_{12})$ |  | $(1+0\cdot x)^{-1}=1+0\cdot x$ |
$(\mathrm{M}_{13})$ |  | $0^{-1}=\mathbf{a}$ |
$(\mathrm{M}_{14})$ |  | $x+\mathbf{a}=\mathbf{a}$ |
Figure 2. Axioms for common meadows

As with involutive meadows, some of the axioms are quite standard (namely
$(\mathrm{M}_{1})-(\mathrm{M}_{3})$, $(\mathrm{M}_{5})-(\mathrm{M}_{7})$,
$(\mathrm{M}_{8})$, $(\mathrm{M}_{9})$, and $(\mathrm{M}_{11})$), as they
postulate the existence of operations of addition $+$ and multiplication
$\cdot$ which are associative, commutative and admit a neutral element
(denoted $0$ and $1$ respectively). Furthermore, there is an inverse for
addition, multiplication is distributive with respect to addition and the
inverse of the product of two elements is the product of the inverses.

Axiom $(\mathrm{M}_{4})$ postulates the existence of a sort of additive
inverse for every element $x$ but with the caveat that the result of operating
an element with its inverse is not the neutral element $0$ but $0\cdot x$.

Axioms $(\mathrm{M}_{10})$ and $(\mathrm{M}_{12})$ concern further properties
of the inverse for multiplication. The novelty, compared with more familiar
settings, is that they have “error” terms in the form of the product of an
element $x$, (respectively, its inverse $x^{-1}$) by $0$.

Axiom $(\mathrm{M}_{13})$ defines $0^{-1}$ as an ”error term” $\mathbf{a}$
that does not belong to the initial structure. Due to the presence of this
error term, the result of $x\cdot x^{-1}$ is defined as $1+0\cdot x^{-1}$. If
$x\neq 0$ and $x\neq\mathbf{a}$, then $0\cdot x^{-1}=0$ (see [4, Proposition
2.3.1]) and we recover the usual result that holds in a field. If $x=0$ or
$x=\mathbf{a}$, then the additional term $0\cdot x^{-1}$ is equal to
$\mathbf{a}$.

Axiom $(\mathrm{M}_{12})$ has a similar motivation: if $x\neq\mathbf{a}$, then
we recover that the inverse of $1$ is $1$. If $x=\mathbf{a}$, then we get that
the inverse of $\mathbf{a}$ is $\mathbf{a}$ itself.

###  2.3. External numbers

Let us recall some definitions and results about neutrices and external
numbers. We will use $\,\\!{}^{\ast}\mathbb{R}$ to denote an extension of the
real number system that includes nonstandard elements – such as infinitesimals
– [12], and $\mathbb{R}$ to denote the usual set of real numbers.111Note that
this notation differs from the usual presentations of external numbers,
according to which $\mathbb{R}$ already contains nonstandard elements.

######  Definition 2.1 (Neutrices).

A _neutrix_ is a convex subset of $\,\\!{}^{\ast}\mathbb{R}$ that is a
subgroup for addition.

Some simple examples of neutrices are:

  * •

$\oslash=\\{x\in\,\\!^{\ast}\mathbb{R}:x\simeq 0\\}$;

  * •

$\pounds=\\{x\in\,\\!^{\ast}\mathbb{R}:x\text{ is finite}\\}$;

  * •

if $\varepsilon\simeq 0$,
$\varepsilon\pounds=\left\\{x\in\,\\!^{\ast}\mathbb{R}:\frac{x}{\varepsilon}\text{
is finite}\right\\}$.

We are using the notation $x\simeq 0$ to say that $x$ is _infinitesimal_. We
will also write $x\simeq y$, and say that $x$ is _infinitely close_ to $y$, if
$x-y\simeq 0$.

######  Definition 2.2 (External numbers).

An _external number_ $\alpha$ is the sum of a hyperreal number $a$ and a
neutrix $A$ in the following sense:

$\alpha=a+A=\\{a+r:r\in A\\}.$

An external number $\alpha=a+A$ that is not reduced to a neutrix
(equivalently, such that $0\not\in\alpha$) is said to be _zeroless_.

The sum and product of external numbers is introduced in the following
definition. We refer to [11] for their properties. We will however recall some
of them which will be useful later on.

######  Definition 2.3.

For $a,b\in\,\\!^{\ast}\mathbb{R}$ and $A,B\subseteq\,\\!^{\ast}\mathbb{R}$
(not necessarily neutrices), we define the Minkowski sum and product

$\displaystyle(a+A)+(b+B)$ $\displaystyle=(a+b)+(A+B)$
$\displaystyle(a+A)\cdot(b+B)$ $\displaystyle=ab+aB+bA+AB,$

where

$\displaystyle A+B$ $\displaystyle=\\{x+y:x\in A\land y\in B\\}$
$\displaystyle aB$ $\displaystyle=\\{ay:y\in B\\}$ $\displaystyle AB$
$\displaystyle=\\{xy:x\in A\land y\in B\\}.$

It is also possible to define a notion of division between subsets of
hyperreal numbers, even if they contain $0$.

######  Definition 2.4.

For $A,B\subseteq\,\\!^{\ast}\mathbb{R}$ (not necessarily neutrices), we
define

${A}\cdot{B}^{-1}=\\{x:xB\subseteq A\\}.$

Usually, the operation ${A}\cdot{B}^{-1}$ is written as $\frac{A}{B}$. Here we
chose the inverse notation since we are investigating structures related to
meadows, whose axioms are commonly stated in terms of the inverse operation.
For further discussion on the use of these operations, see [3].

Notice that Definition 2.4 doesn’t allow us to obtain a _proper_ inverse of a
neutrix. In fact, if $A=\\{1\\}$ and $B$ is a neutrix, ${A}\cdot{B}^{-1}$ is
empty, since for no $x$ we have $0x\in A$. This example motivated us to look
for alternative definitions of inverses of a neutrix.

If $x=a+A$ is zeroless, then ${a}^{-1}\cdot{A}\subseteq A$, and therefore
${a}^{-1}\cdot{A}+A=A$. In fact, ${a}^{-1}\cdot{A}\subseteq\oslash$.

######  Proposition 2.5 ([11, Theorem 1.4.2]).

Let $x=a+A$ be a zeroless external number. Then

${x}^{-1}=(a+A)^{-1}={a}^{-1}+{a}^{-2}\cdot{A}.$

######  Proposition 2.6.

Let $x,y,z\in\mathbb{E}$, be such that $x=a+A$. Then

  1. (1)

$x+(y+z)=(x+y)+z$

  2. (2)

$x+y=y+x$

  3. (3)

$x+A=x$

  4. (4)

$x+(-x)=A$

  5. (5)

$(x\cdot y)\cdot z=x\cdot(y\cdot z)$

  6. (6)

$x\cdot y=y\cdot x$

  7. (7)

$x\cdot(y+z)=x\cdot y+x\cdot z+A\cdot y+A\cdot z$

  8. (8)

$(x^{-1})^{-1}=x$.

##  3\. Flexible involutive meadows

A neutrix $I$ is said to be _idempotent_ if $I\cdot I=I$. As showed by Van den
Berg and Koudjeti in [16] (see also [9]) every neutrix is a multiple of an
idempotent neutrix.

######  Theorem 3.1 ([16, Theorem 7.4.2]).

Let $N$ be a neutrix. Then, there exists a hyperreal number $r$ and a unique
idempotent neutrix $I$ such that $N=r\cdot I$.

We use the previous result to define inverses for neutrices.

######  Definition 3.2.

Let $x=a+A$, where $A=r\cdot I$, for some hyperreal number $r$ and idempotent
neutrix $I$. We define the _inverse_ of $x$, denoted $x^{-1}$ as follows:

$x^{-1}=\begin{cases}{a}^{-1}+{a}^{-2}\cdot{A}&\text{, if }a\neq 0\\\
{r}^{-1}\cdot I&\text{, otherwise}.\end{cases}$

In the decomposition $N=r\cdot I$ of Theorem 3.1, the idempotent neutrix $I$
is uniquely determined, but the number $r$ is not. Nevertheless, the inverse
given in Definition 3.2 is uniquely defined, as a consequence of the next
proposition.

######  Proposition 3.3.

If $r\neq s$ satisfy $N=r\cdot I=s\cdot I$, then also ${r}^{-1}\cdot
I={s}^{-1}\cdot I$.

###### Proof.

We may assume, without loss of generality that $0<r<s$, which implies that
${s}^{-1}<{r}^{-1}$. Suppose towards a contradiction that ${r}^{-1}\cdot
I\neq{s}^{-1}\cdot I$. By our assumptions over $r$ and $s$, this implies
${s}^{-1}\cdot I\subsetneq{r}^{-1}\cdot I$. Then, there exists some $i\in I$
such that $i\cdot r^{-1}\not\in s^{-1}\cdot I$. If we multiply by $r$, we
obtain

$i\not\in s^{-1}\cdot(r\cdot I)=s^{-1}\cdot(s\cdot I)=I,$

which contradicts the assumption that $i\in I$. Hence ${r}^{-1}\cdot
I={s}^{-1}\cdot I$. ∎

Alternatively, since there are countably many non-isomorphic neutrices [18],
an application of the Axiom of Countable Choice would allow us to choose a
canonical representative for the element $r$ in the decomposition of Theorem
3.1. This is sufficient to uniquely determine $r$ and to also guarantee that
Definition 3.2 is well-posed.

We show that the external numbers equipped with the inverse defined in
Definition 3.2 satisfy the axioms given in Figure 3, where $N(x)$ denotes the
neutrix part of the external number $x$. As such, one can also think of $N(x)$
as an error term, or a generalized zero, such that every $x$ decomposes
uniquely as $x=r+N(x)$ with $N(r)=0$. We call any structure satisfying the
axioms in Figure 3 a _flexible involutive meadow_.

$(\mathrm{FI}_{1})$ |  | $(x+y)+z=x+(y+z)$ |
---|---|---|---
$(\mathrm{FI}_{2})$ |  | $x+y=y+x$ |
$(\mathrm{FI}_{3})$ |  | $x+N(x)=x$ |
$(\mathrm{FI}_{4})$ |  | $x+(-x)=N(x)$ |
$(\mathrm{FI}_{5})$ |  | $(x\cdot y)\cdot z=x\cdot(y\cdot z)$ |
$(\mathrm{FI}_{6})$ |  | $x\cdot y=y\cdot x$ |
$(\mathrm{FI}_{7})$ |  | $\left(1+{N(x)}\cdot{x^{-1}}\right)\cdot x=x$ |
$(\mathrm{FI}_{8})$ |  | $x\cdot(y+z)=x\cdot y+x\cdot z+N(x)\cdot y+N(x)\cdot z$ |
$(\mathrm{FI}_{9})$ |  | $(x^{-1})^{-1}=x$ |
$(\mathrm{FI}_{10})$ |  | $x\cdot(x\cdot x^{-1})=x$ |
Figure 3. Axioms for flexible involutive meadows

These axioms provide a generalization of the axioms of involutive meadows
given in Figure 1. The difference between involutive meadows and flexible
involutive meadows is that we replace $0$ by generalized zeroes $N(x)$; $1$ by
a generalized $1$ (i.e. $1$ plus an error term of the form $N(x)$); and
distributivity by a generalized form of distributivity which holds for
external numbers. Notice that, in the context of the external numbers, the
generalized zeroes take the form of neutrices. Moreover, $N(x)\cdot
y+N(x)\cdot z$ is a neutrix, so the error term in the generalized
distributivity axiom is once again a neutrix. In fact, if one interprets
$N(x)$ as being $0$, for all $x$, then one recovers the axioms for involutive
meadows.

We now want to prove that the external numbers with the usual addition and
multiplication and with the inverse defined by (3.2) satisfy the axioms for
flexible involutive meadows. In order to prove this result, we will use the
following properties of the inverse of a neutrix.

######  Lemma 3.4.

Let $x=N(x)=r\cdot I$, with $I$ an idempotent neutrix. Then:

  1. (1)

$(1+x\cdot x^{-1})\cdot x=x$;

  2. (2)

$(x^{-1})^{-1}=x$;

  3. (3)

$x\cdot(x\cdot x^{-1})=x$

###### Proof.

  1. (1)

We have that $x\cdot x^{-1}=N(x)\cdot x^{-1}=I$. Hence

$(1+x\cdot x^{-1})\cdot x=(1+I)\cdot(r\cdot I)=r\cdot I+r\cdot I^{2}=r\cdot
I=x.$

  2. (2)

We have

$(x^{-1})^{-1}=(r^{-1}I)^{-1}=(r^{-1})^{-1}I=rI=x.$

  3. (3)

We have

$x\cdot(x\cdot x^{-1})=rI\cdot(rI\cdot r^{-1}I)=rI\cdot I=rI=x.\qed$

As proved below, the external numbers satisfy an additional property related
to the following _Inverse Law_ of involutive meadows:

$x\neq 0\Rightarrow x\cdot x^{-1}=1$

Involutive meadows that satisfy the Inverse Law are called _cancellation
meadows_ and are of particular interest. In fact, in [1] it is proved that
every involutive meadow is a subdirect product of cancellation meadows.

In the setting of flexible involutive meadows, the inverse law is more
suitably expressed by its flexible counterpart:

(3.1) $x\neq N(x)\Rightarrow x\cdot x^{-1}=1+e,$

where $e$ is an error term such that $1+e$ is not an error term.

Moreover, by part 3 and part 4 of Proposition 2.6 the external numbers satisfy
the following arithmetical properties that generalize the properties of
arithmetical meadows [3]

$\begin{split}(\mathrm{A}_{1})&\qquad x+(-x)=N(x)\\\ (\mathrm{A}_{2})&\qquad
x+N(x)=x.\end{split}$

######  Theorem 3.5.

The external numbers with the usual addition and multiplication and with the
inverse introduced in Definition 3.2 satisfy the axioms for flexible
involutive meadows plus the Flexible Inverse Law given by (3.1) and the
arithmetical properties $(\mathrm{A}_{1})$ and $(\mathrm{A}_{2})$.

###### Proof.

By Proposition 2.6, in order to show that the external numbers are a flexible
involutive meadow we only need to verify $(\mathrm{FI}_{7})$ and
$(\mathrm{FI}_{10})$. If $x$ is a neutrix, both axioms hold due to Lemma 3.4.
Assume that $x=a+A$ is zeroless. Then, using the algebraic properties of the
external numbers one derives

$\begin{split}(1+N(x)\cdot x^{-1})\cdot
x&=\left(1+A\left({a}^{-1}+{a}^{-2}\cdot{A}\right)\right)(a+A)\\\
&=\left(1+\left({a}^{-1}\cdot A+{a^{-2}}\cdot{A^{2}}\right)\right)(a+A)\\\
&=a+A+{a}^{-1}\cdot{A^{2}}+A+{a}^{-1}\cdot{A^{3}}\\\ &=a+A=x.\end{split}$

Hence $(\mathrm{FI}_{7})$ holds. As regarding $(\mathrm{FI}_{10})$ one has

$x(x\cdot
x^{-1})=(a+A)\left(1+{a}^{-1}\cdot{A}\right)=a+A+A+{a}^{-1}\cdot{A^{2}}=a+A=x.$

Hence $(\mathrm{FI}_{10})$ also holds and therefore the external numbers are a
flexible involutive meadow.

We now show the Flexible Inverse Law. Let $x=a+A$ be a zeroless external
number. Then

$x\cdot x^{-1}=1+a^{-1}\cdot A+a^{-1}\cdot
A+{a^{-2}}\cdot{A^{2}}=1+a^{-1}\cdot A.$

Since $x$ is zeroless, $a^{-1}\cdot A\subseteq\oslash$, so the Flexible
Inverse Law is satisfied. ∎

######  Corollary 3.6.

The axioms for flexible involutive meadows are consistent.

###  3.1. Some properties of flexible involutive meadows

We now prove some basic properties of flexible involutive meadows. We start by
showing an additive cancellation law and that $N(\cdot)$ is idempotent for
addition.

######  Proposition 3.7.

Let $M$ be a flexible involutive meadow and let $x,y,z\in M$. Then

  1. (1)

$x+y=x+z$ if and only if $N(x)+y=N(x)+z.$

  2. (2)

$N(x)+N(x)=N(x)$.

###### Proof.

  1. (1)

Suppose firstly that $x+y=x+z$. Then

$N(x)+y=-x+x+y=-x+x+z=N(x)+z.$

Suppose secondly that $N(x)+y=N(x)+z$. Then

$x+y=x+N(x)+y=x+N(x)+z=x+z.$

  2. (2)

This follows from applying part 1 to axiom $(\mathrm{FI}_{3})$. ∎

In order to prove other basic properties that allow to operate with the
$N(\cdot)$ function and with additive inverses one needs to assume the
following two extra axioms

$\begin{split}(\mathrm{N}_{1})&\qquad N(x+y)=N(x)\vee N(x+y)=N(y)\\\
(\mathrm{N}_{2})&\qquad N(-x)=N(x)\end{split}$

######  Proposition 3.8.

Let $M$ be a flexible involutive meadow satisfying also $(\mathrm{N}_{1})$ and
$(\mathrm{N}_{2})$, and let $x,y,z\in M$. Then

  1. (1)

$N(x+y)=N(x)+N(y)$.

  2. (2)

$N(N(x))=N(x)$.

  3. (3)

If $x=N\left(y\right)$, then $x=N\left(x\right)$.

  4. (4)

$-(-x)=x$.

  5. (5)

$-(x+y)=-x-y$.

  6. (6)

$N(x)=-N(x)$.

###### Proof.

  1. (1)

One has

$x+y+N(x)+N(y)=x+N(x)+y+N(y)=x+y.$

Then by part 1

(3.2) $N(x+y)+N(x)+N(y)=N(x+y).$

By $(\mathrm{N}_{1})$ one has $N(x+y)=N(x)$ or $N(x+y)=N(y)$. Suppose that
$N(x+y)=N(x)$. Then by (3.2) and Proposition 3.7,

$N(x+y)=N(x)+N(x)+N(y)=N(x)+N(y).$

If $N(x+y)=N(y)$ the proof is analogous.

  2. (2)

Using Proposition 3.7 and part 1 we have

$N(N(x))=N(x-x)=N(x)+N(-x)=N(x)+N(x)=N(x).$

  3. (3)

Using part 2 we derive that $N(x)=N(N(y))=N(y)=x$.

  4. (4)

We have that

$N(-(-x))=N(-x)=N(x)=-x+x.$

Hence

$-(-x)=-(-x)+N(-(-x))=-(-x)-x+x=N(-x)+x=N(x)+x=x.$

  5. (5)

By part 1

$-(x+y)+x+y=N(x+y)=N(x)+N(y)=-x+x-y+y=-x-y+x+y.$

Then by Proposition 3.7

$-(x+y)+N(x+y)=-x-y+N(x+y).$

Again using part 1 one obtains

$-(x+y)+N(-(x+y))=-x-y+N(-x)+N(-y)=-x+N(-x)-y+N(-y).$

Hence $-(x+y)=-x-y.$

  6. (6)

By part 4 we have

$N(x)=-x+x=-x-(-x)=-(x-x)=-N(x).\qed$

###  3.2. Involutive flexible meadows are varieties

In [1], Bergstra and Bethke studied the relations between involutive meadows
and varieties. One of their results is that involutive meadows are varieties.
We prove that involutive flexible meadows are also varieties.

Let us start by recalling the definition of varieties in this context,
following [6].

######  Definition 3.9.

If $\mathcal{F}$ is a signature, then an _algebra_ $A$ of type $\mathcal{F}$
is defined as an ordered pair $(A,F)$, where $A$ is a nonempty set and $F$ is
a family of finitary operations on $A$ in the language of $\mathcal{F}$ such
that, for each $n$-ary function symbol $f$ in $\mathcal{F}$, there is an
$n$-ary operation $f^{A}$ on $A$.

######  Definition 3.10.

A nonempty class $K$ of algebras of the same signature is called a _variety_
if it is closed under subalgebras, homomorphic images, and direct products.

A result by Birkhoff entails that $K$ is a variety if and only if it can be
axiomatized by identities.

######  Definition 3.11.

Let $\Sigma$ be a set of identities over the signature $\mathcal{F}$; and
define $M(\Sigma)$ to be the class of algebras $A$ satisfying $\Sigma$. A
class $K$ of algebras is an _equational class_ if there is a set of identities
$\Sigma$ such that $K=M(\Sigma)$. In this case we say that $K$ is defined, or
axiomatized, by $\Sigma$.

######  Theorem 3.12.

$K$ is a variety if and only if it is an equational class.

The class $K$ of flexible involutive meadows is axiomatized by the identities
in Figure 3 over the signature
$\Sigma=\\{+,\cdot,-,\mbox{}^{-1},0,1,N(\cdot)\\}$, where $N$ is a unary
function that, when interpreted with the external numbers, corresponds to the
neutrix part of a number $x$. As a consequence of Birkhoff’s theorem, we have
the following result.

######  Corollary 3.13.

Involutive flexible meadows are varieties.

###  3.3. Involutive flexible meadows and commutative von Neumann regular
rings

In the investigation of meadows, the relations with commutative von Neumann
regular rings with a multiplicative identity element seem to be of particular
interest [2, 3].

We recall that a semigroup $(S,\cdot)$ is said to be _Von Neumann regular_ if

$\forall x\in S\,\exists y\in S\left(x\cdot x\cdot y=x\right).$

A commutative von Neumann regular ring with a multiplicative identity is a Von
Neumann regular commutative semigroup for both addition and multiplication.

Involutive flexible meadows are also commutative von Neumann regular rings
with a multiplicative identity element.

######  Proposition 3.14.

Let $M$ be an involutive flexible meadow. Then $M$ is a Von Neumann regular
commutative semigroup for both addition and multiplication.

###### Proof.

This is a simple consequence of associativity together with axioms
$(\mathrm{FI}_{4})$ and $(\mathrm{FI}_{10})$. ∎

In [2, Lemma 2.11] it was shown that commutative von Neumann regular rings can
be expanded in a unique way to an involutive meadows. Since involutive meadows
are also flexible involutive meadows, von Neumann regular rings can be
expanded to flexible involutive meadows. The expansion to flexible involutive
meadows might not be unique, though, due to the presence of different error
terms.

Further research on the connection between commutative von Neumann regular
rings and flexible involutive meadows goes beyond the scope of this paper.

###  3.4. Solids are involutive flexible meadows

We finish this section by showing that instead of working with the external
numbers, one can use a purely algebraic approach by working with a structure
called a _solid_. For a full list of the solid axioms we refer to the appendix
in [10] or [7].

The following proposition compiles some results from [7, Propositions 2.12,
4.8 and Theorem 2.16] and [8, Proposition 4.12] which we use to show that
solids are flexible involutive meadows.

######  Proposition 3.15.

Let $S$ be a solid and let $x,y,z\in S$.

  1. (1)

If $x=e(x)$, then $e(xy)=e(x)y$.

  2. (2)

If $x\neq e(x)$, then $u(x)e(x)=xe(u(x))=e(x)$.

  3. (3)

$x(z+e(y))=xz+xe(y)$.

  4. (4)

If $x\neq e(x)$, then $d(d(x))=x$.

######  Theorem 3.16.

Every solid is a flexible involutive meadow.

###### Proof.

Let $S$ be a solid. Most of the axioms of flexible involutive meadows are also
axioms of solids, by considering $N(x)=e(x)$, $-x=s(x)$, $x^{-1}=d(x)$, and
$1=u$. The only non-obvious cases are the cases of axioms $(\mathrm{FI}_{7})$,
$(\mathrm{FI}_{9})$ and $(\mathrm{FI}_{10})$.

For axiom $(\mathrm{FI}_{7})$, if $x\neq e(x)$, using the solid axioms and
Proposition 3.15 we obtain

$(1+N(x)\cdot x^{-1})\cdot x=x+e(x)d(x)x=x+e(x)u(x)=x+e(x)=x.$

If $x=e(x)$, the result follows from Lemma 3.4(1).

Axiom $(\mathrm{FI}_{9})$ follows from Lemma 3.4(2), if $x=e(x)$ and from
Proposition 3.15(4).

Finally, axiom $(\mathrm{FI}_{10})$ follows easily from the solid axioms if
$x\neq e(x)$ and from Lemma 3.4(3) if $x=e(x)$. ∎

As it turns out, and as mentioned above, one is not forced to work in a
nonstandard setting. Indeed, any non-archimedean ordered field yields a model
of flexible involutive meadows.

Let $\mathbb{F}$ be a non-archimedean ordered field. Let $\mathcal{C}$ be the
set of all convex subgroups for addition of $\mathbb{F}$ and $Q$ be the set of
all cosets with respect to the elements of $\mathcal{C}$. In [10] the elements
of $\mathcal{C}$ were called _magnitudes_ and $Q$ was called the _quotient
class_ of $\mathbb{F}$ with respect to $\mathcal{C}$. In the same paper it was
also shown that the quotient class of a non-archimedean field is a solid.
Hence we have following corollary.

######  Corollary 3.17.

The quotient class of a non-archimedean ordered field is a flexible involutive
meadow.

##  4\. Further models for meadows using external numbers

In the introduction we claimed that the external numbers are particularly
suitable for expressing the kind of concepts involved in the definition of the
inverse of zero. In order to support that claim, we explore further models for
meadows inspired by the external numbers. We start by building a model for
involutive flexible meadows over a finite field $\mathbb{F}$ and proceed by
constructing a model for common meadows over $\,\\!{}^{\ast}\mathbb{R}$.

###  4.1. Finite models of flexible involutive meadows

In this subsection we show that any finite field can be extended to a finite
model of an involutive flexible meadow.

######  Definition 4.1.

Given a finite field $\mathbb{F}$ we define $\widehat{\mathbb{F}}$ as follows.

  * •

For every $a\in\mathbb{F}$, we set $\widehat{a}=a+\oslash$ and
$\widehat{\mathbb{F}}=\\{\widehat{a}:a\in\mathbb{F}\\}$.

  * •

For every nonzero $a\in\mathbb{F}$, we set
$\widehat{a}^{-1}=\widehat{a^{-1}}$.

  * •

$(\widehat{0})^{-1}=\widehat{0}$ (this definition is motivated by, and indeed
coincides with the one in Definition 3.2).

  * •

The sum and product over $\widehat{\mathbb{F}}$ are the Minkowski operations
introduced in Definition 2.3.

######  Lemma 4.2.

The operations in $\widehat{\mathbb{F}}$ are compatible with those in
$\mathbb{F}$.

###### Proof.

Let $a,b\in\mathbb{F}$. Then

$\widehat{a+b}=(a+b)+\oslash=(a+\oslash)+(b+\oslash)=\widehat{a}+\widehat{b}.$

Since $a\cdot\oslash=b\cdot\oslash=\oslash$ we also have

$\widehat{a\cdot b}=a\cdot
b+\oslash=(a+\oslash)\cdot(b+\oslash)=\widehat{a}\cdot\widehat{b}.$

Moreover, if $a\neq 0$, then
$\widehat{a}^{-1}=\widehat{a^{-1}}=a^{-1}+\oslash$. ∎

######  Theorem 4.3.

Let $\mathbb{F}$ be a finite field. Then $\widehat{\mathbb{F}}$ satisfies the
axioms for flexible involutive meadows.

###### Proof.

If $x\neq\widehat{0}$, the axioms are satisfied since $\mathbb{F}$ is a field
and the operations in $\widehat{\mathbb{F}}$ are compatible with the ones in
$\mathbb{F}$.

If $x=\widehat{0}$, axioms $(\mathrm{I}_{1})-(\mathrm{I}_{8})$ follow from the
fact that $\mathbb{F}$ is a field.

As for axiom $(\mathrm{I}_{9})$, if $x=\widehat{0}$, then $\widehat{0}^{\
-1}=\widehat{0}$, so that $(\widehat{0}^{\ -1})^{-1}=\widehat{0}^{\
-1}=\widehat{0}$.

Finally, for axiom $(\mathrm{I}_{10})$, if $x=\widehat{0}$, then
$\widehat{0}\cdot\widehat{0}^{\ -1}=0$. ∎

######  Remark 4.4.

Similar models for involutive meadows can be obtained without recurring to
infinitesimals, as one could define the alternative model $\tilde{\mathbb{F}}$
by requiring the existence of an element $E\notin\mathbb{F}$ and defining, for
each $a\in\mathbb{F}$ the element $\tilde{a}=a+E$ and the set
$\tilde{\mathbb{F}}:=\\{\tilde{a}:a\in\mathbb{F}\\}$ with the operations

$\tilde{a}+\tilde{b}=(a+E)+(b+E)=(a+b)+E,$

(note that, in particular $E+E=(0+E)+(0+E)=(0+0)+E=0+E=E$),

$\tilde{a}\cdot\tilde{b}=(a+E)\cdot(b+E)=(a\cdot b)+E$

and

$\tilde{a}^{-1}=a^{-1}+E$

and, finally,

$\tilde{0}^{-1}=0+E=\tilde{0}.$

By adding $E$ and defining $0^{-1}=E$, the resulting structure is a common
meadow. If, alternatively, we were to define $0^{-1}=0$, the resulting
structure is an involutive meadow.

###  4.2. A model for common meadows based on $\mathbb{R}$

In this section we introduce a model $\widehat{\mathbb{R}}$ for the axioms of
common meadows given in Figure 2. In our model, the elements of $\mathbb{R}$
will be represented by external numbers, while $\,\\!{}^{\ast}\mathbb{R}$ will
act as an inverse of (the representative of) $0$. The fact that the inverse of
$0$ has, in a sense, the maximum possible uncertainty is in good accord with
both the intuition that division by $0$ introduces an error term, and to the
common practice of having the inverse of $0$ not being a member of the
original field [4].

The inverse of $\,\\!{}^{\ast}\mathbb{R}$ is again $\,\\!{}^{\ast}\mathbb{R}$.
This choice can be justified in two ways. We can interpret
$\,\\!{}^{\ast}\mathbb{R}^{-1}$ as the smallest neutrix collecting all the
inverses of the elements of $\,\\!{}^{\ast}\mathbb{R}$ or, alternatively,
since $0\in\,\\!^{\ast}\mathbb{R}$, the inverse of $\,\\!{}^{\ast}\mathbb{R}$
should also be maximal.

######  Definition 4.5.

We define the set $\widehat{\mathbb{R}}$ as follows:

  * •

For every $r\in\mathbb{R}$, we set
$\widehat{r}=r+\oslash\in\widehat{\mathbb{R}}$.

  * •

$\,\\!{}^{\ast}\mathbb{R}\in\widehat{\mathbb{R}}$.

  * •

For every nonzero $r\in\mathbb{R}$, we set
$\widehat{r}^{-1}=\widehat{1}\cdot{\widehat{r}^{-1}}$ (with the quotient
introduced in Definition 2.4).

  * •

We define $(\widehat{0})^{-1}=\,\\!^{\ast}\mathbb{R}$ and
$\,\\!{}^{\ast}\mathbb{R}^{-1}=\,\\!^{\ast}\mathbb{R}$.

  * •

The sum and product over $\widehat{\mathbb{R}}$ are the Minkowski operations
introduced in Definition 2.3.

In the construction of real numbers as limits of Cauchy sequences, a real
number can be seen as being determined up to “infinitesimals”, i.e. up to a
sequence converging to $0$. In the model of common meadows introduced in the
previous definition, this idea is expressed by the representation of $r$ as
$\hat{r}=r+\oslash$.

An immediate consequence of the previous definition is that for every
$x\in\widehat{\mathbb{R}}$ we have

(4.1)
$x+(\widehat{0})^{-1}=(\widehat{0})^{-1}+x=x\cdot(\widehat{0})^{-1}=(\widehat{0})^{-1}\cdot
x=\,\\!^{\ast}\mathbb{R}.$

In the next lemma, we establish that the operations in $\widehat{\mathbb{R}}$
are compatible with those in $\mathbb{R}$.

######  Lemma 4.6.

For every $r,s\in\mathbb{R}$,

  * •

$\widehat{r+s}=\widehat{r}+\widehat{s}$;

  * •

$\widehat{r\cdot s}=\widehat{r}\cdot\widehat{s}$.

Moreover, for every nonzero $r\in\mathbb{R}$,
$\widehat{r}^{-1}=\widehat{r^{-1}}$.

###### Proof.

The first two properties are a consequence of the following equalities

$\widehat{r+s}=r+s+\oslash=(r+\oslash)+(s+\oslash)=\widehat{r}+\widehat{s}.$

and, taking into account that $r$ and $s$ are real numbers,

$\widehat{r\cdot s}=r\cdot
s+\oslash=(r+\oslash)\cdot(s+\oslash)=\widehat{r}\cdot\widehat{s}.$

As for the inverse, if $r\neq 0$, $\widehat{r^{-1}}=\frac{1}{r}+\oslash$,
whereas, by Proposition 2.5,

$\widehat{r}^{-1}=\frac{1+\oslash}{r+\oslash}=(1+\oslash)\left(\frac{1}{r}+\frac{\oslash}{r^{2}}\right)=(1+\oslash)\left(\frac{1}{r}+\oslash\right)=\frac{1}{r}+\oslash.\qed$

######  Corollary 4.7.

For every $r\in\mathbb{R}$,

  1. (1)

if $r\neq 0$, then $\widehat{r}\cdot\widehat{r}^{-1}=\widehat{1}$;

  2. (2)

if $r\neq 0$, then $\widehat{0}\cdot\widehat{r}^{-1}=\widehat{0}$;

  3. (3)

$\widehat{1}=\widehat{1}+\widehat{0}\cdot\widehat{r}$;

  4. (4)

$\widehat{r}+\,\\!^{\ast}\mathbb{R}=\,\\!^{\ast}\mathbb{R}+\widehat{r}=\,\\!^{\ast}\mathbb{R}$
and
$\widehat{r}\cdot\,\\!^{\ast}\mathbb{R}=\,\\!^{\ast}\mathbb{R}\cdot\widehat{r}=\,\\!^{\ast}\mathbb{R}$.

  5. (5)

$\,\\!{}^{\ast}\mathbb{R}+\,\\!^{\ast}\mathbb{R}=\,\\!^{\ast}\mathbb{R}-\,\\!^{\ast}\mathbb{R}=\,\\!^{\ast}\mathbb{R}\cdot\,\\!^{\ast}\mathbb{R}=\,\\!^{\ast}\mathbb{R}$.

Equalities (1)–(3) in Corollary 4.7 can be obtained from the corresponding
equalities for real numbers by repeated use of Lemma 4.6.

######  Theorem 4.8.

$\widehat{\mathbb{R}}$ is a model of axioms
$(\mathrm{M}_{1})$–$(\mathrm{M}_{14})$ of common meadows.

###### Proof.

We start by showing that axiom $(\mathrm{M}_{1})$ is satisfied. If $x,y$ and
$z$ are different from $\,\\!{}^{\ast}\mathbb{R}$, then this is a consequence
of Lemma 4.6. If at least one of $x,y$ and $z$ is equal to
$\,\\!{}^{\ast}\mathbb{R}$, then both sides of the equality evaluate to
$\,\\!{}^{\ast}\mathbb{R}$ by Corollary 4.7. The proof follows similar steps
for axioms $(\mathrm{M}_{2})-(\mathrm{M}_{9})$. Note that, for axiom
$(\mathrm{M}_{8})$, we use also the fact that we have only one order of
magnitude besides $\,\\!{}^{\ast}\mathbb{R}$.

Let us show that axiom $(\mathrm{M}_{10})$ is satisfied. If $x=\widehat{0}$:

$\widehat{0}\cdot(\widehat{0})^{-1}=\,\\!^{\ast}\mathbb{R}=\widehat{1}+\widehat{0}\cdot\,\\!^{\ast}\mathbb{R}.$

If $x=\,\\!^{\ast}\mathbb{R}$: as a consequence of the definition of
$\,\\!{}^{\ast}\mathbb{R}^{-1}$, we have

$\,\\!{}^{\ast}\mathbb{R}\cdot\,\\!^{\ast}\mathbb{R}^{-1}=\,\\!^{\ast}\mathbb{R}=\widehat{1}+\widehat{0}\cdot\,\\!^{\ast}\mathbb{R}=\widehat{1}+\widehat{0}\cdot\,\\!^{\ast}\mathbb{R}^{-1}.$

We now turn to axiom $(\mathrm{M}_{11})$. If $x,y$ are not equal to $0$ nor to
$\,\\!{}^{\ast}\mathbb{R}$, the axiom holds as a consequence of Lemma 4.6.
Otherwise, due to the definition of the inverse, both sides are equal to
$\,\\!{}^{\ast}\mathbb{R}$.

For axiom $(\mathrm{M}_{12})$, if $x=\widehat{r}$ for some $r\in\mathbb{R}$,
the axiom holds as a consequence of Corollary 4.7 (3). If
$x=\,\\!^{\ast}\mathbb{R}$, then

$(\widehat{1}+\widehat{0}\cdot\,\\!^{\ast}\mathbb{R})^{-1}=(1+\,\\!^{\ast}\mathbb{R})^{-1}=\,\\!^{\ast}\mathbb{R}^{-1}=\,\\!^{\ast}\mathbb{R}=\widehat{1}+\,\\!^{\ast}\mathbb{R}=\widehat{1}+\widehat{0}\cdot\,\\!^{\ast}\mathbb{R}.$

Axiom $(\mathrm{M}_{13})$ is satisfied as a consequence of the definition of
$(\widehat{0})^{-1}$. Finally, axiom $(\mathrm{M}_{14})$ is satisfied as a
consequence of (4.1). ∎

##  5\. Final remarks and open questions

In this paper we have introduced the notion of flexible involutive meadow, by
means of an equational axiomatization, and constructed some models based on
the external numbers and non-archimedean fields. We have also shown a model
for common meadows based on the real numbers and of involutive meadows based
on finite fields. We would like to point out that, with similar techniques,
one could also obtain meadows based on rational numbers.

The model for common meadows developed in Section 4.2 suggests that it is
possible to study a flexible version of common meadows, in the spirit of what
has been done in Section 3 for involutive meadows. In order to do so, it is
possible to adapt the axioms by replacing $0$ with $N(x)$, where $N(x)$ is an
error term analogous to that of flexible involutive meadows.

In the context of external numbers, where $N(x)$ is the neutrix part of $x$,
and for zeroless $x$, one has the inclusion $N(x)\subseteq x\cdot\oslash$.
This grounds the interpretation of the flexible counterparts of axioms
($\mathrm{M}_{4}$), ($\mathrm{M}_{10}$) and ($\mathrm{M}_{12}$). Moreover, as
in the model discussed in Section 4.2, the element $\mathbf{a}$ can be taken
as $\,\\!{}^{\ast}\mathbb{R}$.

To conclude, we mention some possible directions of future work.

We would like to study related variants of meadows as well as their algebraic
properties. For example, the study of _flexible_ cancellation meadows, i.e.
meadows in which the multiplicative cancellation axiom

$x\neq 0\land x\cdot y=x\cdot z\Rightarrow y=z$

or its flexible counterpart (where we substitute $0$ by an error term $e$)
holds; or _flexible_ arithmetical meadows in the sense of [3]; or _flexible_
meadows of rational numbers (see e.g. [5]).

Are flexible arithmetical meadows, i.e. flexible meadows satisfying
$(\mathrm{A}_{1})$ and $(\mathrm{A}_{2})$ (necessarily) connected with
nonstandard models of arithmetic? As for the flexible meadows of rational
numbers, are they a minimal algebra? If so, that might provide a connection
with data types. Finally, the study of other algebraic concepts, such as
morphisms and ideals which are paramount in many algebraic frameworks, are
also natural lines of research in the context of flexible meadows.

### Acknowledgments

The first author acknowledges the support of FCT - Fundação para a Ciência e
Tecnologia under the projects: UIDP/04561/2020 and UIDP/04674/2020, and the
research centers CMAFcIO – Centro de Matemática, Aplicações Fundamentais e
Investigação Operacional and CIMA – Centro de Investigação em Matemática e
Aplicações.

The authors are grateful to Imme van den Berg for valuable comments on a
preliminary version of this paper.

## References

  * [1] Jan A. Bergstra and Inge Bethke.  Subvarieties of the variety of meadows.  Scientific Annals of Computer Science, 27(1):1–18, 2017.
  * [2] Jan A. Bergstra, Yoram Hirshfeld, and John V. Tucker.  Meadows and the equational specification of division.  Theoretical Computer Science, 410(12):1261–1271, 2009.
  * [3] Jan A. Bergstra and Cornelis A. Middelburg.  Inversive meadows and divisive meadows.  Journal of Applied Logic, 9(3):203–220, 2011.
  * [4] Jan A. Bergstra and Alban Ponse.  Division by Zero in Common Meadows, pages 46–61.  Springer International Publishing, Cham, 2015.
  * [5] Jan A. Bergstra and John V. Tucker.  The rational numbers as an abstract data type.  J. ACM, 54(2):7–es, apr 2007.
  * [6] Stanley Burris and Hanamantagouda P. Sankappanavar.  A Course in Universal Algebra.  2012\.
  * [7] Bruno Dinis and Imme van den Berg.  Characterization of distributivity in a solid.  Indagationes Mathematicae, 29, Issue 2:580–600.
  * [8] Bruno Dinis and Imme van den Berg.  Algebraic properties of external numbers.  J. Log. Anal., 3:9:1–30., 2011.
  * [9] Bruno Dinis and Imme van den Berg.  Axiomatics for the external numbers of nonstandard analysis.  J. Logic & Analysis, 9(7):1–47, 2017.
  * [10] Bruno Dinis and Imme van den Berg.  On the quotient class of non-archimedean fields.  Indagationes Mathematicae, 28(4):784–795, 2017.
  * [11] Bruno Dinis and Imme van den Berg.  Neutrices and external numbers: a flexible number system.  Monographs and Research Notes in Mathematics. CRC Press, Boca Raton, FL, 2019.  With a foreword by Claude Lobry.
  * [12] R. Goldblatt.  Lectures on the Hyperreals: An Introduction to Nonstandard Analysis.  Graduate Texts in Mathematics, 188. Springer, New York, 1998.
  * [13] Júlia Justino and Imme van den Berg.  Cramer’s rule applied to flexible systems of linear equations.  Electron. J. Linear Algebra, 24(Special issue for the 2011 Directions in Matrix Theory Conference):126–152, 2012/13.
  * [14] Yuichi Komori.  Free algebras over all fields and pseudo-fields.  1975\.
  * [15] Fouad Koudjeti.  Elements of External Calculus with an application to Mathematical Finance, Ph.D. thesis.  Labyrinth publications. Capelle a/d IJssel, The Netherlands, 1995.
  * [16] Fouad Koudjeti and Imme van den Berg.  Neutrices, external numbers, and external calculus.  In F. and M. Diener, editors, Nonstandard analysis in practice, Universitext, pages 145–170. Springer, Berlin, 1995.
  * [17] Hiroakira Ono.  Equational theories and universal theories of fields.  Journal of the Mathematical Society of Japan, 35(2):289 – 306, 1983\.
  * [18] Imme van den Berg.  A decomposition theorem for neutrices.  Annals of Pure and Applied Logic, 161:7:851 – 865, 2010.
  * [19] Johannes G. van der Corput.  Introduction to the neutrix calculus.  J. Analyse Math., 7:281–399, 1959/1960.


# Deterministic Hadamard gate for microwave “cat-state” qubits in cQED

Simon E. Nigg<EMAIL_ADDRESS>Department of Physics, University of
Basel, Klingelbergstrasse 82, CH-4056 Basel, Switzerland

###### Abstract

We propose the implementation of a deterministic Hadamard gate for logical
photonic qubits encoded in superpositions of coherent states of a harmonic
oscillator. The proposed scheme builds on a recently introduced set of
conditional operations in the strong dispersive regime of circuit QED [Z.
Leghtas et al. Phys. Rev. A. 87 (2013)]. We further propose an architecture
for coupling two such logical qubits and provide a universal set of
deterministic quantum gates. Based on parameter values taken from the current
state of the art, we give estimates for the achievable gate fidelities
accounting for fundamental gate imperfections and finite coherence time due to
photon loss.

##  I Introduction

While digital (discrete) information encoding is classically advantageous over
analog (continuous) information encoding, this is no longer true in the
quantum case. Indeed, even when information is encoded into eigenstates of
operators with a discrete spectrum, the principle of superposition allows for
a continuum of errors. This has been recognized early on and it was shown that
continuous variable quantum computation is theoretically as powerful as
discrete variable quantum computation Lloyd and Braunstein (1999). Encoding an
effective two-level system into the large Hilbert space of a continuous
variable system, such as that of a harmonic oscillator, may even be more
advantageous by allowing for more compact information processing and error
correction schemes Gottesman  _et al._ (2001).

The last decade has witnessed steady improvements in coherence times of
quantum superconducting circuits Paik  _et al._ (2011); Rigetti  _et al._
(2012), as well as significant advances in quantum coherent frequency
conversion between the optical and microwave frequency ranges Andrews  _et
al._ . These developments have revived interest in the possibility, originally
proposed in the context of linear optics Ralph  _et al._ (2003), of encoding
information in superpositions of coherent states of light known as cat-states
Brune  _et al._ (1992); Deléglise  _et al._ (2008), in reference to
Schrödinger’s famous thought experiment Schroedinger (1935). The linear
scaling of the decoherence rate with the size of such states, in this case the
average number of photons, is an obvious drawback of such a scheme. However,
recently a proposal for encoding, manipulating and protecting information in
photon number parity eigenstates of microwaves dispersively coupled to a
superconducting qubit has been put forward Leghtas  _et al._ (2013a);
Mirrahimi  _et al._ . This provides an exciting new development in the field
of coherent state quantum computing.

In this work we follow an alternative route to implement a universal set of
quantum gates for coherent state qubits. In particular we provide a fully
deterministic Hadamard gate, the fidelity of which is characterized for
realistic parameters by solving the Lindblad master equation numerically,
accounting for the effects of photon loss in the dispersive coupling regime.
Probabilistic Hadamard gates for coherent state qubits have been proposed in
the linear optics regime in Refs. Jeong and Kim, 2002; Marek and Fiurášek,
2010; Ralph  _et al._ , 2003; Lund  _et al._ , 2008 and implemented in Ref.
Tipsmark  _et al._ , 2011.

##  II System & model

The system we consider, called a 3D-transmon Paik  _et al._ (2011), consists
of a Josephson junction antenna, dipole-coupled to the electric field of a
microwave resonator as illustrated in Fig. 1.

Figure 1: (Color online) (a) A superconducting dipole antenna with a Josephson
Junction (JJ) at its center (transmon) is coupled to the quantized electric
field $\bm{E}$ inside a three dimensional microwave resonator. (b) Schematics
of the spectra of the cavity (upper panel) and transmon (lower panel) in the
strong dispersive regime.

Approximating the non-linear Josephson oscillator by a two-level system,
consisting of its two lowest eigenstates $\ket{g}$ and $\ket{e}$, we model
this system by the following Hamiltonian Blais  _et al._ (2004); Koch  _et
al._ (2007); Schuster  _et al._ (2007)

${\bm{H}}_{0}=\omega_{c}{\bm{a}}^{\dagger}{\bm{a}}+\frac{\omega_{eg}}{2}{\bm{\sigma}}^{z}-\raisebox{1.50696pt}{$\chi$}{\bm{a}}^{\dagger}{\bm{a}}{\bm{\sigma}}^{z}.$
(1)

Here ${\bm{a}}$ annihilates a photon in the cavity mode with frequency
$\omega_{c}$ and ${\bm{\sigma}}^{z}=\ket{e}\bra{e}-\ket{g}\bra{g}$ is a
standard Pauli operator for the two-level system with transition frequency
$\omega_{eg}$. This model is valid in the dispersive (i.e. off-resonant)
single mode coupling regime $\raisebox{1.50696pt}{$\chi$}/\Delta\ll 1$ and for
photon numbers satisfying $n\ll n_{\rm
crit}=\Delta/\raisebox{1.50696pt}{$\chi$}$, with
$\Delta=|\omega_{c}-\omega_{eg}|$. It is convenient to transform to a rotating
frame via the transformation

$\bm{U}(t)=\exp\left[-i\left(\frac{\omega_{eg}}{2}{\bm{\sigma}}^{z}+(\omega_{c}+\raisebox{1.50696pt}{$\chi$}){\bm{a}}^{\dagger}{\bm{a}}\right)t\right].$
(2)

From now on we thus consider the Hamiltonian in this rotating frame which
reads

${\bm{H}}_{0}=-2\raisebox{1.50696pt}{$\chi$}{\bm{a}}^{\dagger}{\bm{a}}\ket{e}\bra{e}.$
(3)

In addition we shall consider the following (classical) drive terms for the
cavity ($\bm{H}_{\rm c}$) and the qubit ($\bm{H}_{\rm q}$), which in the
rotating frame read

$\displaystyle\bm{H}_{\rm q}(t)$
$\displaystyle=\sum_{j=1}^{N_{0}}\frac{\Omega_{j}(t)}{2}\left(e^{i(\Delta^{(j)}_{\rm
qd}t+\delta_{j})}{\bm{\sigma}}^{-}+h.c.\right)$ (4) $\displaystyle\bm{H}_{\rm
c}(t)$
$\displaystyle=\sum_{j=1}^{N_{0}}\varepsilon_{j}(t)\left(e^{i(\Delta^{(j)}_{\rm
cd}t+\mu_{j})}{\bm{a}}+h.c.\right).$ (5)

Here $\Delta_{\rm qd}^{(j)}=\nu_{j}-\omega_{eg}$ and $\Delta_{\rm
cd}^{(j)}=\eta_{j}-\omega_{c}-\raisebox{1.50696pt}{$\chi$}$, where
$\Omega_{j}$ and $\varepsilon_{j}$ are the drive strengths, $\nu_{j}$ and
$\eta_{j}$ the drive frequencies and $\delta_{j}$ and $\mu_{j}$ the drive
phases.

Starting from this model, it was proposed in Leghtas  _et al._ (2013a) and
demonstrated experimentally in Vlastakis  _et al._ (2013), how to
deterministically prepare superpositions of coherent states of the cavity
field, also known as cat-states. This is made possible because although $\chi$
is small compared with the detuning between the cavity and the transmon, it is
many orders of magnitude larger than the linewidths of the transmon and cavity
resonances, respectively given by $\gamma$ and $\kappa$ (See Fig. 1 (b)). This
spectral resolution enables selective rotations of the transmon conditioned on
the number of photons in the cavity and selective displacement operations of
the cavity field conditioned on the state of the transmon Leghtas  _et al._
(2013a).

In this work we account for the effects of photon loss in the Lindblad master
equation formalism. We shall assume that the transmon is $T_{1}$-limited, i.e.
that the intrinsic dephasing rate $\gamma_{\varphi}=0$ and that the relaxation
rate is solely due to the Purcell effect Blais  _et al._ (2004); Koch  _et
al._ (2007), i.e. that $\gamma=(\raisebox{1.50696pt}{$\chi$}/\Delta)\kappa$.
The (zero-temperature) master equation for the density matrix thus takes the
form 111The Lamb-shift is implicitly absorbed into a renormalization of the
cavity and qubit transition frequencies.

$\dot{\rho}=-i[\bm{H},\rho]+\kappa\mathcal{D}[{\bm{a}}]\rho+\gamma\mathcal{D}[{\bm{\sigma}^{-}}]\rho,$
(6)

with
$\mathcal{D}[{\bm{A}}]\rho=(2\bm{A}\rho\bm{A}^{\dagger}-{\bm{A}}^{\dagger}\bm{A}\rho-\rho{\bm{A}}^{\dagger}\bm{A})/2$
and $\bm{H}=\bm{H}_{0}+\bm{H}_{\rm q}+\bm{H}_{\rm c}$. This equation is solved
numerically using the Python library QuTip Johansson  _et al._ (2012).

We follow the notation introduced in Ref. Leghtas  _et al._ , 2013a and denote
by $\bm{D}^{j}_{\alpha}$ a displacement of the cavity field by the amplitude
$\alpha$, conditioned on the transmon being in state
$\ket{j}\in\\{\ket{g},\ket{e}\\}$. Similarly, a rotation of the transmon by an
angle $\theta$ around the axis
$\hat{n}_{\phi}=\cos(\phi)\hat{x}+\sin(\phi)\hat{y}$, conditioned on there
being $n$ photons in the cavity is denoted with $\bm{X}^{n}_{\theta,\phi}$.
Finally, $\bm{\Pi}^{e}$ denotes the photon number parity operator conditioned
on the transmon being in the excited state $\ket{e}$. Ideally, these
operations are given by

$\displaystyle\bm{D}^{j}_{\alpha}$
$\displaystyle=\exp(\alpha{\bm{a}}^{\dagger}-\alpha^{*}{\bm{a}})\otimes\ket{j}\bra{j}+\openone\otimes\ket{\overline{j}}\bra{\overline{j}}$
(7) $\displaystyle\bm{X}^{n}_{\theta,\phi}$
$\displaystyle=\ket{n}\bra{n}\otimes
e^{i\frac{\theta}{2}\hat{n}_{\phi}\cdot\vec{\bm{\sigma}}}+\sum_{m\not=n}\ket{m}\bra{m}\otimes\openone$
(8) $\displaystyle\bm{\Pi}^{e}$
$\displaystyle=\exp(i\pi{\bm{a}}^{\dagger}{\bm{a}})\otimes\ket{e}\bra{e}+\openone\otimes\ket{g}\bra{g},$
(9)

where we used the notation $\overline{g}=e$, $\overline{e}=g$. Operations (7)
and (8) can be realized by appropriately applying the drive terms $\bm{H}_{\rm
q}$ and $\bm{H}_{\rm c}$ while operation (9) is realized by letting the
dispersive term (3) act alone for a time
$T_{\pi}=\pi/(2\raisebox{1.50696pt}{$\chi$})$ Leghtas  _et al._ (2013a, b);
Vlastakis  _et al._ (2013). Pulse imperfections and non-orthogonality of
coherent states with finite amplitudes result in small corrections as
described in more details in the supplementary material of Ref. Vlastakis  _et
al._ , 2013.

##  III Coherent state qubits

In binary quantum logic, the two computational states may be encoded in any
two mutually orthogonal states. Even in the case of discrete variable quantum
computation there thus exists a continuum of possible encodings. In the
discrete variable case, the computational states are typically chosen to be
the ground and the first excited states of the system representing the qubit.
This choice is advantageous because these states are stationary, i.e. their
time evolution is given by a (trivial) phase factor and relaxation provides a
natural way to reset the qubit. Different types of encodings have been
considered also for continuous variables and it has been shown theoretically
that universal quantum computation is possible also in this case Lloyd and
Braunstein (1999). Of interest here is the continuous variable encoding of
information in superpositions of coherent states of a harmonic oscillator,
first proposed in Ralph  _et al._ (2003) and Gilchrist  _et al._ (2004) in the
context of linear optics. Importantly, coherent states (with non-zero
amplitude) are not eigenstates of the harmonic oscillator Hamiltonian
$\bm{H}_{\rm osc}=\omega{\bm{a}}^{\dagger}{\bm{a}}$, but under the action of
the latter their phase evolves periodically as $\ket{\alpha(t)}=\exp[-i\omega
t{\bm{a}}^{\dagger}{\bm{a}}]\ket{\alpha(0)}=\ket{e^{-i\omega t}\alpha(0)}$; a
property which is made use of in the implementation of the photon number
parity gate $\bm{\Pi}^{e}$ given above. Coherent states are often described as
classical states of light owing to the fact that they are steady state
solutions of the damped, classically driven, harmonic oscillator. The latter
property lies at the heart of recent proposals to stabilize superpositions of
coherent states – clearly non-classical states of light – by engineering an
appropriate dissipative environment Everitt  _et al._ ; Mirrahimi  _et al._ .
Finally, two coherent states of finite amplitude are never truly orthogonal
since
$\braket{\alpha}{\beta}=\exp[-(|\alpha|^{2}+|\beta|^{2}-\alpha^{*}\beta-\alpha\beta^{*})/2]$.

Coherent states have interesting relaxation and coherence properties Haroche
and Raimond (2006). Being eigenstates of the photon annihilation operator, the
loss of a photon at a rate $\kappa$ leaves a coherent state in a coherent
state with damped amplitude, i.e. $\ket{\alpha}\rightarrow\ket{\alpha
e^{-\frac{\kappa}{2}t}}$. In particular this implies that the mean photon
number $\bar{n}(t)=|\alpha(t)|^{2}$ of a coherent state decays at the single
photon loss rate $\kappa$ independently of its amplitude. In this sense a
coherent state is more robust against photon loss than a Fock state $\ket{N}$,
the occupation of which decays at a rate $N\kappa$ Scully and Lamb (1969);
Wang  _et al._ (2008). However, a superposition of coherent states such as the
even parity cat state $\mathcal{N}(\ket{\alpha}+\ket{-\alpha})$, with
normalization factor $\mathcal{N}=1/\sqrt{2+2\exp(-2|\alpha|^{2})}$, decoheres
at the enhanced rate $2\bar{n}\kappa$ (at short times $t\ll
1/(\bar{n}\kappa)$). The latter property makes it clear that quantum
information processing with cat-states will only succeed if fast and reliable
quantum error correction can be done on such qubits. Recently encouraging
results in this direction in both theory and experiment have been obtained
Lund  _et al._ (2008); Leghtas  _et al._ (2013b); Mirrahimi  _et al._ ;
Everitt  _et al._ ; Sun  _et al._ .

In this work, we consider specifically the following two logical qubit
encodings Ralph  _et al._ (2003)

$\displaystyle\ket{0}_{L}=\ket{0},\quad\ket{1}_{L}=\ket{\alpha}$ (10)

and Leghtas  _et al._ (2013b)

$\displaystyle\ket{\mathcal{C}_{\alpha}^{+}}=\mathcal{N}(\ket{\alpha}+\ket{-\alpha}),\quad\ket{\mathcal{C}_{i\alpha}^{+}}=\mathcal{N}(\ket{i\alpha}+\ket{-i\alpha}).$
(11)

We shall further assume that $|\alpha|$ is sufficiently large such that
$\braket{0}{\alpha}=\exp(-|\alpha|^{2}/2)\approx 0$ and $\mathcal{N}\approx
1/\sqrt{2}$ (for example, for $\alpha=4$, one has $\braket{0}{\alpha}=3.4\cdot
10^{-4}$). The $\\{\ket{0}_{L},\ket{1}_{L}\\}$ encoding, which we shall call
the computational encoding, turns out to be more convenient for logical
operations utilizing the dispersive interaction between the microwaves and the
transmon. The
$\\{\ket{\mathcal{C}_{\alpha}^{+}},\ket{\mathcal{C}_{i\alpha}^{+}}\\}$
encoding, which we shall call the memory encoding, is more convenient for
autonomous quantum error correction Leghtas  _et al._ (2013b). This is due to
the fact that both $\ket{\mathcal{C}_{\alpha}^{+}}$ and
$\ket{\mathcal{C}_{i\alpha}^{+}}$ are eigenstates with eigenvalue $+1$ of the
photon number parity operator $\bm{\Pi}=\exp(i\pi{\bm{a}}^{\dagger}{\bm{a}})$
and that the loss of a single photon changes the photon number parity and can
thus be detected by measuring $\bm{\Pi}$ Leghtas  _et al._ (2013b); Sun  _et
al._ . In Section V, we provide a sequence of deterministic operations to
switch between these two encodings and for the rest of this paper we focus on
the computational encoding to discuss logical operations.

##  IV Synthetizing logical qubit operations

We start by generalizing the conditional transmon rotation (8) by allowing for
simultaneous driving of multiple photon number resolved resonances. Ideally
this operation is given by

$\bm{X}_{\theta,\phi}^{\mathcal{S}}=\sum_{n\in\mathcal{S}}\ket{n}\bra{n}\otimes
e^{i\frac{\theta}{2}\hat{n}_{\phi}\cdot\vec{\bm{\sigma}}}+\sum_{m\notin\mathcal{S}}\ket{m}\bra{m}\otimes\openone,$
(12)

where $\mathcal{S}\subset\mathbb{N}$ denotes an arbitrary set of photon
numbers. Such an operation can be approximately realized by the drive term (4)
using a pulse of duration $T_{p}\gg\pi/(2\raisebox{1.50696pt}{$\chi$})$ with
the following drive frequencies, component amplitudes and phases

$\displaystyle\nu_{n}=\omega_{eg}-2n\raisebox{1.50696pt}{$\chi$},\quad\Omega_{j}=\delta_{jn}\frac{\theta}{T_{p}},\quad\delta_{j}=\delta_{jn}\phi,$
(13)

where $n\in\mathcal{S}$. Imperfections will result from off-resonant driving
of undesired photon number transitions as explained in more details in
Appendix A.

A central role in our Hadamard gate implementation is played by the odd photon
number parity conditional $\pi$-pulse given by (12) with $\theta=\pi$,
$\phi=\pi/2$ and $\mathcal{S}=\\{2n+1:\,n\in\mathbb{N}\\}$. Acting on the
product state $\ket{\alpha}\otimes\ket{g}$, this gate ideally entangles the
photon number parity with the state of the transmon as follows

$\bm{X}^{\\{2n+1:\,n\in\mathbb{N}\\}}_{\pi,\frac{\pi}{2}}\ket{\alpha}\otimes\ket{g}=\frac{1}{\sqrt{2}}\left(\ket{\mathcal{C}_{\alpha}^{+}}\ket{g}+\ket{\mathcal{C}_{\alpha}^{-}}\ket{e}\right),$
(14)

where $\ket{\mathcal{C}_{\alpha}^{-}}=(\ket{\alpha}-\ket{-\alpha})/\sqrt{2}$
is the odd parity cat state. Importantly, because the occupation probability
of the Fock states in the coherent state $\ket{\alpha}$ obeys the Poisson
distribution with mean $\bar{n}=|\alpha|^{2}$ and width $\sqrt{\bar{n}}$, it
is sufficient to use a pulse with a finite number
$N_{\omega}\gtrsim\sqrt{\bar{n}}$ of frequency components
$\omega_{n}=\omega_{eg}-2n\raisebox{1.50696pt}{$\chi$}$, distributed around
$\omega_{eg}-2\bar{n}\raisebox{1.50696pt}{$\chi$}$. Fig. 2 shows the fidelity
of the simulated entangling operation (14) as a function of the ratio
$\raisebox{1.50696pt}{$\chi$}/\Omega$ (left panel) and as a function of
$N_{\omega}$ (right panel) in the presence of photon loss.

Figure 2: (Color online) Fidelity of the photon number parity conditional
$\pi$-pulse from the numerical solution of Eq. (6) with
$\raisebox{1.50696pt}{$\chi$}/(2\pi)=50\,{\rm MHz}$,
$\kappa=10^{-4}\raisebox{1.50696pt}{$\chi$}$. Left panel: Fidelity as a
function of $\raisebox{1.50696pt}{$\chi$}/\Omega$. Here $N_{\omega}=20$.
Dashed (black) curves show $\exp[-\bar{n}\kappa
k\pi/(2\raisebox{1.50696pt}{$\chi$})]$. Right panel: Fidelity as a function of
the number of drive frequency components $N_{\omega}$. Here
$\raisebox{1.50696pt}{$\chi$}/\Omega=10$. Different symbols represent
different amplitudes $\alpha$ as given in the legend.

For square pulses, as used in the simulation, a simple pulse optimization
consists in taking $\raisebox{1.50696pt}{$\chi$}/\Omega=k\in\mathbb{N}$, since
the spectral weight of the pulse with frequency component $\omega_{n}$ then
vanishes identically at all other resonance frequencies $\omega_{m\not=n}$
(technically the zeros of the sinc function fall on the unwanted photon number
resonances, as explained in Appendix A). As shown in the left panel of Fig. 2,
the fidelity first increases with increasing $k$, which is due to the
decreasing AC-Stark shift $\sim\Omega/k$ induced off-resonance. However,
increasing $k$ also increases the duration of the $\pi$-pulse
$T_{p}=\pi/\Omega\sim k$ and hence increases the effect of photon loss, which
leads to the observed decrease in fidelity. The dashed black curves on the
left panel represent $\exp[-\bar{n}\kappa
k\pi/(2\raisebox{1.50696pt}{$\chi$})]$ for the different coherent state
amplitudes. On the right panel of Fig. 2 we observe the expected saturation of
the fidelity when the number of frequency components becomes large compared
with $\sqrt{\bar{n}}$. The parameters for the simulation are given in the
figure caption. In Appendix A, we show that similar fidelities are obtained
for Gaussian pulse envelopes. It is conceivable that more sophisticated pulse
engineering could lead to further improvement.

Figure 3: (Color online) Wigner function $W(\alpha)=(2/\pi){\rm
tr}[{\bm{\Pi}}{\bm{D}}_{-\alpha}\rho_{\rm cav}\bm{D}_{\alpha}]$ of the reduced
density matrix of the cavity after each operation in the Hadamard gate
sequence (15). Upper panel: for the initial state $\ket{0}_{L}$. Lower panel:
for the initial state $\ket{1}_{L}$. In this simulation we use $\alpha=4$,
$\raisebox{1.50696pt}{$\chi$}/(2\pi)=50\,{\rm MHz}$ and
$\kappa=10^{-4}\raisebox{1.50696pt}{$\chi$}$ as well as square pulses with
duration $T_{p}=10\pi/\raisebox{1.50696pt}{$\chi$}$ for both transmon
rotations and field displacements. The fidelity to the target state indicated
in each panel (omitting normalization) as well as the time in ${\rm ns}$ is
indicated in the title of each sub-figure. Notice the phase difference of
$\pi$ in the interference fringes of the two final states.

###  IV.1 A deterministic logical Hadamard gate

A deterministic Hadamard gate can be implemented by the following sequence of
operations (to be read from right to left)

$\bm{H}_{L}=\bm{D}_{\frac{\alpha}{2}}\bm{Y}_{-\pi}^{\\{2n+1:\,n\in\mathbb{N}\\}}\bm{D}_{\frac{\alpha}{2}}\bm{Y}^{0}_{-\pi}\bm{\Pi}^{e}\bm{D}^{g}_{-\alpha}\bm{Y}_{\frac{\pi}{2}},$
(15)

where we have used the short-hand notation
$\bm{Y}_{\theta}=\bm{X}_{\theta,\frac{\pi}{2}}$. The corresponding circuit
diagram is shown in Appendix C.

The initial unconditional qubit rotation $\bm{Y}_{\frac{\pi}{2}}$ can be
realized with a short pulse with center frequency
$\omega_{eg}-\bar{n}\raisebox{1.50696pt}{$\chi$}$ and duration $T_{p}\ll
1/(2\bar{n}\raisebox{1.50696pt}{$\chi$})$ such that its frequency spectrum
approximately homogeneously covers a number of photon number resonances large
compared with $\bar{n}$ Leghtas  _et al._ (2013a). Similarly, the
unconditional cavity displacement $\bm{D}_{\frac{\alpha}{2}}$ can be realized
by a pulse with center frequency $\omega_{c}$ and duration $T_{p}\ll
1/(2\raisebox{1.50696pt}{$\chi$})$ such that the cavity resonances
corresponding to the ground and excited states of the transmon are equally
driven Leghtas  _et al._ (2013a). As discussed in Appendix E, in order to
avoid spurious population of higher transmon levels, it is however preferable
to use more sophisticated pulse shaping in frequency. In the simulations we
thus use longer square pulse envelopes
($T_{p}=10\pi/\raisebox{1.50696pt}{$\chi$}$) with narrow frequency bands
around selected resonances for both conditional and unconditional operations.
Clearly there is a trade-off in minimizing the adverse effects of decoherence
(increasing with pulse duration) and spurious transmon excitations (decreasing
with pulse duration) and further optimization, beyond the scope of the present
work, is desirable for an experimental realization. The results presented
below however show that even with modest effort, rather high operation
fidelities can be reached.

Figure 3 shows the Wigner function $W(\alpha)=(2/\pi){\rm
tr}[{\bm{\Pi}}{\bm{D}}_{-\alpha}\rho_{\rm cav}\bm{D}_{\alpha}]$ of the reduced
density matrix of the cavity $\rho_{\rm cav}={\rm tr}_{\rm qb}[\rho]$, where
the full density matrix $\rho$ is obtained by solving the master equation (6)
following the sequence of operations (15), starting with the two computational
basis states $\ket{0}_{L}$ (upper panel) and $\ket{1}_{L}$ (lower panel). The
parameter values used are given in the figure caption. The fidelity of this
Hadamard gate is defined as
$\mathcal{F}=|\braket{\psi_{0}}{\bm{H}\bra{g}\rho\ket{g}\bm{H}}{\psi_{0}}|^{2}$,
where $\bm{H}$ is the ideal Hadamard transform. The fidelity depends on the
initial state as shown in Fig. 4 where it is plotted as a function of the two
angles $\theta$ and $\phi$ parametrizing the initial cavity state on the
logical Bloch sphere as
$\ket{\psi_{0}}=\cos(\theta/2)\ket{0}_{L}+e^{i\phi}\sin(\theta/2)\ket{1}_{L}$.

Figure 4: (Color online) Fidelity of the deterministic Hadamard gate as a
function of the initial cavity state parametrized on the logical Bloch sphere.
Parameters used in the simulation are
$\raisebox{1.50696pt}{$\chi$}/(2\pi)=50\,{\rm MHz}$,
$\kappa=10^{-4}\raisebox{1.50696pt}{$\chi$}$, $\alpha=4$, and square-pulse
duration $T_{p}=10\pi/\raisebox{1.50696pt}{$\chi$}$. The total gate duration
is $T_{\rm tot}=6T_{p}+\pi/(2\raisebox{1.50696pt}{$\chi$})\approx 605\,{\rm
ns}$.

###  IV.2 Phase gate via a conditional Berry-Phase

Figure 5: (Color online) Fidelity of the phase gate as a function of $\theta$
for $\raisebox{1.50696pt}{$\chi$}/(2\pi)=50\,{\rm MHz}$,
$\kappa=10^{-4}\raisebox{1.50696pt}{$\chi$}$ and fixed pulse duration
$T_{p}=10\pi/\raisebox{1.50696pt}{$\chi$}$.

In order to achieve arbitrary single logical qubit rotations we next explain
how to implement a phase gate or arbitrary rotation around the logical $Z$
axis. Together with the above Hadamard gate, this gives the ability to perform
arbitrary logical $X$ rotations and therefore arbitrary logical single qubit
rotations. The phase gate is based on the concatenation property of
displacement operations:
$\bm{D}(\alpha)\bm{D}(\beta)=e^{(\alpha\beta^{*}-\alpha^{*}\beta)/2}\bm{D}(\alpha+\beta)$
which implies in particular the identity

$\bm{D}_{\beta}^{g}\bm{D}_{-i\beta}^{g}\bm{D}_{-\beta}^{g}\bm{D}_{i\beta}^{g}=e^{2i\beta^{2}}\ket{g}\bra{g}+\openone\ket{e}\bra{e},$
(16)

where we took $\beta\in\mathbb{R}$. The phase $2\beta^{2}$ is in fact nothing
else but the Berry phase 222Note that for a harmonic oscillator the
adiabaticity condition is always satisfied. acquired by the coherent state
upon undergoing a cyclic evolution along a closed path encircling an area
$\beta^{2}$ in phase-space. Thus by choosing $\beta=\sqrt{\theta/2}$, the
following sequence (to be read from right to left) implements the desired
phase gate

$\bm{Y}_{\pi}^{0}\bm{D}_{\beta}^{g}\bm{D}_{-i\beta}^{g}\bm{D}_{-\beta}^{g}\bm{D}_{i\beta}^{g}\bm{Y}_{\pi}^{0}=e^{i\frac{\theta}{2}}e^{i\frac{\theta}{2}\bm{Z}_{L}},$
(17)

where we have introduced $\bm{Z}_{L}=\ket{1}_{L}\bra{1}-\ket{0}_{L}\bra{0}$.
Figure 5 shows the fidelity of this gate as a function of the angle $\theta$
for the initial state $\ket{\psi}_{0}=(\ket{0}_{L}+\ket{1}_{L})/\sqrt{2}$ for
different values of $\alpha$. In this simulation we fix the duration of the
displacement operations. The non-monotonic dependence of the fidelity on
$\theta$ is due to the interplay between the photon number dependent
decoherence rate and the $\theta$ dependent variation of the photon number
during the sequence (17).

###  IV.3 Two qubit controlled phase gate

Two logical qubits may be coupled by dispersively coupling the fields of two
adjacent cavities to a flux tunable split-transmon as depicted in Fig. 6.

Figure 6: (Color online) Chain of coupled 3D-transmons. (Red) crosses
represent the Josephson junctions at the center of each transmon. Each cavity
is connected to its neighbors by an inline split transmon (SQUID loop). The
cavities are represented by the rectangular boxes. The U-shaped lines between
two cavities represents flux bias lines used to tune the transition
frequencies of the inline-transmons. A transmission line coupling to each
cavity further allows for coherent microwave drives.

Assuming that the inline transmon between cavities $j$ and $j+1$ remains in
its groundstate throughout, the dispersive interaction gives rise to a photon
hopping term of the form $\xi_{jj+1}(\bm{a}_{j}^{\dagger}\bm{a}_{j+1}+h.c.)$.
As shown in Ref. Ralph  _et al._ , 2003, such a term acting for a time
$T_{p}$, naturally gives rise to a controlled phase gate ${\bf
C}_{\pi}=\ket{00}\bra{00}_{L}+\ket{01}\bra{01}_{L}+\ket{10}\bra{10}_{L}-\ket{11}\bra{11}_{L}$
on the logical qubits (assumed to have equal amplitudes $\alpha$ in the state
$\ket{1}_{L}$) provided that $\xi_{jj+1}T_{p}\bar{n}=\pi/2$ while
$\bar{n}=|\alpha|^{2}\gg\pi^{2}/4\approx 2.5$. In this limit and for the
dissipationless case, it can be shown that the worst case fidelity of this
gate due to coherent state non-orthogonality goes as

$\mathcal{F}\sim\exp\left(-\frac{\pi^{2}}{2\bar{n}}\right).$ (18)

Since the linear decrease with $\bar{n}$ of the gate duration compensates the
linear increase of the effective decoherence rate ($\gamma=\bar{n}\kappa$), it
is obviously advantageous to use a large coherent state amplitude to increase
the fidelity (18) of this gate. A suitably large amplitude can be obtained by
preceding the controlled phase gate by the following amplitude pumping
sequence on both cavities

$\displaystyle\bm{Y}^{0}_{-\pi}\bm{D}_{\beta}^{g}\bm{Y}^{0}_{\pi}$ (19)

with $\beta\in\mathbb{R}$ such that $\beta+\alpha>\alpha$. After the
controlled phase gate the original amplitude can be restored by the following
amplitude damping sequence on both cavities

$\displaystyle\bm{Y}^{0}_{-\pi}\bm{D}_{-\beta}^{g}\bm{Y}^{0}_{\pi}.$ (20)

Figure 7: (Color online) Controlled phase gate. The photon hoping strength is
$\xi/(2\pi)=25\,{\rm MHz}$ and the single photon loss rate is $\kappa=2\cdot
10^{-4}\xi$. The full bars show the results for $\alpha=4$ and the semi-
transparent bars for $\alpha=5$.

Figure 7 shows the matrix representation of the fidelity of the simulated
controlled phase gate $\bm{C}_{\pi}$, acting on the
$\bm{X}_{L}\otimes\bm{X}_{L}$ basis states
$\ket{\psi_{ij}}=(\ket{0}_{L}+(-1)^{i}\ket{1}_{L})\otimes(\ket{0}_{L}+(-1)^{j}\ket{1}_{L})/2$,
which are ideally mapped according to
$\ket{\psi_{ij}}\rightarrow\ket{\phi_{ij}}$ onto the entangled states
$\ket{\phi_{ij}}=(\ket{00}+(-1)^{i}\ket{10}+(-1)^{j}\ket{01}-(-1)^{i+j}\ket{11})/2$.
The fidelity is shown for two different values of $\alpha$, demonstrating the
increase in fidelity with increasing $\alpha$. Parameter values used in the
simulation are given in the figure caption.

Together with the single qubit operations presented above, this completes the
set of universal logic gates. A similar setup, albeit for a different two-
qubit gate has been proposed in Ref. Mirrahimi  _et al._ , .

##  V Switching between computational and memory encodings

In Mirrahimi  _et al._ a set of universal gates for logical qubits encoded in
the memory basis (11) was given. An advantage of this proposal is that logical
operations and quantum error correction take place within the same encoding,
which allows for the logical operations to be made fault-tolerant to a large
extent Mirrahimi  _et al._ . One drawback of that specific proposal though, is
that in order to implement an arbitrary single qubit rotation in the memory
encoding it is necessary to make use of the self-Kerr interaction among the
photons $-K{\bm{a}}^{\dagger}{\bm{a}}^{\dagger}{\bm{a}}{\bm{a}}$ (see Appendix
D). The self-Kerr interaction strength $K$ is however typically orders of
magnitude smaller than the dispersive interaction Kirchmair  _et al._ (2013);
Vlastakis  _et al._ (2013), leading to inappropriately long gate times.
Increasing the strength of the self-Kerr interaction is not desirable, since
it adversely affects the logical state preparation, by squeezing the coherent
states. As shown above, in the computational encoding (10), it is possible to
implement deterministically an arbitrary single qubit rotation using the
cross-Kerr term between the photons and the transmon alone. Here we show that
the cross-Kerr term also allows to switch betweeen the two encodings. Thus a
potentially faster mode of operation would consist in keeping the logical
qubits in the protected memory encoding when idle, continuously performing
error correction as described in Leghtas  _et al._ (2013b); Mirrahimi  _et
al._ and map them into the computational encoding only to perform logic
operations as described in the present work. The sequence of operations to
switch from the computational to the memory encoding is given by

$\displaystyle\bm{D}_{-\alpha}\bm{Y}_{\pi}^{0}\bm{D}_{\alpha}\bm{D}_{-i\alpha}\bm{Y}_{-\pi}^{0}\bm{D}_{i\alpha}\bm{\Pi}^{e}\bm{Y}_{-\frac{\pi}{2}}\bm{D}_{i\alpha}^{e}\bm{Y}_{\pi}^{0},$
(21)

The inverse transformation is obtained by inverting the sequence and replacing
$\alpha\rightarrow-\alpha$ as well as $\pi\rightarrow-\pi$. Figure 8 shows the
evolution of the Wigner function of the logical qubit basis states after each
operation in the sequence (21). In order to shorten the duration of the
sequence we have combined the two successive displacements using
$\bm{D}_{\alpha}\bm{D}_{-i\alpha}=e^{i\alpha^{2}}\bm{D}_{\alpha-i\alpha}$. We
find fidelities of $81\%$ and $72\%$ for the transformations
$\ket{0}_{L}\rightarrow\ket{\mathcal{C}_{i\alpha}^{+}}$ and
$\ket{1}_{L}\rightarrow\ket{\mathcal{C}_{\alpha}^{+}}$ respectively.

Figure 8: (Color online) Evolution of the Wigner function of the two logical
basis states $\ket{0}_{L}$ (first and third columns) and $\ket{1}_{L}$ (second
and fourth columns) during the encoding-switching sequence (21). Here we take
$\alpha=3.5$, $\raisebox{1.50696pt}{$\chi$}/(2\pi)=50\,{\rm MHz}$,
$\kappa=10^{-4}\raisebox{1.50696pt}{$\chi$}$ and varying pulse durations
$T_{p}\in\\{10\pi/\raisebox{1.50696pt}{$\chi$},40\pi/\raisebox{1.50696pt}{$\chi$}\\}$.
In each panel we indicate the ideal target state. The fidelity of each step as
well as the time in $\rm ns$ is indicated in the titles.

##  VI Summary & Conclusion

In summary we have proposed a deterministic Hadamard gate for logical coherent
state qubits encoded in the two-dimensional space spanned by the vacuum and a
coherent state of finite amplitude. Our scheme utilizes the experimentally
demonstrated strong dispersive interaction of the electromagnetic field of a
superconducting cavity with an off-resonant effective two-level system
(transmon qubit) and generalizes a recently introduced set of conditional
operations Leghtas  _et al._ (2013a). We further describe a set of universal
deterministic quantum gates and provide numerical estimates for fidelities
that should be achievable in state of the art circuit QED systems.

This work was supported financially by the Swiss National Science Foundation.

##  Appendix A Photon-number subset conditional transmon rotation

In this appendix we describe in more details how to implement operation (12).
In a frame rotating with the bare transmon and cavity frequencies, a photon
number subset $S$ dependent transmon pulse is described by the Hamiltonian

$\bm{H}=-\raisebox{1.50696pt}{$\chi$}{\bm{a}}^{\dagger}{\bm{a}}{\bm{\sigma}}^{z}+\sum_{m\in
S}\frac{\Omega_{m}(t)}{2}\left(e^{-2im\raisebox{1.05487pt}{$\chi$}t}{\bm{\sigma}}^{-}+h.c.\right)$
(22)

where $\Omega_{m}(t)$ is the envelope function of the pulse component with
center frequency $\omega_{m}=\omega_{eg}-2m\raisebox{1.50696pt}{$\chi$}$.
Moving to the interaction picture with the unitary transformation

$\bm{U}(t)=\exp\left[-it\raisebox{1.50696pt}{$\chi$}{\bm{\sigma}}^{z}\sum_{n}n\ket{n}\bra{n}\right]$
(23)

we obtain

$\displaystyle\tilde{\bm{H}}$
$\displaystyle=\bm{U}\bm{H}\bm{U}^{\dagger}-i\bm{U}\dot{\bm{U}}^{\dagger}$
(24) $\displaystyle=\sum_{m\in
S}\frac{\Omega_{m}}{2}\sum_{n}\left(e^{-2i\raisebox{1.05487pt}{$\chi$}t(m-n)}{\bm{\sigma}^{-}}+h.c.\right)\ket{n}\bra{n}$
$\displaystyle=\sum_{m\in
S}\frac{\Omega_{m}}{2}{\bm{\sigma}}^{x}\ket{m}\bra{m}$
$\displaystyle\quad+\sum_{m\in
S}\frac{\Omega_{m}}{2}\sum_{\underline{n}\not=m}\left(e^{-2i\raisebox{1.05487pt}{$\chi$}t(m-n)}{\bm{\sigma}}^{-}+h.c.\right)\ket{n}\bra{n}.$

Consider now the perturbative expansion for
$\Omega_{m}/\raisebox{1.50696pt}{$\chi$}\ll 1$ of the evolution operator in
this frame

$\displaystyle\bm{U}_{\rm
evol}(T)=\mathcal{T}\exp\left[-i\int_{0}^{T}\tilde{\bm{H}}(\tau)d\tau\right]\approx
1-i\int_{0}^{T}\tilde{\bm{H}}(\tau)d\tau$
$\displaystyle=1-\frac{i}{2}\sum_{m\in
S}\Big{\\{}\int_{0}^{T}d\tau\Omega_{m}(\tau){\bm{\sigma}}^{x}\ket{m}\bra{m}$
(25)
$\displaystyle\quad+\sum_{\underline{n}\not=m}\int_{0}^{T}\\!\\!\\!\\!d\tau\frac{\Omega_{m}(\tau)}{2}\left(e^{-2i\raisebox{1.05487pt}{$\chi$}(m-n)\tau}{\bm{\sigma}}^{-}+h.c.\right)\ket{n}\bra{n}\Big{\\}}.$

For $\Omega_{m}(\tau)=\theta(T-\tau)\Omega_{0}$ this becomes

$\displaystyle{\bm{U}}_{\rm evol}(T)\approx 1-i\frac{\Omega_{0}T}{2}\sum_{m\in
S}\Big{[}{\bm{\sigma}}^{x}\ket{m}\bra{m}$ (26)
$\displaystyle\sum_{\underline{n}\not=m}e^{-i\raisebox{1.05487pt}{$\chi$}(m-n)T}\left(\frac{\sin(\raisebox{1.50696pt}{$\chi$}(m-n)T)}{\raisebox{1.50696pt}{$\chi$}(m-n)T}{\bm{\sigma}}^{-}+h.c.\right)\ket{n}\bra{n}\Big{]}.$

Now let us choose $T$ such that $\raisebox{1.50696pt}{$\chi$}T=\pi$. Then the
second term above vanishes identically, as the zeros of the sinc function line
up with the photon resonances of the transmon that we do not wish to drive and
we have

$\displaystyle{\bm{U}}_{\rm evol}(\pi/\raisebox{1.50696pt}{$\chi$})$
$\displaystyle\approx
1-i\pi\left(\frac{\Omega_{0}}{2\raisebox{1.50696pt}{$\chi$}}\right)\sum_{m\in
S}{\bm{\sigma}}^{x}\ket{m}\bra{m}.$ (27)

This generates a small $x$-rotation of the transmon components associated with
the Fock states $\ket{m}$ with $m\in S$ by an angle
$\pi\Omega_{0}/\raisebox{1.50696pt}{$\chi$}\ll\pi$. By concatenating such
rotations $k$ times, effectively increasing the total pulse time to
$T=k\pi/\raisebox{1.50696pt}{$\chi$}$, we can then generate a rotation of the
transmon by an angle $k\pi\Omega_{0}/\raisebox{1.50696pt}{$\chi$}$ as

$\displaystyle{\bm{U}}_{\rm
evol}(k\pi/\raisebox{1.50696pt}{$\chi$})\approx{\bm{U}}_{\rm
evol}(\pi/\raisebox{1.50696pt}{$\chi$})^{k}$ (28)
$\displaystyle=\exp\left[-i\frac{k\pi\Omega_{0}}{2\raisebox{1.50696pt}{$\chi$}}{\bm{\sigma}}^{x}\right]\sum_{m\in
S}\ket{m}\bra{m}+\sum_{n\notin S}\ket{n}\bra{n}.$

By changing the phase of the drive signal we may similarly implement a photon
parity conditional rotation around arbitrary axes in the $x-y$ plane. For
example we may perform a $\pi$ rotation around the $y$-axis conditioned on the
parity of the photon number being odd as in the main text by selecting a drive
phase of $\pi$, $S=\\{2n+1\\}_{n\in\mathbb{N}}$ and
$k\Omega_{0}=\raisebox{1.50696pt}{$\chi$}$, which implies $k\gg 1$ given that
we assumed $\Omega_{0}\ll\raisebox{1.50696pt}{$\chi$}$. Higher order terms in
the perturbative expansion (A), lead to correction terms of order
$\Omega_{0}^{2}/\raisebox{1.50696pt}{$\chi$}$, which correspond to the AC-
stark shift Vlastakis  _et al._ (2013).

Figure 9: (Color online) Comparison of the fidelities of the photon number
parity conditional $\pi$-pulse between gaussian and square pulses. For small
$\raisebox{1.50696pt}{$\chi$}/\Omega$, the fidelity is lower for the gaussian
pulses which is due to the larger on-resonance driving of unwanted
transistions in this case. For larger $\raisebox{1.50696pt}{$\chi$}/\Omega$,
the obtained fidelities are similar. We take $\alpha=4$, $N_{\omega}=20$,
$\raisebox{1.50696pt}{$\chi$}/(2\pi)=50\,{\rm MHz}$ and
$\kappa=10^{-4}\raisebox{1.50696pt}{$\chi$}$.

In reality one cannot generate perfect square pulses and this will lead to
corrections. It is easily seen that for gaussian pulse envelopes, the strength
of the residual on-resonance drives of other resonances is suppressed at least
by the super-exponential factor
$\sum_{k=1}^{\infty}e^{-(2\raisebox{1.05487pt}{$\chi$}Tk)^{2}}$ and thus
becomes negligible for a pulse duration $T\gg
1/(2\raisebox{1.50696pt}{$\chi$})$. Note also that typically for a conditional
qubit rotation by an angle $\theta\in[0,2\pi]$, $T\sim\theta/\Omega_{0}$ which
means the correction terms will be small as long as
$\Omega_{0}\ll\raisebox{1.50696pt}{$\chi$}$ consistent with our assumption.
Figure 9 shows the fidelity of the odd photon number parity conditional
$\pi$-pulse implemented with gaussian pulses
$A_{\pi}\exp[-(\sigma(t-T/2))^{2}/2]$ with frequency width $\sigma=6/T$, total
pulse duration $T_{p}=10\pi/\raisebox{1.50696pt}{$\chi$}$ and amplitude
$A_{\pi}=\pi\sigma/\sqrt{2\pi}$. The comparison with the square pulse case,
shows that similar fidelities can be reached in both cases.

##  Appendix B NOT gate

Although one may in principle implement any single qubit gate with the
operations described in the main text, the dispersive coupling may allow for
more efficient direct implementations of certain gates. For example, a logical
quantum NOT gate $\bm{X}_{L}$ can be implemented solely with unconditional
operations by the sequence of operations

$\bm{X}_{L}=\bm{D}_{\frac{\alpha}{2}}\bm{Y}_{\pi}\bm{\Pi}^{e}\bm{Y}_{\pi}\bm{D}_{-\frac{\alpha}{2}}.$
(29)

##  Appendix C Circuit diagram of the deterministic Hadamard gate

Figure 10: (Color online) Circuit diagram for the deterministic Hadamard gate.
The horizontal full (blue) line represents the cavity state (logical qubit),
while the dashed (black) line represents the transmon state. Here
$\mathcal{O}=\\{2n+1:\,n\in\mathbb{N}\\}$.

##  Appendix D Influence of the induced photon-photon interaction

In the above discussion we have neglected the self-Kerr interaction between
the photons induced by the coupling to the nonlinear transmon oscillator
Bourassa  _et al._ (2012); Nigg  _et al._ (2012); Kirchmair  _et al._ (2013).
In this appendix, we show that the leading order effect of the self-Kerr can
be accounted and corrected for to a large extent. The self-Kerr effect is
described by the term

$\bm{H}_{K}=-K{\bm{a}}^{\dagger}{\bm{a}}^{\dagger}{\bm{a}}{\bm{a}}.$ (30)

Note that this term commutes with the photon number operator and is
independent of the state of the transmon and thus commutes with the
conditional transmon operations (8) and (12). When acting on a coherent state
$\ket{\alpha}$ the leading order effect is a phase rotation Walls and Milburn
(2008)

$e^{-i\bm{H}_{K}t}\ket{\alpha}\approx\ket{\alpha e^{i\phi_{K}t}}\,\quad Kt\ll
1$ (31)

with $\phi_{K}=2\bar{n}K$. Sub-leading order terms describe squeezing Walls
and Milburn (2008). To leading order, the effect of the self-Kerr on the
photon number parity operation (9) can thus be corrected for simply by
shortening the waiting time according to

$\displaystyle
T_{\pi,\bar{n}}=\frac{\pi}{2(\raisebox{1.50696pt}{$\chi$}+K\bar{n})},$ (32)

for a coherent state with average photon number $\bar{n}$. The self-Kerr term
(30) does not commute with the displacement operation (7). Let us consider the
case where the transmon is in the ground state. In the presence of an on-
resonance drive with constant strength $\varepsilon\in\mathbb{R}$ and of
duration $T$ such that $KT\ll 1$, the Heisenberg equation of motion for the
annihilation operator, neglecting squeezing terms reads

$\displaystyle\dot{\bm{a}}(t)=2iK(\varepsilon t)^{2}{\bm{a}}+\varepsilon.$
(33)

The solution of Eq. (33) for the coherent state amplitude is

$\displaystyle a(t)=\left(\varepsilon\int_{0}^{t}d\tau
e^{-i\frac{2}{3}K\varepsilon^{2}\tau^{3}}+a(0)\right)e^{i\frac{2}{3}K\varepsilon^{2}t^{3}}.$
(34)

Specifically for the case where the field is initially the vacuum ($a(0)=0$)
and for $(\varepsilon t)^{2}Kt\ll 1$ we find

$\displaystyle a(t)\approx\varepsilon t+i\frac{K\varepsilon^{3}t^{4}}{2}.$
(35)

The self-Kerr induced phase rotation during the displacement is thus

$\phi_{K}(t)\approx\tan\phi_{K}=\frac{{\rm Im}[a(t)]}{{\rm
Re}[a(t)]}=\frac{K\bar{n}(t)t}{2},$ (36)

where we have defined $\bar{n}(t)=(\varepsilon t)^{2}$.

Figure 11: (Color online) Effect of the self-Kerr interaction on the
displacement operation. The displacement amplitude is $\alpha=4$ and the
square pulse duration is $T_{p}=10\pi/\raisebox{1.50696pt}{$\chi$}$. We
further take $\raisebox{1.50696pt}{$\chi$}/(2\pi)=50\,{\rm MHz}$ and
$\kappa=0$. The initial state is $\ket{0}_{L}\ket{g}$ and the Wigner function
is calculated by solving numerically the master equation (6) with Hamiltonian
${\bm{H}}=i\varepsilon({\bm{a}}-{\bm{a}}^{\dagger})-K{\bm{a}}^{\dagger}{\bm{a}}^{\dagger}{\bm{a}}{\bm{a}}$.
The dashed (white) lines show $a(T_{p})$ after Eq. (35).

Figure 11 compares Eq. (35) for different values of $K$ with the result of a
Wigner function computation including higher order terms. As we can see, the
direction of the center of the distribution is well captured by (35) (dashed
white lines) even in the presence of sizable squeezing. To emphasize the
effect of the self-Kerr we set $\kappa=0$ in this simulation.

Figure 12: (Color online) Effect of the self-Kerr interaction on the Hadamard
gate. We use a displacement of amplitude $\alpha=4$ and pulse duration
$T_{p}=10\pi/\raisebox{1.50696pt}{$\chi$}$ and take
$\raisebox{1.50696pt}{$\chi$}/(2\pi)=50\,{\rm MHz}$ and
$\kappa=10^{-4}\raisebox{1.50696pt}{$\chi$}$. The initial state is
$(\ket{0}_{L}+\ket{1}_{L})/\sqrt{2}$ and the Wigner function is calculated by
solving numerically the master equation (6) including the self-Kerr term (30)
with $K=0.5\cdot 10^{-4}\raisebox{1.50696pt}{$\chi$}$.

Figure 12 shows the cavity Wigner function during the Hadamard gate sequence
acting on the initial state $(\ket{0}_{L}+\ket{1}_{L})/\sqrt{2}$, including a
self-Kerr term of strength $K=0.5\cdot 10^{-4}\raisebox{1.50696pt}{$\chi$}$.
Here we include photon loss as well. In the simulation we have adjusted the
displacement phases and amplitudes according to Eq. (35) and corrected the
wait time according to Eq. (32). The results demonstrate that high fidelities
of about $80\%$ can be reached even in the presence of a weak self-Kerr term.

##  Appendix E Beyond the two level approximation – conditional vs
unconditional operations

Above, we have neglected the higher excited states of the transmon. However, a
transmon is best viewed as a weakly anharmonic oscillator with negative
anharmonicity Koch  _et al._ (2007); Nigg  _et al._ (2012). Denoting the
transmon eigenstates with $\ket{j}$, the dispersive Hamiltonian in the multi-
level case reads

$\sum_{j=0}\raisebox{1.50696pt}{$\chi$}_{j,j+1}\left(\ket{j+1}\bra{j+1}-\ket{j}\bra{j}\right){\bm{a}}^{\dagger}{\bm{a}}.$
(37)

Thus the $e\leftrightarrow g$ and $f\leftrightarrow e$ transitions split up
into photon-number resolved ladders of resonances according to

$\omega_{n}^{(eg)}=\omega_{eg}-2n\raisebox{1.50696pt}{$\chi$}$ (38)

and

$\omega_{n}^{(fe)}=\omega_{fe}-2n\raisebox{1.50696pt}{$\chi$}^{\prime}$ (39)

with
$\raisebox{1.50696pt}{$\chi$}=\raisebox{1.50696pt}{$\chi$}_{01}-\raisebox{1.50696pt}{$\chi$}_{12}/2$
and
$\raisebox{1.50696pt}{$\chi$}^{\prime}=\raisebox{1.50696pt}{$\chi$}_{12}-(\raisebox{1.50696pt}{$\chi$}_{23}+\raisebox{1.50696pt}{$\chi$}_{01})/2$.

If the magnitude $\delta$ of the anharmonicity were much larger than
$2\bar{n}\raisebox{1.50696pt}{$\chi$}$ where $\bar{n}$ is the average photon
number in the logical qubit state $\ket{1}_{L}$, then one could implement
unconditional operations on the transmon simply by using pulses of short
duration $T$ such that $\delta\gg 1/T\gg
2\bar{n}\raisebox{1.50696pt}{$\chi$}$. If such a wide separation of frequency
scales is not available, as is the case in current experimental realizations,
then it may be preferable to implement the unconditional operations in a
similar way to the conditional operations, by superposing narrow frequency
band pulses to avoid spurious population of higher transmon levels (see Fig.
13). The penalty for this is an increase in gate duration.

Figure 13: (Color online) Illustration of the 3-level transmon spectrum in the
dispersive coupling regime with a coherent state in the cavity. Note that
$\raisebox{1.50696pt}{$\chi$}\not=\raisebox{1.50696pt}{$\chi$}^{\prime}$.
Thus, by using sufficiently narrow pulse envelopes in frequency, one can avoid
population of the excited state $f$. This is illustrated on the figure for the
$n=7$ transition.

## References

  * Lloyd and Braunstein (1999) S. Lloyd and S. L. Braunstein, Phys. Rev. Lett. 82, 1784 (1999).
  * Gottesman  _et al._ (2001) D. Gottesman, A. Kitaev, and J. Preskill, Phys. Rev. A 64, 012310 (2001).
  * Paik  _et al._ (2011) H. Paik, D. I. Schuster, L. S. Bishop, G. Kirchmair, G. Catelani, A. P. Sears, B. R. Johnson, M. J. Reagor, L. Frunzio, L. I. Glazman, S. M. Girvin, M. H. Devoret, and R. J. Schoelkopf, Phys. Rev. Lett. 107, 240501 (2011).
  * Rigetti  _et al._ (2012) C. Rigetti, J. M. Gambetta, S. Poletto, B. L. T. Plourde, J. M. Chow, A. D. Córcoles, J. A. Smolin, S. T. Merkel, J. R. Rozen, G. A. Keefe, M. B. Rothwell, M. B. Ketchen, and M. Steffen, Phys. Rev. B 86, 100506 (2012).
  * (5) R. W. Andrews, R. W. Peterson, T. P. Purdy, K. Cicak, R. W. Simmonds, C. A. Regal, and K. W. Lehnert, “Reversible and efficient conversion between microwave and optical light,” ArXiv:1310.5276.
  * Ralph  _et al._ (2003) T. C. Ralph, A. Gilchrist, G. J. Milburn, W. J. Munro, and S. Glancy, Phys. Rev. A 68, 042319 (2003).
  * Brune  _et al._ (1992) M. Brune, S. Haroche, J. M. Raimond, L. Davidovich, and N. Zagury, Phys. Rev. A 45, 5193 (1992).
  * Deléglise  _et al._ (2008) S. Deléglise, I. Dotsenko, C. Sayrin, J. Bernu, M. Brune, J.-M. Raimond, and S. Haroche, Nature 455, 510 (2008).
  * Schroedinger (1935) E. Schroedinger, Naturwissenschaften 23, 807 (1935).
  * Leghtas  _et al._ (2013a) Z. Leghtas, G. Kirchmair, B. Vlastakis, M. H. Devoret, R. J. Schoelkopf, and M. Mirrahimi, Phys. Rev. A 87, 042315 (2013a).
  * (11) M. Mirrahimi, Z. Leghtas, V. V. Albert, S. Touzard, R. J. Schoelkopf, L. Jiang, and M. H. Devoret, “Dynamically protected cat-qubits: a new paradigm for universal quantum computation,” ArXiv:1312.2017.
  * Jeong and Kim (2002) H. Jeong and M. S. Kim, Phys. Rev. A 65, 042305 (2002).
  * Marek and Fiurášek (2010) P. Marek and J. Fiurášek, Phys. Rev. A 82, 014304 (2010).
  * Lund  _et al._ (2008) A. P. Lund, T. C. Ralph, and H. L. Haselgrove, Phys. Rev. Lett. 100, 030503 (2008).
  * Tipsmark  _et al._ (2011) A. Tipsmark, R. Dong, A. Laghaout, P. Marek, M. Ježek, and U. L. Andersen, Phys. Rev. A 84, 050301 (2011).
  * Blais  _et al._ (2004) A. Blais, R.-S. Huang, A. Wallraff, S. M. Girvin, and R. J. Schoelkopf, Phys. Rev. A 69, 062320 (2004).
  * Koch  _et al._ (2007) J. Koch, T. M. Yu, J. Gambetta, A. A. Houck, D. I. Schuster, J. Majer, A. Blais, M. H. Devoret, S. M. Girvin, and R. J. Schoelkopf, Phys. Rev. A 76, 042319 (2007).
  * Schuster  _et al._ (2007) D. I. Schuster, A. A. Houck, J. A. Schreier, A. Wallraff, J. M. Gambetta, A. Blais, L. Frunzio1, J. Majer, B. Johnson, M. H. Devoret, S. M. Girvin, and R. J. Schoelkopf, Nature 445, 515 (2007).
  * Vlastakis  _et al._ (2013) B. Vlastakis, G. Kirchmair, Z. Leghtas, S. E. Nigg, L. Frunzio, S. M. Girvin, M. Mirrahimi, M. H. Devoret, and R. J. Schoelkopf, Science 342 (2013).
  * Note (1) The Lamb-shift is implicitly absorbed into a renormalization of the cavity and qubit transition frequencies.
  * Johansson  _et al._ (2012) J. Johansson, P. Nation, and F. Nori, Computer Physics Communications 183, 1760 (2012).
  * Leghtas  _et al._ (2013b) Z. Leghtas, G. Kirchmair, B. Vlastakis, R. J. Schoelkopf, M. H. Devoret, and M. Mirrahimi, Phys. Rev. Lett. 111, 120501 (2013b).
  * Gilchrist  _et al._ (2004) A. Gilchrist, K. Nemoto, W. J. Munro, T. C. Ralph, S. Glancy, S. L. Braunstein, and G. J. Milburn, Journal of Optics B: Quantum and Semiclassical Optics 6, S828 (2004).
  * (24) M. J. Everitt, T. P. Spiller, G. J. Milburn, R. D. Wilson, and A. M. Zagoskin, “Cool for cats,” ArXiv:1212.4795.
  * Haroche and Raimond (2006) S. Haroche and J.-M. Raimond,  _Exploring the Quantum, Atoms, Cavities and Photons_ (Oxford Graduate Texts, 2006).
  * Scully and Lamb (1969) M. O. Scully and W. E. Lamb, Phys. Rev. 179, 368 (1969).
  * Wang  _et al._ (2008) H. Wang, M. Hofheinz, M. Ansmann, R. C. Bialczak, E. Lucero, M. Neeley, A. D. O’Connell, D. Sank, J. Wenner, A. N. Cleland, and J. M. Martinis, Phys. Rev. Lett. 101, 240401 (2008).
  * (28) L. Sun, A. Petrenko, Z. Leghtas, B. Vlastakis, G. Kirchmair, K. M. Sliwa, A. Narla, M. Hatridge, S. Shankar, J. Blumoff, L. Frunzio, M. Mirrahimi, and M. H. D. abd R. J. Schoelkopf, “Tracking photon jumps with repeated quantum non-demolition parity measurements,” ArXiv:1311.2534.
  * Note (2) Note that for a harmonic oscillator the adiabaticity condition is always satisfied.
  * Kirchmair  _et al._ (2013) G. Kirchmair, B. Vlastakis, Z. Leghtas, S. E. Nigg, H. Paik, E. Ginossar, M. Mirrahimi, L. Frunzio, S. M. Girvin, and R. J. Schoelkopf, Nature 495, 205 (2013).
  * Bourassa  _et al._ (2012) J. Bourassa, F. Beaudoin, J. M. Gambetta, and A. Blais, Phys. Rev. A 86, 013814 (2012).
  * Nigg  _et al._ (2012) S. E. Nigg, H. Paik, B. Vlastakis, G. Kirchmair, S. Shankar, L. Frunzio, M. H. Devoret, R. J. Schoelkopf, and S. M. Girvin, Phys. Rev. Lett. 108, 240502 (2012).
  * Walls and Milburn (2008) D. F. Walls and G. J. Milburn,  _Quantum optics_ , 2nd ed. (Springer, 2008).


¡html¿¡head¿ ¡meta http-equiv=”content-type” content=”text/html;
charset=ISO-8859-1”¿

¡title¿CERN-2011-007¡/title¿

¡/head¿

¡body¿

¡h1¿¡a href=”http://cas.web.cern.ch/cas/Denmark-2010/Aarhus-advert.html”¿CAS -
CERN Accelerator School: RF for Accelerators¡/a¿¡/h1¿

¡h2¿Ebeltoft, Denmark, 8 - 17 Jun 2010¡/h2¿

¡h2¿Proceedings - CERN Yellow Report

¡a href=”https://cdsweb.cern.ch/record/1231364”¿CERN-2011-007¡/a¿¡/h2¿

¡h3¿editor: R. Bailey¡/h3¿

These proceedings present the lectures given at the twenty-fourth specialized
course organized by the CERN Accelerator School (CAS). The course was held in
Ebeltoft, Denmark, from 8-17 June, 2010 in collaboration with Aarhus
University, with the topic ’RF for Accelerators’ While this topic has been
covered by CAS previously, early in the 1990s and again in 2000, it was
recognized that recent advances in the field warranted an updated course.
Following introductory courses covering the background physics, the course
attempted to cover all aspects of RF for accelerators; from RF power
generation and transport, through cavity and coupler design, electronics and
low level control, to beam diagnostics and RF gymnastics. The lectures were
supplemented with several sessions of exercises, which were completed by
discussion sessions on the solutions.

¡h2¿Lectures¡/h2¿

¡p¿ LIST:arXiv:1201.2345¡br¿

LIST:arXiv:1111.4354¡br¿

LIST:arXiv:1201.2346¡br¿

LIST:arXiv:1201.4068¡br¿

LIST:arXiv:1112.3177¡br¿

LIST:arXiv:1112.3201¡br¿

LIST:arXiv:1112.3203¡br¿

LIST:arXiv:1112.3209¡br¿

LIST:arXiv:1112.3221¡br¿

LIST:arXiv:1112.3226¡br¿

LIST:arXiv:1201.3202¡br¿

LIST:arXiv:1111.4897¡br¿

LIST:arXiv:1201.1154¡br¿

LIST:arXiv:1201.2593¡br¿

LIST:arXiv:1201.2597¡br¿

LIST:arXiv:1201.2598¡br¿

LIST:arXiv:1201.2600¡br¿

LIST:arXiv:1201.3247¡br¿

LIST:arXiv:1112.3232¡br¿

LIST:arXiv:1112.2176¡br¿ ¡/p¿ ¡/body¿¡/html¿