# HERMITIAN AND UNITARY ALMOST-COMPANION MATRICES OF POLYNOMIALS ON DEMAND

L.A. Markovich1,2,3,4∗, A. Migliore5 and A. Messina6
1Instituut-Lorentz, Universiteit Leiden, P.O. Box 9506,
2300 RA Leiden, The Netherlands
2QuTech and Kavli Institute of Nanoscience, Delft University of Technology,
2628 CJ, Delft, The Netherlands
3Institute for information transmission problems, Moscow,
Bolshoy Karetny per. 19, build. 1, Moscow 127051, Russia
4Russian Quantum Center, Skolkovo, Moscow 143025, Russia
5Department of Chemical Sciences, University of Padova,
Via Marzolo 1, 35131 Padova, Italy
6Dipartimento di Matematica ed Informatica dell’Universita di Palermo,
Via Archirafi 34, 90123 Palermo, Italy
∗Corresponding author e-mail<EMAIL_ADDRESS>
###### Abstract

We introduce the concept of Almost-Companion Matrix (ACM) by relaxing the non-
derogatory property of the standard Companion Matrix (CM). That is, we define
an ACM as a matrix whose characteristic polynomial coincides with a given
monic and generally complex polynomial. The greater flexibility inherent in
the ACM concept, compared to CM, allows the construction of ACMs that have
convenient matrix structures satisfying desired additional conditions,
compatibly with specific properties of the polynomial coefficients. We
demonstrate the construction of Hermitian and Unitary ACMs starting from
appropriate third degree polynomials, with implications for their use in
physical-mathematical problems such as the parameterization of the
Hamiltonian, density, or evolution matrix of a qutrit. We show that the ACM
provides a means of identifying properties of a given polynomial and finding
its roots. For example, we describe the ACM-based solution of cubic complex
algebraic equations without resorting to the use of the Cardano-Dal Ferro
formulas. We also show the necessary and sufficient conditions on the
coefficients of a polynomial for it to represent the characteristic polynomial
of a unitary ACM. The presented approach can be generalized to complex
polynomials of higher degree.

Keywords: Companion matrix; almost-companion matrix; Hermitian matrix; unitary
matrix; complex polynomial; density matrix; sub-parameterization

##  1 Introduction

Given a complex and monic111A monic polynomial is a univariate polynomial in
which the leading coefficient is equal to 1. polynomial $P_{n}(z)$, it is
always possible to define a matrix with a specified arrangement of the
polynomial coefficients as its entries, such that $P_{n}(z)$ coincides with
the characteristic polynomial of the matrix. The set $S(P_{n}(z))$ of all
these $n\times n$ matrices with complex entries, sharing the same
characteristic polynomial $P_{n}(z)$, is infinite and can include both
derogatory and nonderogatory222A square matrix is called derogatory
(nonderogatory) when the degree of its minimal polynomial is less than (equal
to) the order $n$ of the matrix. The term derogatory has been coined by
Sylvester in the early years following 1880. Etymologically, it probably
originates from the Latin verb ”derogare”, in its particular meaning of
”decrease”, to underline that the degree of the minimal polynomial of the
matrix is less than $n$. matrices. We observe, in fact, that, by definition,
the Frobenius Matrix [1] of the shared characteristic polynomial always
belongs to $S(P_{n}(z))$. A remarkable property of this matrix, which stems
directly from its construction, is the coincidence between its characteristic
and minimal polynomials, whatever $P_{n}(z)$. Therefore this matrix is
classified as nonderogatory and, following Horn and Johnson [2], it is known
as the Companion Matrix (CM)333As reported by Hawkins [3], the term companion
matrix was coined by Loewy in 1917 [4]. In 1946 MacDuffee introduced the term
”companion matrix” as a translation from the German ”Begleitmatrix”. of its
characteristic or minimal polynomial.

Henceforth, we refer to the Frobenius Matrix as the Frobenius Companion matrix
($FCM$) of $P_{n}(z)$. When the algebraic multiplicity of each of the $n$
eigenvalues of the $FCM$ is 1, any matrix in $S(P_{n}(z))$ is nonderogatory,
since these $n$ distinct eigenvalues are all necessarily roots of its minimal
polynomial, which therefore has degree $n$ [2]. We also remark that this
condition guarantees that each matrix in the $S(P_{n}(z))$ set is
diagonalizable [2] and that, consequently, all matrices $\in S(P_{n}(z))$ can
be generated from the $FCM$ $\in S(P_{n}(z))$ by means of a similarity
transformation. In this way, by definition and under the conditions
established for the spectrum $\sigma(FCM)$ of $FMC$, $S(P_{n}(z))$ includes
all and only the companion matrices of $P_{n}(z)$.

When, instead, the distinct roots of the common characteristic polynomial are
$p<n$, $S(P_{n}(z))$ includes infinite derogatory matrices, which cannot be
structurally similar to the Frobenius matrix444We point out that, in this
case, the Frobenius matrix is no longer diagonalizable, since, being
nonderogatory by construction, it necessarily has at least one eigenvalue with
geometric multiplicity smaller than the (algebraic) multiplicity. and to any
nonderogatory matrix belonging to $S(P_{n}(z))$. For example, consider that
the set $S(P_{n}(z))$ contains the diagonal matrices whose $n$ entries are
nothing but the $p$ distinct roots of the characteristic polynomial repeated
as many times as their multiplicities, whose sum is $n$. The degree of their
characteristic polynomial is $n$, while the degree of their minimal polynomial
is $p<n$ [2]. Therefore, these matrices are derogatory, as are the infinite
matrices generated from them by similarity.

The Frobenius matrix dates back to 1879 and was given in the form [1]:

$\displaystyle C_{n}=\left(\begin{array}[]{ccccc}0&0&\ldots&0&-c_{n-1}\\\
1&0&\ldots&0&-c_{n-2}\\\ 0&1&\ldots&0&-c_{n-3}\\\
\vdots&\vdots&\ddots&\vdots&\vdots\\\ 0&0&\ldots&1&-c_{1}\\\
\end{array}\right)$ (6)

by the German mathematician Ferdinand Georg Frobenius [3]. Sometimes, in the
literature it is presented in three other unitarily transformed forms, all
parameterized in terms of the $n$ coefficients of the polynomial $P_{n}(z)$
and with the same number of entries equal to 0 or 1 as in (6) [5]. When the
$n$ eigenvalues of the Frobenius matrix are distinct, the unitary matrix that
yields the diagonal form of (6) is the Vandermont matrix of its $n$
eigenvalues. This property, as well as other properties and some applications
of the Frobenius matrix may be found in [5].

Despite the fact that the first CM was proposed more than 140 years ago, the
generation of different CMs (with further properties) has attracted a great
deal of application research activity. CMs emerge naturally in mathematical
methods for finding and characterizing the roots of polynomials [6, 7, 8, 9,
10, 11] and can be applied as well in the determination of solutions of high-
order scalar linear differential and difference equations [12]. CMs can give
matricial representations of some fields [13] and are widely used in control
theory, for example in writing the controllable canonical form associated with
the transfer function of a system [14]. The product of CMs is also used in the
study of random walks and Markov chains [15].

The original structure of the FCM shows a modest level of flexibility and, in
fact, has stimulated the search and the emergence of generalizations leading
to new proposals of CMs that pave the way to applications beyond the FCM. To
this end, a successful strategy is based on a radical change of the basis in
which the characteristic polynomial $P_{n}(z)$ of the FCM is represented. By
definition, $P_{n}(z)$ is monic and is written as the sum of $z^{n}$ and a
linear combination with coefficients in $\mathbb{C}$ of
$1,z,z^{2},\dots,z^{n-1}$. All these $n+1$ powers of $z$ constitute the
monomial basis which can be replaced by other polynomial bases. In this way,
one can introduce new (still nonderogatory) CMs with nonvanishing elements on
the main, sub and super diagonals. For example, the Chebyshev basis,
independently adopted by Specht [16, 17] and Good [18], led to a new CM called
the colleague matrix. This approach has been further generalized by Barnett
[5], who considered a basis of orthogonal polynomials and named the newly
emerged CMs comrade matrices. Subsequently, Barnett proposed to call
confederate matrices the CMs arising from the use of a general polynomial
basis [19].

The applications dedicated to the classic problem of finding the real zeros of
a real coefficient polynomial of arbitrary degree deserves a special mention,
because in this context the CMs have inspired a different approach, alongside
exquisitely mathematical and computational investigations [20, 21, 22, 23, 24,
25]. In the last decade, new quantum theory-based root-finding algorithms
exploiting the construction of Hermitian companion matrices [26, 27, 28, 29,
30, 31] have also been proposed, thus increasing the interest in the study of
CMs and related matrices in the rapidly growing research field of quantum
computing.

The above is the general context for the main question addressed by this
paper: is it possible to find a CM of a real or complex polynomial that is
also hermitian/unitary, for example, or possesses some other prescribed
special matrix structure? This question has so far been answered only
partially.

In [32] the CM for a $P_{n}(z)$ with real coefficients and real zeros is
constructed as a real symmetric tridiagonal Hermitian matrix. This provides a
complete solution to a problem raised and partly solved by M. Fiedler in [33],
which has rekindled the interest in the general structure of CMs. Note that
the Frobenius matrix is itself a Fiedler matrix after a reverse permutation
matrix similarity. In [34] all CMs are characterized in terms of combinatorial
structure to generate new CMs. It is interesting to note that both the
Frobenius and Fiedler CMs are sparse matrices, as they have $2n-1$ nonzero
elements [35]. A new class of sparse CMs, also known as intercyclic CMs, was
introduced in [34] and includes the Fiedler matrices as a special case. In
[35] the non-sparse CMs are introduced noting that they are not connected with
the sparse ones by a reverse permutation matrix similarity.

To the best of our knowledge, the question of whether the CM of a complex
polynomial can be sought as unitary or Hermitian is still open.

###  1.1 Purpose and contribution of this study

CMs generally show relatively limited versatility due to their combinatorial
structure. For example, the FCM is never Hermitian or unitary. Searching for
CMs that satisfy additional constrains of this kind is important when a given
class of parametric polynomials is designed to reach a reliable theoretical
control of a quantum physical scenario. Finding exact flexible solutions of
well-defined inverse problems of this kind is a target of the present study.
We stress that, for application purposes, we often do not need to associate
nonderogatory matrices to a given polynomial. To emphasize this peculiar
aspect of our matrix construction, we introduce the term Almost-Companion
Matrix (ACM) to refer to matrices that have a given polynomial as their
characteristic polynomial but can be derogatory. Clearly, every CM is also an
ACM, that is, the set of all ACMs is a superset of the set of all CMs of a
given polynomial.

In short, in this study we address the following inverse problem: given a real
or complex polynomial of any kind (for example, it may belong to a special
class of polynomials, which is reflected in some special condition satisfied
by its coefficients), we find a parametric ACM555By parametric we mean that
the entries of the ACM can be functions of the polynomial coefficients. that
satisfies preassigned conditions (e.g., those required to be Hermitian or
unitary) and whose characteristic polynomial coincides with the given one. For
definiteness, our investigation is here limited to complex polynomials of
third degree ($n=3$), and its extension to higher degree polynomials is
discussed.

The solution of the inverse problem outlined above for polynomials of order
$n=3$ is accompanied by some useful applications. The relaxed constraints that
characterize an ACM, as compared with a CM, allow the freedom to search, from
the outset, for a trial ACM of a given $P_{n}(z)$ that is a Hermitian,
unitary, or positive matrix, for example. If our inverse problem can be solved
systematically through an approach that finds such ACMs whatever the given
$P_{n}(z)$, then we readily have at our disposal a good platform for
successful applications to problems such as those mentioned below.

###  1.2 Physical applications

Constructing an ACM of a given generally complex polynomial, in addition to
being interesting in itself, also has considerable applications. In elementary
algebra, for example, it could be a solution tool for counting the number of
the real roots (and consequently that of the complex roots in the case of a
complex polynomial) of a real or complex polynomial. In addition, it may help
determine a (or the only) real root of a real polynomial of odd degree. In
quantum mechanics or quantum information, it could provide new parametric
representations of the density operator or the evolution operator of a
physical system living in a finite dimensional Hilbert space.

The results found for a generic complex polynomial can be applied to the
important particular case of a real polynomial. Investigating such a link is
certainly of interest in Physics. For example, in classical physics, cubic
real polynomials appear when looking for the principal axes of symmetric
Cartesian tensors of rank two, such as inertia or magnetic/electric dipolar
tensors [36]. In quantum mechanics they enter the scene as characteristic
polynomials of any observable of a physical system that lives in a three-
dimensional Hilbert space, such as, for example, a three-level atom or a
qutrit. Recipes for constructing an ACM of a cubic polynomial possessing real
roots after the appropriate assignment of parametric real coefficients could
provide an easy way to build, e.g., Hamiltonian qutrit models on demand for
control purposes, or even the density operator describing a mixed state of a
three-level atom.

The paper is organized as follows. In Sec. 2 we formulate the inverse problem
consisting in the search of the ACM for a generic complex polynomial. In Sec.
3 we construct the ACMs for a generic cubic complex polynomial. Through these
ACMs, we introduce a way to find the roots of the given polynomial without
using the Cardano-Dal Ferro formulas. The case of the polynomial with real
coefficients is also discussed in detail. In Sec. 4 we present an application
in quantum mechanics, constructing on demand the density matrix of a qutrit
system as an ACM. Sec. 5 shows the construction on demand of the unitary ACM
of a qutrit. Possible extensions to higher degree polynomials, as well as
further possible applications, are discussed in Sec. 6.

##  2 Formulation of the Inverse Problem

Consider a matrix $A\in M_{n}$, where $M_{n}$ is the set of all $n\times n$
matrices over the complex field $\mathbb{C}$. Denoting $I_{n}\in M_{n}$ the
identity matrix, the monic polynomial in the complex variable $z$

$\displaystyle\det{(zI_{n}-A)}$ $\displaystyle=$ $\displaystyle
z^{n}+c_{1}z^{n-1}+\cdots c_{n-1}z+c_{n}$ (7)

is, by definition, the characteristic polynomial of $A$ and belongs to the set
$\mathbb{P}{{}_{n}}[\mathbb{C}]$ of all complex monic polynomials of degree
$n$.

It is well known that its $n$ coefficients $c_{k}$, $k=1,2\dots,n$ contain
information about the elements of $A$ that is invariant under arbitrary
similarity transformations666That is, under any transformation of the form
$A\longrightarrow P^{-1}AP$, where $P$ is a non singular matrix.. In fact,
$(-1)^{k}c_{k}$ is the sum of all the principal minors of order $k$ of $A$. In
particular, $c_{1}=-\text{Tr}{A}$ and $c_{n}=(-1)^{n}\det{A}$. The profound
interrelationship between a matrix and its characteristic polynomial becomes
even more surprising considering the Cayley-Hamilton theorem777The Cayley-
Hamilton theorem states that every square matrix over a commutative ring (such
as the real or complex numbers, or the integers) satisfies its own
characteristic equation. [2] and/or the Newton’s identities [37], which reveal
the existence of finite algebraic expressions for the coefficients of the
characteristic polynomial of a matrix in terms of traces of powers (up to $n$)
of the matrix. [38, 39].

The function $C:\mathbb{M}_{n}\to\mathbb{P}_{n}[\mathbb{C}]$ is surjective but
not injective, and hence it cannot be inverted. In fact, it is easy to
convince oneself that, for any element
$P_{n}(z)\in\mathbb{P}{{}_{n}}[\mathbb{C}]$, $C^{-1}({P}_{n}(z))$ is indeed an
infinite subset of $\mathbb{M}_{n}$, since by definition it consists of all
and only the matrices belonging to $M_{n}$ whose characteristic polynomial is
${P}_{n}(z)$.

Thus, while the direct or forward problem of finding the characteristic
polynomial of a given $n\times n$ matrix is certainly well-posed according to
Hadamard [40], conversely, the problem of finding a matrix
$A\in\mathbb{M}_{n}$ generating a given complex polynomial $P_{n}(z)$ is an
ill-posed inverse problem [41, 42], as it manifestly violates Hadamard’s
uniqueness requirement, considering that every element $\in
C^{-1}({P}_{n}(z))$ is a solution to the problem.

It is possible to overcome such an ill-posedness by introducing a restriction
$C\big{|}_{[C]_{n}}$ of the function $C$ to a subset $[C]_{n}$ of
$\mathbb{M}{{}_{n}}$ which is injectively and surjectively valued on
$\mathbb{P}{{}_{n}}[\mathbb{C}]$. To this end, let us first observe that the
function $C$ is surjective and, by definition, ${P}_{n}(z)$ is the
characteristic polynomial of all and only the matrices belonging to
$C^{-1}({P}_{n}(z))\subset\mathbb{M}{{}_{n}}$. Moreover,
$C^{-1}({P}_{n}(z))\cap C^{-1}({P^{\prime}}_{n}(z))=\emptyset$ when
${P}_{n}(z)\neq{P^{\prime}}_{n}(z)$. Therefore, the infinite subsets
$C^{-1}({P}_{n}(z))$ of $\mathbb{M}{{}_{n}}$ corresponding to the infinite
$n$-degree polynomials ${P}_{n}(z)$ represent a partition of
$\mathbb{M}{{}_{n}}$. We can say equivalently that we are introducing in
$\mathbb{M}{{}_{n}}$ the equivalence relation $A\sim B$ consisting in the
condition that $A\in\mathbb{M}{{}_{n}}$ and $B\in\mathbb{M}{{}_{n}}$ share the
characteristic polynomial and thus belong to a given equivalence class
$C^{-1}({P}_{n}(z))$. At this point,we define the subset $[C]_{n}$ by choosing
one element from each equivalence class. According to Zermelo’s postulate,
$[C]_{n}\neq\emptyset$ can always be constructed (in infinitely many ways in
the present case, since each equivalence class is infinite), and the
cardinality of its intersection with $C^{-1}({P}_{n}(z))$ is precisely one for
any ${P}_{n}(z)$ by construction. Therefore, every one-to-one function
$C\big{|}_{[C]_{n}}:[C]_{n}\to\mathbb{P}{{}_{n}}[\mathbb{C}]$ obtained by
applying the axiom of choice to the quotient set $\mathbb{M}{{}_{n}}/\sim$ to
generate $[C]_{n}$ is invertible. Hence, the function
$C\big{|}_{[C]_{n}}^{-1}:\mathbb{P}{{}_{n}}[\mathbb{C}]\to[C]_{n}$ defines a
$[C]_{n}$-dependent Hadamard well-posed inverse problem, whose solution, by
construction, can be given in terms of $[C]_{n}$ in the form

$\displaystyle C\big{|}_{[C]_{n}}^{-1}{(P_{n}(z))}=[C]_{n}\cap
C^{-1}({P}_{n}(z)).$ (8)

We remark that different legitimate choices of the subset $[C]_{n}$ lead to
different inverse problems, all well-posed in the fixed domain
$\mathbb{P}{{}_{n}}[\mathbb{C}]$, and the corresponding solutions (8) differ
in the generally non-similar images of one or more polynomials
${P}{{}_{n}}(z)$.

We also point out that any derogatory matrix $D$ cannot be classified as a
companion matrix of its characteristic polynomial
$P_{D}(z)\equiv\det(zI_{n}-D)$, since $D$ annihilates a polynomial having a
degree lower than that of $P_{D}$ [2].

In this paper, a matrix whose characteristic polynomial coincides with a given
polynomial $P_{n}(z)$ is called an Almost-Companion Matrix of $P_{n}(z)$.
Clearly, any CM of $P_{n}(z)$ is an ACM too. A derogatory matrix $D$ such that
$P_{D}(z)=P_{n}(z)$ is an ACM. In addition, a matrix similar to an ACM is
still an ACM. The converse of this statement is generally false: two ACMs of
the same given polynomial are not necessarily similar [43]. The set of all the
ACMs of $P_{n}(z)$ cannot be generated by similarity transformations starting
from an assigned ACM, since this set always includes both derogatory and
nonderogatory matrices.

##  3 Almost-Companion Matrices of a Cubic Complex Polynomial

In this section, we focus on the search of an ACM for the third degree
polynomial

$\displaystyle P_{3c}(\eta)=\eta^{3}+p\eta+q,$ (9)

which is the canonical form of

$\displaystyle P_{3}(z)$ $\displaystyle=$ $\displaystyle
z^{3}+c_{1}z^{2}+c_{2}z+c_{3},$ (10)

obtained by the translation

$\displaystyle\eta=z+\frac{c_{1}}{3}.$ (11)

The generally complex numbers $p$ and $q$ in (9) are related to the
coefficients of $P_{3}(z)$ as follows:

$\displaystyle p=-\frac{c_{1}^{2}}{3}+c_{2},\quad
q=\frac{2c_{1}^{3}}{27}-\frac{c_{1}c_{2}}{3}+c_{3}.$ (12)

We denote $Q_{3c}$ the ACM of $P_{3c}(\eta)$ defined by

$\displaystyle P_{3c}(\eta)$ $\displaystyle\equiv$ $\displaystyle\det(\eta
I_{3}-Q_{3c})=\det((\eta-\textstyle\frac{c_{1}}{3})I_{3}-(Q_{3c}-\frac{c_{1}}{3}I_{3}))$
(13) $\displaystyle=$
$\displaystyle\det(zI_{3}-(Q_{3c}-\textstyle\frac{c_{1}}{3}I_{3}))\equiv
P_{3}(z),$

which means that

$\displaystyle Q_{3}=Q_{3c}-\textstyle\frac{c_{1}}{3}I_{3},$ (14)

is the simple recipe to get the corresponding ACM $Q_{3}$ of $P_{3}(z)$ from
$Q_{3c}$. This analysis sheds light on the advantage of first deriving
$Q_{3c}$ for the simpler canonical form of a given polynomial and then finding
$Q_{3c}$ from the straightforward relation (9). Next, we formulate a trial ACM
$Q_{3c}$ of (9). To this end, we observe that, in accordance with the Vieta-
Girard formula for the sum of the roots of (9) [44], the absence of the
quadratic term in $P_{3c}(\eta)$ implies that $\mbox{tr}(Q_{3c})=0$. Moreover,
every matrix with elements in $\mathbb{C}$ is unitarily equivalent to a matrix
with equal main diagonal elements [2]. Thus, it is legitimate to set the
diagonal elements of our trial $Q_{3c}$ equal to zero. In constructing an ACM
of (9), we aim to write its non diagonal elements in such a way that, in the
particular case of a real cubic $P_{3}$, and hence $P_{3c}$, the trial matrix
$Q_{3c}$ becomes structurally Hermitian provided that $p$ and $q$ in (9)
satisfy specific conditions, which will also be derived within our approach.
The feasibility of this approach will highlight the greater flexibility of the
ACMs compared to that of the CMs.

Following this strategy, we propose the following trial $Q_{3c}$:

$\displaystyle Q_{3c}\equiv
Q_{3c}(\rho,\varphi,\varphi_{13})=-\left(\begin{array}[]{ccc}0&\rho
e^{i\frac{\varphi}{2}}&\rho e^{i\frac{\varphi}{2}}e^{i\varphi_{13}}\\\ \rho
e^{i\frac{\varphi}{2}}&0&\rho e^{i\frac{\varphi}{2}}\\\ \rho
e^{i\frac{\varphi}{2}}e^{-i\varphi_{13}}&\rho e^{i\frac{\varphi}{2}}&0\\\
\end{array}\right),$ (18)

where the minus sign was introduced for convenience, considering the form of
the charateristic polynominal. In equation (18), $\rho$ is real and positive,
$\varphi$ is real, whereas $\varphi_{13}$ is, in general, a complex number. It
is readily seen that, when $\varphi=0$ or $\pi$ and $\varphi_{13}$ is real,
the matrix $Q_{3c}(\rho,\varphi,\varphi_{13})$ is Hermitian, consistent with
our search strategy. It is useful to note that the complex conjugate of
$e^{i\varphi_{13}}$ is $e^{-i\varphi_{13}^{\star}}$, where
$\varphi_{13}^{\star}$ denotes the conjugate of $\varphi_{13}$.

The characteristic polynomial of $Q_{3c}(\rho,\varphi,\varphi_{13})$ is

$\displaystyle\det{(\eta
I_{3}-Q_{3c}(\rho,\varphi,\varphi_{13}))}=\eta^{3}-3\rho^{2}e^{i\varphi}\eta+2\rho^{3}e^{\frac{3}{2}i\varphi}\cos{\varphi_{13}}.$
(19)

Then, identifying the polynomial (9) with (19) yields:

$\displaystyle\left\\{\begin{array}[]{l}p\equiv|p|e^{i\Theta_{p}}=-3\rho^{2}e^{i\varphi}=3\rho^{2}e^{i(\varphi+\pi)},\\\
q=2\rho^{3}e^{{\frac{3}{2}}i\varphi}\cos{\varphi_{13}}.\end{array}\right.$
(22)

Given $p$, the first equation (22) allows us to fix $\rho$ and select
$\varphi$ (in an infinite set) as follows:

$\displaystyle\rho=\sqrt{\frac{|p|}{3}},\quad\varphi=\Theta_{p}-\pi.$ (23)

Defining, for $p\neq 0$, the complex parameter

$\displaystyle\chi=\frac{-iqe^{-\frac{3}{2}i\Theta_{p}}}{2\sqrt{\frac{|p|^{3}}{27}}},$
(24)

the second equation (22) becomes an elementary trigonometric equation in
$\mathbb{C}$:

$\displaystyle\cos{\varphi_{13}}=\chi,$ (25)

which admits infinitely many solutions for any $\chi$; in fact, similarly to
the cosine function of a real variable, the complex cosine function is even
and periodic with period $2\pi$.

Using Euler’s formula, equation (25) is easily transformed into a quadratic
equation in the variable $e^{i\varphi_{13}}$, whose solution leads to

$\displaystyle\varphi_{13}=-i\ln\left(\chi+{i|1-\chi^{2}|}^{\frac{1}{2}}e^{\frac{i}{2}\arg(1-\chi^{2})}\right)=\arccos\chi.$
(26)

Due to the presence of the multi-valued complex function $\arg(\chi^{2}-1)$,
expression (26) represents the set of infinite images of $\chi$ generated by
the inverse of the non-injective cosine function over $\mathbb{C}$. Therefore,
strictly speaking, the expression found for $\varphi_{13}$ cannot be
introduced as it is in the matrix $Q_{3c}(\rho,\varphi,\varphi_{13})$. In
fact, the three parameters appearing in the trial ACM (19) of (9) must be
single-valued functions of the complex coefficients $p$ and $q$. For our
purposes, therefore, we now need to extract a specific single-valued complex
function from the multi-valued function $\varphi_{13}$.

The single-valued complex function that we use here is the principal value
$\Phi_{13}$ of $\varphi_{13}$, which is obtained from (26) by substituting the
multi-valued functions $\arg$ and $\ln$ with their principal values, denoted
$\operatorname{Arg}$ and $\operatorname{Ln}$, respectively. This choice
amounts, by definition, to constructing the principal value
$\operatorname{Arccos}{(\chi)}$ of function $\arccos(\chi)$, which is mostly
used in the literature [45, 46]. It is worth noting that equation (26) can
also be written in terms of $\chi^{2}-1$, but then the use of the principal
value in the resulting expression for $\varphi_{13}$ would have some
drawbacks, as is discussed in detail in [47]. The procedure described above
gives

$\displaystyle\Phi_{13}$ $\displaystyle\equiv$
$\displaystyle\Phi_{13}(\chi)=-i\operatorname{Ln}\left(\chi+i|1-\chi^{2}|^{\frac{1}{2}}e^{\frac{i}{2}\operatorname{Arg}(1-\chi^{2})}\right)\equiv\operatorname{Arccos}{(\chi)}$
(27) $\displaystyle=$
$\displaystyle\operatorname{Arg}\left(\chi+i|1-\chi^{2}|^{\frac{1}{2}}e^{\frac{i}{2}\operatorname{Arg}(1-\chi^{2})}\right)-i\operatorname{\textit{ln}}\left(\left|\chi+i|1-\chi^{2}|^{\frac{1}{2}}e^{\frac{i}{2}\operatorname{Arg}(1-\chi^{2})}\right|\right)$
$\displaystyle\equiv$ $\displaystyle Re(\Phi_{13})+iIm(\Phi_{13}),$

where $\operatorname{\textit{ln}}$ denotes the ordinary real logarithm of its
positive argument and the first term in (27) is the principal value of
$\operatorname{arg}(\chi+{i|1-\chi^{2}|}^{\frac{1}{2}}e^{\frac{i}{2}\operatorname{Arg}(1-\chi^{2})})$,
which, by definition, generates real images in $(-\pi,\pi]$. Equation (27)
provides the algebraic representation of the complex single-valued function
$\operatorname{Arccos}{(\chi)}$ whatever $\chi\in\mathbb{C}$. Note that, for
any real $\chi$ such that $|\chi|\leq 1$ $(|\chi|\geq 1)$, the immaginary
(real) component of $\Phi_{13}$ identically vanishes.

We have determined all the ingredients for constructing the trial ACM of (9)
when $p\neq 0$. In accordance with (27), this ACM is a generally non-Hermitian
matrix that can be written as follows:

$\displaystyle\widetilde{Q}_{3c}(p,q)=\sqrt{\frac{|p|}{3}}e^{i\frac{\varphi_{p}}{2}}\left(\begin{array}[]{ccc}0&1&e^{i\Phi_{13}(\chi)}\\\
1&0&1\\\ e^{-i\Phi_{13}(\chi)}&1&0\\\ \end{array}\right).$ (31)

where

$\displaystyle\varphi_{p}=\Theta_{p}+\pi.$ (32)

Thus, based on (14), the ACM of (10) has the form

$\displaystyle\widetilde{Q}_{3}(p,q)=\left(\begin{array}[]{ccc}-\frac{c_{1}}{3}&\sqrt{\frac{|p|}{3}}e^{i\frac{\varphi_{p}}{2}}&\sqrt{\frac{|p|}{3}}e^{i\left[\frac{\varphi_{p}}{2}+\Phi_{13}(\chi)\right]}\\\
\sqrt{\frac{|p|}{3}}e^{i\frac{\varphi_{p}}{2}}&-\frac{c_{1}}{3}&\sqrt{\frac{|p|}{3}}e^{i\frac{\varphi_{p}}{2}}\\\
\sqrt{\frac{|p|}{3}}e^{i\left[\frac{\varphi_{p}}{2}-\Phi_{13}(\chi)\right]}&\sqrt{\frac{|p|}{3}}e^{i\frac{\varphi_{p}}{2}}&-\frac{c_{1}}{3}\\\
\end{array}\right).$ (36)

We can find an ACM of (9) for $p=0$ through the same kind of approach,
beginning with a matrix different from (18). Our solution, denoted by
$\overline{Q}_{3c}(q)$, can be cast as follows:

$\displaystyle\overline{Q}_{3c}(q)=\left(\frac{|q|}{\sqrt{3}}\right)^{\frac{1}{3}}e^{\frac{i}{3}\operatorname{Arg}(iq)}\left(\begin{array}[]{ccc}0&1&1\\\
-e^{-i\frac{4}{3}\pi}&0&-1\\\ -e^{i\frac{4}{3}\pi}&1&0\\\ \end{array}\right).$
(40)

For completeness, we also write $\widetilde{Q}_{3c}(p,0)$ $(\chi=0)$:

$\displaystyle\widetilde{Q}_{3c}(p,0)=\sqrt{\frac{|p|}{3}}e^{i\frac{\varphi_{p}}{2}}\left(\begin{array}[]{ccc}0&1&i\\\
1&0&1\\\ -i&1&0\\\ \end{array}\right),$ (44)

since $\Phi_{13}(0)=\pi/2$ from (27). It is not difficult to see that the
eigenvalues of (44) are $0$ and
$\pm|p|^{\frac{1}{2}}e^{\frac{i\varphi_{p}}{2}}$.

Above, we formulated and solved the inverse problem of finding ACMs of generic
cubic complex polynomials. Next, exploiting these ACMs, we will present a way
to find the roots of the given polynomial without resorting to the Cardano-Dal
Ferro formulas, and then we will delve into the implications of having a
polynomial with real coefficients on the form of the ACM and its roots.

###  3.1 Roots Characterization

Next we assume that $p\neq 0$. Then, the eigenvalues of
$\widetilde{Q}_{3c}(p,q)$ are the roots of (9), and hence the roots of the
characteristic polynomial of the matrix appearing in the right-hand side of
(31), each multiplied by the pre-factor
$\sqrt{\frac{|p|}{3}}e^{i\frac{\varphi_{p}}{2}}$. This characteristic
polynomial $\tilde{P}_{3c}(\tilde{\eta})$ in the unknown $\tilde{\eta}$ has
the form

$\displaystyle\tilde{P}_{3c}(\tilde{\eta})={\tilde{\eta}}^{3}-3{\tilde{\eta}}-2\cos(\Phi_{13}(\chi)).$
(45)

The cosine representation of the free term in the polynomial (45) is
remarkable, because it allows one to guess, at first glance, one of its three
roots and then to exactly construct the other two by simply reducing the cubic
polynomial $\tilde{P}_{3c}(\tilde{\eta})$ to a quadratic polynomial. In fact,
without resorting to the well-known Cardano-Dal Ferro formulas [48], and using
instead the elementary triplication formula for the cosine function
$\cos(3z)=4\cos^{3}(z)-3\cos(z)$, which also holds in the complex field, it is
immediate to see that the generally complex expression888An equivalent
solution was obtained in [49], using an angle offset by $-\pi$ with respect to
$\Phi_{13}$. Solutions in trigonometric form of the canonical (or depressed)
cubic equation equivalent to those presented here and in [49] were obtained by
Francois Viete (1540-1603) for the case in which the polynomial in equation
(9) is real.

$\displaystyle\tilde{\eta}_{1}=2\cos\left(\textstyle{\frac{1}{3}}\Phi_{13}(\chi)\right)$
(46)

is a root of (45) whatever the complex coefficients $p\neq 0$ and $q$. The
algebraic representation (27) of $\Phi_{13}(\chi)$ is the key to explicitly
write the $p$\- and $q$-dependence of the real and imaginary components of the
algebraic expression for $\tilde{\eta}_{1}$, which are obtained using Euler’s
formula as

$\displaystyle
Re(\tilde{\eta}_{1})=2\cos\left({\frac{1}{3}}Re(\Phi_{13})\right)\cosh\left({\frac{1}{3}}Im(\Phi_{13})\right),$
(47) $\displaystyle
Im(\tilde{\eta}_{1})=-2\sin\left({\frac{1}{3}}Re(\Phi_{13})\right)\sinh\left({\frac{1}{3}}Im(\Phi_{13})\right),$
(48)

where $Re(\Phi_{13})$ and $Im(\Phi_{13})$ are defined in (27). The other two
roots are easily found to be [49]

$\displaystyle\tilde{\eta}_{k}=-\frac{1}{2}\tilde{\eta}_{1}+(-1)^{k+1}\sqrt{3}|{\sin}^{2}\left(\textstyle{\frac{1}{3}}\Phi_{13}(\chi)\right)|^{\frac{1}{2}}e^{\frac{i}{2}\operatorname{Arg}\sin^{2}\left(\textstyle{\frac{1}{3}}\Phi_{13}(\chi)\right)},\quad
k=2,3.$ (49)

Equations (46) and (49) express the roots of $\tilde{P}_{3c}(\tilde{\eta})$ as
functions of parameter $\Phi_{13}$, which appears in the first and last
antidiagonal terms of matrices (31) and (36). We thus conclude that our
procedure to construct the ACM also yields the roots of the (generally
complex) characteristic polynomial. It is interesting to highlight the
conditions for a complex polynomial to admit real roots (note that the roots
can never be all real, however, if the imaginary part of at least one of the
polynomial coefficients is nonzero). To this end, it is convenient to start
from the polynomial form (10). We write the three coefficients of (10) as
$c_{j}\equiv x_{j}+iy_{j}$, with $j=1,2,3$. If a real root $r$ of (10) exists,
it must satisfy the equation $y_{1}r^{2}+y_{2}r+y_{3}=0$, which results from
equating to zero the imaginary part of the polynomial.
$\delta=(y_{2})^{2}-4y_{1}y_{3}\geq 0$ is clearly a necessary condition for
the existence of the root $r$, and the two only possible expressions of $r$
are $\frac{-y_{2}\pm\sqrt{\delta}}{2y_{1}}$. Then, any of these two
expressions is indeed a root of (10) only if it satisfies the additional
condition $r^{3}+x_{1}r^{2}+x_{2}r=-x_{3}$, which results from the real part
of the polynomial. We can thus state that the cubic polynomial (10) has at
least one real root if and only if the inequality $\delta\geq 0$ and the last
condition are both met. In particular, when $\delta=0$, $r$ is a double root.
Finally, we examine the case $y_{1}=0$ (and $y_{2}\neq 0$, since otherwise no
real root exists for a complex polynomial). Applying the same procedure, one
finds that a real root $r=-\frac{y_{3}}{y_{2}}$ of (10) exists if and only if
the condition $r^{3}+x_{1}r^{2}+x_{2}r=-x_{3}$ holds. It is easy to convince
oneself that this real root has multiplicity two, being a real root of the
first derivative of (10).

###  3.2 Real polynomial case

We now investigate the special form of $\widetilde{Q}_{3c}(p,q)$ in the case
in which the three coefficients of (10) are real, with the aim of establishing
properties of the polynomial roots based on its almost-companion
representation built above.

In this case, (12) implies that $p$ and $q$ are real, and thus (9) is also a
real polynomial over $\mathbb{C}$. Moreover, since $\Theta_{p}$ can only be
$0$ ($p>0$) or $\pi$ ($p<0$), the parameter $\chi$ defined in (24) is purely
imaginary or real, respectively, and therefore its square

$\displaystyle\chi^{2}=-\frac{27q^{2}e^{-3i\Theta_{p}}}{4|p|^{3}}=-\frac{27q^{2}}{4p^{3}},$
(50)

is real for any $p$. As a consequence, using (27) it is not difficult to prove
that, if and only if the discriminant999Note that the discriminant can also be
defined with the opposite sign [50]. Clearly in this case all the inequalities
involving the discriminant of the polynomial in canonical form are to be
inverted.

$\displaystyle\Delta(p,q)\equiv\frac{p^{3}}{27}+\frac{q^{2}}{4}\leq 0,$ (51)

(which implies $p<0$, that is, $\Theta_{p}=\pi$, and $|\chi|\leq 1$), the
imaginary part of $\Phi_{13}(\chi)$ given in equation (27) vanishes, while its
real part assumes the simple expression

$\displaystyle\Phi_{13}(p,q)=\operatorname{Arg}\left(\chi+i\Big{|}1-\chi^{2}\Big{|}^{\frac{1}{2}}\right)=\pi-\operatorname{Arccos}\left(-\frac{3q}{2p}\sqrt{\frac{-3}{p}}\right),$
(52)

where we used the identity
$\operatorname{Arccos}(x)=\pi-\operatorname{Arccos}(-x)$ valid for any real
$x$ such that $|x|\leq 1$. It is worth noting that in the present case (49)
takes the simpler form
$\tilde{\eta}_{k}=-\frac{1}{2}\tilde{\eta}_{1}+(-1)^{k+1}\sqrt{3}\sin\left(\textstyle{\frac{1}{3}}\Phi_{13}(\chi)\right)$
since (52) shows that $\Phi_{13}\in[0,\pi]$.

Under the condition (51) and considering that
$\varphi_{p}=\Theta_{p}+\pi=2\pi$, the specialization of (31) to the case
under scrutiny produces the Hermitian ACM of (9) as

$\displaystyle\widetilde{Q}_{3c}(p,q)=-\sqrt{\frac{|p|}{3}}\left(\begin{array}[]{ccc}0&1&e^{i\Phi_{13}(p,q)}\\\
1&0&1\\\ e^{-i\Phi_{13}(p,q)}&1&0\\\ \end{array}\right),$ (56)

where the real angle $\Phi_{13}$ is given by equation (52). The Hermitian
nature of the ACM built assures that (9), as well as (10), has three real
roots. These roots are distinct when $\Delta(p,q)<0$, while two of them are
coincident if $\Delta(p,q)=0$ [51].

We can write the real roots $x_{k}$ $(k=1,2,3)$ of (10) as follows:

$\displaystyle x_{k}=-\sqrt{\frac{|p|}{3}}\tilde{\eta}_{k}-\frac{c_{1}}{3},$
(57)

where $\tilde{\eta}_{k}$ are the three (real) roots of (45). Equations (46)
and (49), together with (52), yield

$\displaystyle
x_{k}=2\sqrt{\frac{|p|}{3}}\cos\left(\frac{\Phi_{13}(p,q)+(2k+1)\pi}{3}\right)-\frac{c_{1}}{3},\quad
k=1,2,3.$ (58)

It is possible to check that this formula gives the well-known trigonometrical
and translated forms of the three roots of (10) when they are real (see [52]).

When $\Delta(p,q)>0$, only one of the three roots of Equation (9) or (10)
(with real polynomial coefficients) is real, while the other two roots are
complex conjugate. In particular, the real root corresponds to
$\tilde{\eta}_{3}$ for $p>0$ and to $\tilde{\eta}_{1}$ for $p<0$. In more
detail, the three roots are

$\displaystyle z_{1}$ $\displaystyle=\frac{\sqrt{p}}{2}(Y+iX)-\frac{c_{1}}{3}$
(59) $\displaystyle z_{2}$
$\displaystyle=\frac{\sqrt{p}}{2}(Y-iX)-\frac{c_{1}}{3}$ (60) $\displaystyle
z_{3}$ $\displaystyle=-\sqrt{p}Y-\frac{c_{1}}{3}$ (61)

where

$X=\sqrt[3]{\sqrt{1-\chi^{2}}+i\chi}+\sqrt[3]{\sqrt{1-\chi^{2}}-i\chi}$ (62)

and

$Y=\frac{\sqrt[3]{\sqrt{1-\chi^{2}}+i\chi}-\sqrt[3]{\sqrt{1-\chi^{2}}-i\chi}}{\sqrt{3}}$
(63)

with

$\chi=-i\frac{3q}{2p}\sqrt{\frac{3}{p}}$ (64)

for $p>0$, and

$\displaystyle z_{1}$ $\displaystyle=-\sqrt{-\frac{p}{3}}C-\frac{c_{1}}{3}$
(65) $\displaystyle z_{k}$
$\displaystyle=\sqrt{-\frac{p}{3}}\left[\frac{C}{2}+i(-1)^{k}\sqrt{3\left(\frac{C^{2}}{4}-1\right)}\right]-\frac{c_{1}}{3},\quad
k=2,3,$ (66)

where

$C=\sqrt[3]{\chi+\sqrt{\chi^{2}-1}}+\sqrt[3]{\chi-\sqrt{\chi^{2}-1}}$ (67)

with

$\chi=-\frac{3q}{2p}\sqrt{-\frac{3}{p}}$ (68)

for $p<0$ (see derivation in Appendix A).101010A more elaborate derivation of
the roots leading to their formulation in terms of trigonometric functions can
be found in [51].

##  4 Almost-Companion Density Matrices of a Qutrit on Demand

A quantum system living in the Hilbert space $\mathcal{H}$ spanned by three
orthonormal states $\ket{1}$, $\ket{2}$, and $\ket{3}$ is called a qutrit
[53]. A pure state of the qutrit can always be represented as a normalized
linear combination of these three states. To describe an arbitrary pure or
mixed state of the qutrit with the same formalism, one uses instead a linear
operator $\hat{\rho}$ called the density operator [54]. It acts on
$\mathcal{H}$ and, by definition, is positive semi-definite with trace 1:
$\operatorname{\textit{tr}}(\rho)=1$. It is well known that any positive semi-
definite operator is Hermitian since its skew-Hermitian part vanishes [2, 55].
As a consequence, any positive semi-definite operator is diagonalizable, and
it is possible to show that its eigenvalues are real non-negative numbers. In
particular, any density operator $\hat{\rho}$ is Hermitian. The three
eigenvalues of the operator $\hat{\rho}$ describing the state of a qutrit are
the populations of the three eigenstates of $\hat{\rho}$. The $3\times 3$
basis-dependent matrix representation of $\hat{\rho}$, called density matrix
and denoted by $\rho$, is also positive semi-definite and hence Hermitian. We
observe incidentally that, conversely, any Hermitian matrix with non-negative
eigenvalues is positive semi-definite and, if its trace is 1, it is a density
matrix.

The purpose of this section is to demonstrate that our recipe for constructing
the Hermitian ACM of a generic third degree polynomial admitting three real
roots provides an effective tool for writing density matrices of a qutrit on
demand.

The aforementioned definition of density matrix results in unambiguous
properties of the real coefficients of its characteristic polynomial. First of
all, writing this polynomial in the canonical form

$\displaystyle p_{3c}(\eta)=\eta^{3}+p\eta+q,$ (69)

the condition

$\displaystyle p\leq-\frac{3}{2}\sqrt[3]{2q^{2}}$ (70)

stemming from Equation (51) ensures that $\Phi_{13}(p,q)$ is real, so that the
ACM (56) of (69) is Hermitian and hence has real eigenvalues. Then, turning to
form (10) of the monic polynomial through the translation (11), the Vieta-
Girard formula for the sum of the roots [56] implies that the coefficient of
the quadratic term be $-1$. Moreover, Descartes’s sign rule [57] requires that
the four coefficients of polynomial (10) have alternate signs in order to have
three positive routes. Therefore, the characteristic polynomial of an
arbitrary density matrix of a qutrit is necessarily a third-degree real and
monic polynomial of the form

$\displaystyle p_{3}(x)=x^{3}-x^{2}+a^{2}x-b^{2},$ (71)

where $a$ and $b$ are real numbers that satisfy condition (70) after
translation (11). One or two roots are zero if $a\neq 0,b=0$ or $a=0,b=0$,
respectively, while the inequality (70) is never satisfied for $a=0$ and
$b\neq 0$.

In conclusion, under the conditions (70) and (71),
$\widetilde{Q}_{3}(p,q)=\widetilde{Q}_{3c}(p,q)-\textstyle\frac{c_{1}}{3}I_{3}$,
with $\widetilde{Q}_{3c}(p,q)$ given by Equation (56), is a density matrix.
Incidentally, we point out that our inverse problem admits infinitely many
non-Hermitian solutions, that is, non-Hermitian ACMs of (69) or (71), such as,
for example, the corresponding Frobenius companion matrix. Therefore, the
explicit construction of the Hermitian ACM of (71) and, more generally, of any
real third-degree polynomial with only real roots is a successful outcome of
our search strategy (18). This recipe, in turn, forms the basis of the
application presented below.

Let us introduce the set $\mathcal{D}$ of all density matrices of a qutrit in
a given basis $\\{\ket{n},n=1,2,3\\}$ of $\mathcal{H}$. $\mathcal{E}$ be the
binary relation in $\mathcal{D}$ defined as follows: $\rho_{1}\in\mathcal{D}$
and $\rho_{2}\in\mathcal{D}$ are in the relation $\mathcal{E}$ if they are
ACMs of the same polynomial $p_{3}(x)$ defined in (71). This relation,
expressed by writing $\rho_{1}\mathcal{E}\rho_{2}$, is an equivalence relation
as it is manifestly reflexive, symmetric, and transitive. $\mathcal{D}$ is
thus partitioned by $\mathcal{E}$. The quotient set $\mathcal{D}/\mathcal{E}$
consists of all equivalence classes of $\mathcal{D}$ with respect to
$\mathcal{E}$. Each equivalence class, which comprises all density matrices
with the same characteristic polynomial, is represented by one (arbitrarily
chosen) of its elements, $\overline{\rho}$, and is commonly denoted by
$[\overline{\rho}]$. This is where our result (56) enters the scene, providing
an easy way to parameterize the quotient set of $\mathcal{D}$.

It is always possible to use the matrix
$\widetilde{Q}_{3}(p,q)=\widetilde{Q}_{3c}(p,q)-\textstyle\frac{c_{1}}{3}I_{3}$
as the representative element of the equivalence class consisting of all
elements of $\mathcal{D}$ sharing the characteristic polynomial (71), which,
in turn, is uniquely associated to its canonical form (69). In this way, we
establish a one-to-one correspondence between $\mathcal{D}/\mathcal{E}$ and
the set $\mathcal{P}$ of polynomials (69). This correspondence amounts to
parameterize the quotient set of $\mathcal{D}$ in terms of $p$ and $q$. The
most ambitious target of parameterizing the set $\mathcal{D}$ is discussed in
a recent topical issue [58]. It is worth emphasizing that a density matrix
$\rho$ belongs to the class of equivalence
$\left[\widetilde{Q}_{3c}(p,q)-\textstyle\frac{c_{1}}{3}I_{3}\right]$ if and
only if it can be unitarily generated from
$\widetilde{Q}_{3c}(p,q)-\textstyle\frac{c_{1}}{3}I_{3}$, since its
characteristic polynomial, trace, and Hermiticity are unitarily invariant,
thus implying the invariance of the positive semi-definiteness. Therefore,
while two similar matrices are ACMs of the same polynomial, a similarity
transformation of a density matrix does not generate, in general, a density
matrix [2].

Our parameterization of $\mathcal{D}/\mathcal{E}$ in terms of the coefficients
of its characteristic polynomial written in canonical form provides the
theoretical basis for constructing, on demand and in a prefixed basis of
$\mathcal{H}$, almost-companion density matrices of any assigned polynomial
$p_{3}(x)$ fulfilling the condition $\Delta\leq 0$. We illustrate the concrete
applicability of our recipe by constructing an almost-companion density matrix
starting from the polynomial

$\displaystyle p_{3}(x)=x^{3}-x^{2}+\frac{11}{36}x-\frac{1}{36}.$ (72)

The translation: $\eta=x-\frac{1}{3}$ yields

$\displaystyle p_{3c}(x)=\eta^{3}-\frac{1}{36}\eta,$ (73)

so that, in this case, $p=-\frac{1}{36}$ while $q$ vanishes. Exploiting
Equation (52), we easily get:

$\displaystyle\Phi_{13}(-\frac{1}{36},0)=\pi-\operatorname{Arccos}(0)=\frac{\pi}{2}.$
(74)

We have thus obtained the few ingredients necessary to build an almost-
companion density matrix of the given polynomial (72) as the sum
$\widetilde{Q}_{3}$ of the representative element of the corresponding
equivalence class and the matrix $\frac{1}{3}I_{3}$, in accordance with the
realization (36) of (14). That is, the density matrix has the form

$\displaystyle\widetilde{Q}_{3}=\frac{1}{6\sqrt{3}}\left(\begin{array}[]{ccc}2\sqrt{3}&-1&-i\\\
-1&2\sqrt{3}&-1\\\ i&-1&2\sqrt{3}\\\ \end{array}\right).$ (78)

Note that, while in this case it is easy to find the roots of (73) directly,
and then those of (72), in general the roots of the polynomial $p_{3c}(\eta)$
corresponding to a given $p_{3}(x)$ can be found using (58).

We stress that any matrix equivalent to (78) through a unitary transformation
$\hat{V}$ is an almost-companion density matrix of (72) and vice versa. For a
given basis, each density matrix thus obtained describes a different
(generally mixed) state of the qutrit. If, instead, the unitary transformation
is interpreted as the generator of a change of the basis $\\{|n>,n=1,2,3\\}$,
the matrix obtained represents the same density operator in the new basis
$(\hat{V}|n>,n=1,2,3)$.

##  5 Unitary Matrices (Operators) on Demand

The effective construction of density matrices on demand in Section 4, results
from the application of our procedure for constructing ACMs to third degree
polynomials that belong to the set $\mathcal{P}$ and satisfy, a priori,
necessary and sufficient conditions for the existence of positive semi-
definite ACMs of trace 1. By comparison, the construction of almost-companion
unitary matrices on demand (that is, starting from a given appropriate third
degree polynomial) requires addressing two hurdles. The first one is to
establish with certainty whether the given polynomial can be the
characteristic polynomial of a unitary matrix without knowing its zeros a
priori. The second difficulty lies in the fact that the trial ACM of a complex
arbitrary polynomial, as given by the main equations (14) and (18) of our
procedure, is never unitary by construction. In this regard, it is important
to note that the possibility of finding a non-unitary ACM of a given
polynomial is not incompatible with the existence of a unitary almost-
companion matrix for the given polynomial. In fact, different ACMs of a given
polynomial are generally not unitarily equivalent.

In the light of these considerations, we want first to identify possible
structural properties shared by the coefficients of all the characteristic
polynomials of a unitary matrix. Then, according to our general procedure, we
will introduce a class of trial unitary matrices sufficiently representative
to allow us to find a unique ACM for an assigned polynomial whose three roots
are unknown but certainly have modulus 1.

###  5.1 Properties of the Characteristic Polynomial of a Unitary Matrix

It is easy to prove the following necessary and sufficient condition
concerning the characteristic polynomial of a unitary ACM:

######  Theorem 5.1.

Let $D_{m}(z)$ be any complex polynomial of degree $m$, with $1\leq m\leq n$,
dividing an arbitrarily given complex polynomial $P_{n}(z)$. Then $P_{n}(z)$
admits a unitary ACM if and only if any $D_{m}(z)$ does.

###### Proof.

Necessity: if $P_{n}(z)$ admits a unitary ACM, then all its roots have modulus
one. This property is obviously transferred to each $D_{m}(z)$ dividing
$P_{n}(z)$ which, in turn, implies the existence of a diagonal unitary ACM of
$D_{m}(z)$.

Sufficiency: Since $P_{n}(z)$ can be represented as product of $n$ monic
binomials whose free terms are complex numbers of modulus one by hypothesis,
then a diagonal ACM of $P_{n}(z)$ with entries having modulus one exists. This
ACM is unitary [2]. ∎

When $n=2$, it is easy to convince oneself that

######  Theorem 5.2.

A monic complex, second-degree polynomial is the characteristic polynomial of
a unitary matrix of order 2, if and only if it has the structure

$\displaystyle\mathcal{P}_{2}(z)=z^{2}-r_{2}e^{i\vartheta}z+e^{2i\vartheta},$
(79)

with $r_{2}\in[0,2]$ and $\vartheta\in(-\pi,\pi]$.

###### Proof.

To demonstrate this double statement it is sufficient to explicitly find the
two roots of (79) for the necessity and to use simple geometric arguments (or
exploit Theorem 5.1) for the sufficiency. ∎

We additionally remark that, for $r_{2}>2$ , the principal arguments of the
two roots of (79) coincide with $\chi$, and the product of their modules, both
different from unity, is still one.

When the order of the unitary matrix is greater than $2$, it is still possible
to find peculiar properties possessed by the coefficients of the corresponding
characteristic polynomial. However, there are polynomials of degree higher
than 2 with a structure similar to (79) which also have roots with modulus
different from 1. We prove here the following useful necessary condition on
the structure of the characteristic polynomial of a $3\times 3$ unitary matrix

######  Theorem 5.3.

The complex third degree characteristic polynomial of any unitary matrix of
order 3 has necessarily the structure:

$\displaystyle\mathcal{P}_{3}(z)=z^{3}-re^{i\theta_{1}}z^{2}+re^{i(\theta-\theta_{1})}z-e^{i\theta},$
(80)

where $r\in[0,3]$, $\theta_{1}\in(-\pi,\pi]$ and $\theta\in(-\pi,\pi]$.

###### Proof.

Given any three real numbers $\alpha$, $\beta$, and $\gamma$, it is always
possible to find three real numbers $r$, $\theta_{1}$ and $\theta$ that
satisfy the following relations:

$\displaystyle e^{i\alpha}+e^{i\beta}+e^{i\gamma}=re^{i\theta_{1}},$ (81)
$\displaystyle e^{i\alpha}e^{i\beta}e^{i\gamma}=e^{i\theta}.$ (82)

The product of (82) and the complex conjugate of (81) gives

$\displaystyle
re^{i(\theta-\theta_{1})}=(e^{-i\alpha}+e^{-i\beta}+e^{-i\gamma})e^{i\alpha}e^{i\beta}e^{i\gamma}=e^{i(\alpha+\beta)}+e^{i(\beta+\gamma)}+e^{i(\alpha+\gamma)},$
(83)

where $r\in[0,3]$, $\theta_{1}\in(-\pi,\pi]$ and
$\theta=\operatorname{Arg}e^{i(\alpha+\beta+\gamma)}\in(-\pi,\pi]$. Equations
(81) to (83) represent the Vieta-Girard formulas for the three roots
$e^{i\alpha}$, $e^{i\beta}$, and $e^{i\gamma}$ of polynomial (80). Since these
roots have modulus $1$, as is required for $\mathcal{P}_{3}(z)$ to be the
characteristic polynomial of a unitary matrix, the Vieta-Girard formulas (81)
and (82) clearly show that the complex coefficients of the characteristic
polynomial of any $3\times 3$ unitary matrix are not independent. In fact, the
free term and the coefficient of $z^{2}$, which are involved in Equations (81)
and (82), respectively, univocally determine the coefficient of $z$ through
(83), in accordance with (80). ∎

Like Theorem 5.1, Theorem 5.3 can be extended to a generic degree $n$. We
emphasize that the polynomial form (80) and its roots have some remarkable
properties. For example, the passage from $z$ to the auxiliary variable
$u=ze^{i\psi}$ leads, up to a global phase factor, to a polynomial with the
same structure (80) after the angle shifts
$\theta_{1}^{\prime}=\theta_{1}+\psi$ and $\theta^{\prime}=\theta+3\psi$
(these shifts are unimportant for what concerns the polynomial structure,
since the angles $\theta_{1}^{\prime}$ and $\theta^{\prime}$ can take the same
range of values as $\theta_{1}^{\prime}$ and $\theta^{\prime}$). Therefore,
the three roots of the new polynomial have the same modules and relative
principal arguments as the roots of the original polynomial (80). Another
interesting property resulting from Equation (82) is that, if (80) admits one
root with modulus one, the other two roots must have reciprocal modules
(including the case in which they also have modulus one).

Note that Theorem 5.3 only expresses a necessary condition, and therefore
there exist polynomials with the structure (80) which do not admit a unitary
ACM. Algebraic relations among the three parameters in the expression of
$\mathcal{P}_{3}(z)$ not implied by the structure of the polynomial itself can
ensure that $\mathcal{P}_{3}(z)$ admits a unitary ACM (vide infra).

Consider, for example, the case $r=3$. The polynomial
$z^{3}-3z^{2}+3e^{i\pi}z-e^{i\pi}$, has the form (80), from which it is
obtained by (arbitrarily) choosing $\theta_{1}=0$ and $\theta=\pi$. This is
not the characteristic polynomial of a unitary $3\times 3$ matrix, since its
roots are $-1$ and $2\pm\sqrt{3}$; accordingly,
$\theta=\pi\neq\operatorname{Arg}e^{i(3\theta_{1})}=0$. The relation
$\theta=3\theta_{1}$ guaranties, instead, the existence of three roots of
modulus $1$ when $r=3$, as is easily seen geometrically or from the fact that
in this case $\mathcal{P}_{3}(z)=(z-e^{i\theta_{1}})^{3}$. As another example,
for $r=1$, (80) admits a unitary ACM for any $\theta_{1}\in(-\pi,\pi]$ and
$\theta\in(-\pi,\pi]$, as the roots of the polynomial are $e^{i\theta_{1}}$
and $e^{i\frac{\theta-\theta_{1}\pm\pi}{2}}$.

The analysis in the next section will provide expressions for the coefficients
of polynomial (80) that make it the characteristic polynomial of a unitary
ACM.

###  5.2 Construction of a Trial Unitary ACM

In Section 3, it was convenient to search for an ACM of a generic monic
complex polynomial (10) of third degree in the unknown $z$ by resorting to the
canonical form (9) of the polynomial through a translation of the complex
variable $z$. The advantages of using the polynomial (9) in the translated
variable $\eta$ are twofold: the number of parameters appearing in the
polynomial expression is reduced from $3$ to $2$ (namely, $p$ and $q$ instead
of $c_{1}$,$c_{2}$, and $c_{3}$), and the very simple recipe (14) allows to
obtain the ACM of the given polynomial from the ACM of its canonical form (9).

It is clearly possible to pass from $\mathcal{P}_{3}(z)$ to its canonical form
through the appropriate translation of $z$. Unfortunately such a strategy is
not convenient in this case, since the canonical polynomial generally does not
admit a unitary ACM, and thus the further mathematical step complicates the
achievement of our goal. We therefore propose here a different approach that
combines geometrical and analytical considerations.

Exploiting Theorems 5.1 and 5.2, we can represent each element
$\mathbb{P}_{3}(z)$ of the set $[\mathbb{P}_{3}(z)]$ of all and only the
third-degree polynomials that admit a unitary ACM and share the root $1$ as
follows:

$\displaystyle\mathbb{P}_{3}(z)=(z^{2}-r_{2}e^{i\vartheta}z+e^{2i\vartheta})(z-1)=z^{3}-(1+r_{2}e^{i\vartheta})z^{2}+(1+r_{2}e^{-i\vartheta})e^{2i\vartheta}z-e^{2i\vartheta},$
(84)

where $r_{2}\in[0,2]$ and $\vartheta\in(-\pi,\pi]$. Each polynomial (84)
possesses, by construction, a unitary ACM and, vice versa, the characteristic
polynomial of any $3\times 3$ unitary matrix with a unit eigenvalue is a
particular realization of (84).

$[\mathbb{P}_{3}(z)]$ is a subset of the set $[\mathcal{P}_{3}(z)]$ of the
polynomials of the form (80). This point is appreciated by noting that the
coefficient of $z^{2}$ in Equation (80) can always be represented as

$\displaystyle re^{i\theta_{1}}=(1+r_{2}e^{i\vartheta})$ (85)

with

$\displaystyle{r_{2}}^{2}=1+r^{2}-2r\cos{\theta_{1}}$ (86)

and

$\displaystyle\vartheta=\operatorname{Arg}{\left(-1+re^{i\theta_{1}}\right)}=2\operatorname{Arctan}{\left(\frac{r\sin\theta_{1}}{-1+r\cos\theta_{1}+\sqrt{1+r^{2}-2r\cos\theta_{1}}}\right)}.$
(87)

The last equality is based on the following identity [59], which gives the
principal argument of a generic complex number $(x+iy)\in\Omega$, where
$\Omega$ coincides with the complex plane cut along the negative $x$-axis:

$\displaystyle\operatorname{Arg}(x+iy)=2\operatorname{Arctan}\left(\frac{y}{x+\sqrt{x^{2}+y^{2}}}\right).$
(88)

As expected, this formula leaves the argument of a complex number of null
modulus undefined and, for any fixed negative $x$, implies

$\displaystyle\lim\limits_{y\longrightarrow
0^{\pm}}\operatorname{Arg}(x+iy)=\pm\pi.$ (89)

The above equations clearly show that $[\mathbb{P}_{3}(z)]$ is obtained as a
subset of $[\mathcal{P}_{3}(z)]$ by introducing the relations (85) to (87)
among the parameters $r$, $\theta_{1}$, and $\theta$, which are arbitrary in
their ranges of definition in the polynomial expression (80). In particular,
$\theta$ is compatible with (84) only if

$\displaystyle\theta=2\vartheta,$ (90)

thus leading to the following:

######  Theorem 5.4.

A monic third-degree polynomial (80) belongs to the set $[\mathbb{P}_{3}(z)]$
if and only if it can be written in the form

$\displaystyle\tilde{\mathbb{P}}_{3}(z)=z^{3}-(1+r_{2}e^{i{\frac{\theta}{2}}})z^{2}+(1+r_{2}e^{-i{\frac{\theta}{2}}})e^{i\theta}z-e^{i\theta},$
(91)

where $r_{2}\in[0,2]$ and $\theta\in(-\pi,\pi]$.

Note that the range of $r_{2}$ values is dictated by Theorem 5.2, and the
corresponding range of $r$ values resulting from Equation (86) for any given
$\theta_{1}$ is a subset of the interval $[0,3]$ in Equation (80), in
accordance with the fact that $[\mathbb{P}_{3}(z)]$ is a subset of
$[\mathcal{P}_{3}(z)]$. On the other hand, since $\vartheta\in(-\pi,\pi]$,
Equation (90) implies that $\theta\in(-2\pi,2\pi]$, which can be clearly
reduced to the principal interval $[-\pi,\pi]$. We emphasize that requiring
(80) to be the characteristic polynomial of a unitary matrix with a real
positive eigenvalue (that is, 1) entailed relations between the three
parameters in Equation (80), thus leading to the dependence of the polynomial
(91) on only two parameters, $r_{2}$ and $\theta$.

At this point, we can construct an ACM for a polynomial of the kind (91). The
polynomial factorization in Equation (84) enables a block diagonal form for
the ACM, with the one-dimensional block simply equal to 1. The diagonal
elements of the $2\times 2$ block can be set equal [2] and are immediately
obtained from Vieta’s formula for the sum of the roots of polynomial (79).
Then, simple algebraic considerations lead to the following ACM of polynomial
(91):

$\widetilde{W}_{3}=\left(\begin{array}[]{ccc}\frac{r_{2}}{2}e^{i\frac{\theta}{2}}&\sqrt{1-\left(\frac{r_{2}}{2}\right)^{2}}e^{i\frac{\theta}{2}}&0\\\
-\sqrt{1-\left(\frac{r_{2}}{2}\right)^{2}}e^{i\frac{\theta}{2}}&\frac{r_{2}}{2}e^{i\frac{\theta}{2}}&0\\\
0&0&1\\\ \end{array}\right).$ (92)

It is easy to verify that the characteristic polynomial of (92) coincides with
(91) for all the allowed values of the parameters $r_{2}$ and $\theta$. The
three columns of $\widetilde{W}_{3}$ are normalized and mutually orthogonal,
and these properties imply the unitarity of matrix $\widetilde{W}_{3}$. If
$r_{2}>2$, and thus it is out of the range given in Theorem 5.4, the first two
columns of the matrix are not orthogonal for any $\theta$, and then
$\widetilde{W}_{3}$ is no longer unitary.

It is worth noting that (92) can be seen as the result of a partial
diagonalization of another unitary matrix with the same eigenvalues and that
all the other ACMs of a polynomial (91) can be obtained by unitary
transformation of (92).

Once an ACM is constructed for any polynomial (91), the subset of
$[\mathcal{P}_{3}(z)]$ that contains all and only the polynomials (80)
admitting a unitary ACM can be generated by rotating the roots of each
polynomial (91) by an angle $\epsilon\in(-\pi,\pi]$. This amounts to changing
the complex variable $z$ to $u=ze^{i\epsilon}$ in $\tilde{\mathbb{P}}_{3}(z)$.
Then, up to a global phase factor $e^{3i\epsilon}$, the polynomial
$\tilde{\mathbb{P}}_{3}(u)=\tilde{\mathbb{P}}_{3}(ze^{i\epsilon})$ is equal to

$\displaystyle\mathbb{P}_{3\epsilon}(z)=z^{3}-(1+r_{2}e^{i{\frac{\theta}{2}}})e^{-i\epsilon}z^{2}+(1+r_{2}e^{-i{\frac{\theta}{2}}})e^{i\theta}e^{-2i\epsilon}z-e^{i(\theta-3\epsilon)}.$
(93)

The root 1 of $\tilde{\mathbb{P}}_{3}(z)$ corresponds to a general complex
root of modulus one, $e^{i\epsilon}$, of $\mathbb{P}_{3\epsilon}(z)$.
$[\mathbb{P}_{3\epsilon}(z)]$ includes all and only the polynomials
$\mathbb{P}_{3\epsilon}(z)$ which, by construction, admit a unitary ACM and
therefore also satisfy the necessary condition expressed by Theorem 5.4. We
have thus proved that

######  Theorem 5.5.

A complex monic polynomial of third degree is the characteristic polynomial of
a unitary matrix of order 3 if and only if it has the structure (93), with
$r_{2}\in[0,2]$, $\theta\in(-\pi,\pi]$, and $\epsilon\in(-\pi,\pi]$.

Next, we accomplish the main objective of this section by constructing an ACM
$W_{3}$ of $\mathbb{P}_{3\epsilon}(z)$. To this end, in analogy with the
recipe (14), we use the transformation $z=ue^{-i\epsilon}$ to generate $W_{3}$
from the matrix $\widetilde{W}_{3}$ in Equation (14) by proceeding as follows:

$\displaystyle\tilde{\mathbb{P}}_{3}(u)$ $\displaystyle\equiv$ $\displaystyle
det(uI_{3}-\widetilde{W}_{3})=det(e^{i\epsilon}(zI_{3}-e^{-i\epsilon}\widetilde{W}_{3}))$
(94) $\displaystyle=$ $\displaystyle e^{3i\epsilon}det(zI_{3}-{W}_{3})\equiv
e^{3i\epsilon}\mathbb{P}_{3\epsilon}(z),$

where $W_{3}\equiv e^{-i\epsilon}\widetilde{W}_{3}$. In light of our previous
arguments, the characteristic polynomial of the matrix

$W_{3}=e^{-i\epsilon}\widetilde{W}_{3}=\left(\begin{array}[]{ccc}\frac{r_{2}}{2}e^{i(\frac{\theta}{2}-\epsilon})&\sqrt{1-\left(\frac{r_{2}}{2}\right)^{2}}e^{i(\frac{\theta}{2}-\epsilon})&0\\\
-\sqrt{1-\left(\frac{r_{2}}{2}\right)^{2}}e^{i(\frac{\theta}{2}-\epsilon})&\frac{r_{2}}{2}e^{i(\frac{\theta}{2}-\epsilon})&0\\\
0&0&e^{-i\epsilon}\\\ \end{array}\right),$ (95)

is the polynomial (93). The unitary matrix (95) fully meets our goal. To reach
this objective, we first characterized the class $[\mathbb{P}_{3\epsilon}(z)]$
of all and only the polynomials that admit a unitary ACM, thus removing the
difficulties related to the lack of sufficiency of polynomial (80). Then,
exploiting the recipe (94), we established the form $W_{3}$ of a unitary ACM
for any polynomial belonging to $[\mathbb{P}_{3\epsilon}(z)]$.

In the following, we illustrate our approach through some applications.

###  5.3 Examples

  * •

Given the parameter $\sigma=\pm 1$, consider the subclass of polynomials (93)
with $\epsilon=\frac{(1-\sigma)\pi}{2}$:

$\displaystyle\mathbb{P}_{3\sigma^{\prime}}(z)$ $\displaystyle=$
$\displaystyle
z^{3}-(1+r_{2}e^{i{\frac{\theta}{2}}})e^{-i\frac{(1-\sigma)\pi}{2}}z^{2}+(1+r_{2}e^{-i{\frac{\theta}{2}}})e^{i\theta}z-e^{i(\theta-\frac{(1-\sigma)\pi}{2})}$
(96) $\displaystyle=$ $\displaystyle
z^{3}-(1+r_{2}e^{i{\frac{\theta}{2}}})\sigma
z^{2}+(1+r_{2}e^{-i{\frac{\theta}{2}}})e^{i\theta}z-\sigma e^{i\theta},$

In Equation (96) we exploited the identity
$e^{-i\frac{(1-\sigma)\pi}{2}}=\sigma$. It is easy to verify that
$\mathbb{P}_{3\sigma}(\sigma)=0$, which means that (96) is the most general
polynomial with the real root $\sigma$ and an ACM which, in view of (95), can
be written on demand as

$\displaystyle
W_{3\sigma}=\left(\begin{array}[]{ccc}\sigma\frac{r_{2}}{2}e^{i\frac{\theta}{2}}&\sigma\sqrt{1-\left(\frac{r_{2}}{2}\right)^{2}}e^{i\frac{\theta}{2}}&0\\\
-\sigma\sqrt{1-\left(\frac{r_{2}}{2}\right)^{2}}e^{i\frac{\theta}{2}}&\sigma\frac{r_{2}}{2}e^{i\frac{\theta}{2}}&0\\\
0&0&\sigma\\\ \end{array}\right).$ (100)

  * •

Consider the polynomial

$\displaystyle\mathbb{P}_{3,r_{2}=0}(z)$ $\displaystyle=$ $\displaystyle
z^{3}-e^{i\theta_{1}}z^{2}+e^{i\theta^{\prime}}e^{-i\theta_{1}}z-e^{i\theta^{\prime}},$
(101)

obtained by setting $r_{2}=0$, $\epsilon=-\theta_{1}$, and
$\theta=\theta^{\prime}-3\theta_{1}$ in Equation (93). With these choices,
using (95) we immediately find that the polynomial (101) admits the ACM

$\displaystyle
W_{r_{2}=0}=\left(\begin{array}[]{ccc}0&e^{i\frac{\theta^{\prime}-\theta_{1}}{2}}&0\\\
-e^{i\frac{\theta^{\prime}-\theta_{1}}{2}}&0&0\\\ 0&0&e^{i\theta_{1}}\\\
\end{array}\right).$ (105)

When $r=1$, the polynomial (101) coincides with the polynomial (80) up to a
trivial change of notation ($\theta$ is substituted with $\theta^{\prime}$).
This polynomial is then the characteristic polynomial of a unitary matrix for
any $\theta^{\prime}$ and $\theta_{1}$, as we observed in Subsection 5.1, with
eigenvalues that are now immediately derived from the matrix (105) as
$e^{i\theta_{1}}$ and $e^{i\frac{\theta^{\prime}-\theta_{1}\pm\pi}{2}}$.

  * •

For $r=0$, (80) yields the polynomial $z^{3}-e^{i\theta}=0$ and, whatever the
$\epsilon$ value, Equations (85) and (90) imply that $r_{2}=1$, and
$\theta=2\pi$ in Equation (93). The corresponding ACM, with structure (95),
takes the form

$\displaystyle
W_{r=0}=\left(\begin{array}[]{ccc}\frac{1}{2}e^{i(\pi-\epsilon)}&\sqrt{\frac{3}{4}}e^{i(\pi-\epsilon)}&0\\\
-\sqrt{\frac{3}{4}}e^{i(\pi-\epsilon)}&\frac{1}{2}e^{i(\pi-\epsilon)}&0\\\
0&0&e^{-i\epsilon}\\\ \end{array}\right),$ (109)

Apart from the cases $r\neq 1$ or $r\neq 0$ examined above, for a generic $r$
Equation (80) admits a unitary ACM only under $r$-dependent algebraic
constraints on $\theta$ and $\theta_{1}$. These constraints are realized in
the polynomial form (93) through Equations (85) to (87) and (90), for the
ranges of parameter values defined in Theorem 5.5.

  * •

These conditions are not all satisfied by the polynomial

$\displaystyle\mathbb{P}_{3,r=2}(z)$ $\displaystyle=$ $\displaystyle
z^{3}-2e^{i\pi}e^{-i\epsilon}z^{2}+2e^{i\pi}e^{-2i\epsilon}z-e^{-3i\epsilon},$
(110)

which is of the form (80) with $r=2$, $\theta_{1}=-\epsilon+\pi$ and
$\theta=2\pi-3\epsilon$. It is easy to see that this polynomial coincides with

$\displaystyle\mathbb{P}_{3,r=2}(z)$ $\displaystyle=$ $\displaystyle
z^{3}-(1+3e^{i\pi})e^{-i\epsilon}z^{2}+(1+3e^{-i\pi})e^{-2i\epsilon}z-e^{-3i\epsilon},$
(111)

which has the form (93) with $\theta=2\pi$, except for the fact that
$r_{2}\notin[0,2]$, as is instead required in Theorem 5.5 because of Theorem
5.2. As a consequence, the polynomial (111) or, equivalently, (110) cannot be
the characteristic polynomial of a unitary $3\times 3$ matrix.

  * •

Polynomial (110) obviously admits an ACM of the form (36), which is obtained
using the general protocol in Section 3. Moreover, the insertion of $r_{2}=3$
and $\theta=2\pi$ in matrix (95) leads to another ACM of polynomial (110) of
the form

$W_{3nu}=\left(\begin{array}[]{ccc}-\frac{3}{2}e^{-i\epsilon}&-\frac{i}{2}\sqrt{5}e^{-i\epsilon}&0\\\
\frac{i}{2}\sqrt{5}e^{-i\epsilon}&-\frac{3}{2}e^{-i\epsilon}&0\\\
0&0&e^{-i\epsilon}\\\ \end{array}\right),$ (112)

which is manifestly non unitary. In general, $W_{3nu}$ and the ACM of form
(36) are not similar. A sufficient condition for their similarity is that
their three common complex eigenvalues are distinct. In this case, in fact,
both matrices are surely diagonalizable [2] and therefore traceable (in
general, not unitarily) to the same diagonal matrix.

##  6 Discussion and Conclusions

Finding a matrix with an assigned characteristic polynomial is a classic
inverse problem solved by Frobenius a long time ago. In Section 2 we observed
that there are infinitely many other solutions, generally not equivalent to
the one found by Frobenius. The exhaustive description of the set
$S(P_{n}(z))$ of all complex matrices sharing the same characteristic
polynomial is still an open problem. Among the reasons for the missing
solution of this problem it is useful to consider that, even if $S(P_{n}(z))$
is invariant under similarity transformations, it includes non-similar (and in
general not even equivalent) matrices. Another problem is, for example, that
the structure of the non-empty subset of non-sparse CMs belonging to
$S(P_{n}(z))$, unlike the set of sparse CMs [35], has not yet been fully
characterized.

A related inverse problem, stimulated by applications of current interest to
both physicists and mathematicians, is the search for ACMs constrained to
possess prescribed structural properties, such as, for example, unitarity,
positive semidefiniteness, or Hermiticity.

The first focus of this study is the construction of a new ACM of a generic
monic and complex third degree polynomial $P_{3}(z)$, characterized by
versatility for applications. This objective is pursued by parameterizing the
elements of the ACM in such a way that they lend themselves to additional
constraints dictated by specific problems (of which only the structural
properties are exploited). To the best of our knowledge, our investigation of
inverse problems of this kind opens a new fruitful chapter in this research
area whose central goal is the proposal of new ACMs which, in particular, can
be CMs. We address the three above-mentioned constrained inverse problems,
providing methodology and results that aim for broad applicability and are
potentially transferable to solving analogous problems involving higher degree
polynomials.

The adopted step-by-step approach builds new specific classes of unconstrained
or constrained matrices as ACMs of suitably given polynomials, relaxing from
the outset any condition on the degree of the minimal polynomial. In
particular, the strategy implemented, as well as the mathematical tools used,
is not influenced by any FCM-based or FCM-inspired technique.

The elements of the ACM that we construct as a solution of the general inverse
problem are single-valued complex functions of the coefficients of the given
generic polynomial. Exploiting the structural properties of this ACM, we find
the algebraic expressions for the three, generally complex, roots of its
complex characteristic polynomial.

It is remarkable that, when the polynomial becomes real, the associated
general ACM smoothly becomes Hermitian under easy to find necessary and
sufficient conditions on the coefficients of the polynomial described by (70).
Using simply the fact that the ACM becomes Hermitian if and only if
$\Delta\leq 0$, we are able to extend the trigonometric representation of the
three roots of the real polynomial to all possible cases, that is even when
(51) does not hold. This representation is obtained without resorting to the
well-known Cardano-Del Ferro formulas.

We emphasize that the FCM of a characteristic polynomial does not undergo any
structural change when the coefficients of the complex polynomial become real,
thus providing no additional information on the polynomial roots. For this
reason, we claim that the FCM has a lower flexibility than our ACM. We show
how to use this flexibility to obtain an ACM of a prescribed characteristic
polynomial on demand, applying our procedure to the important problem of
finding a density matrix and, in particular, that of a qutrit.

A second, novel constrained inverse problem addressed here consists in finding
a unitary ACM of a generic polynomial with three roots of modulus one.
Excluding the trivial case in which the unitary ACM can be directly given in
diagonal form, we first reach the intermediate goal (interesting in itself) of
parameterizing $c_{1}$, $c_{2}$, and $c_{3}$ in the polynomial (10) so as to
set the necessary conditions on the structure of a polynomial to admit an ACM.
By setting appropriate relations between the parameters through coupled
geometric and analytical considerations, we further constrain the polynomial
structure in such a way as to identify the set $[\mathbb{P}_{3\epsilon}(z)]$
of all and only the third-degree polynomials that admit a unitary ACM. Then,
we conclude our analysis by constructing the associated ACM.

The results of this study can be further explored and usefully applied to
physical and mathematical contexts, including, at their intersection, the
research area of quantum computing. For example, for time-dependent
parameters, the prescription of a time-dependent characteristic polynomial of
$[\mathbb{P}_{3}(z)]$ or $[\mathbb{P}_{3\epsilon}(z)]$ leads to a unitary
time-dependent matrix, hence to the pertinent time-dependent Hamiltonian that
generates the time evolution of a qutrit, whose properties can thus be traced
back to the prescription of $\mathbb{P}{{}_{3}}[z]$. In mathematical contexts,
the analysis developed in this study can be extended to polynomials of higher
degree. For example, in the case of a fifth-degree polynomial, our protocol
may provide conditions on the coefficients of the polynomial such that its
roots are real. The rich analysis enabled by the use of third-degree
polynomials in this study sets a clearer basis to conceive the extension of
the analysis to higher degree polynomials.

## Funding

L.M. acknowledge funding from the NWO Gravitation Program Quantum Software
Consortium. A.M. (Agostino Migliore) acknowledges funding from the European
Union - NextGenerationEU, within the National Center for HPC, Big Data and
Quantum Computing (Project no. CN00000013, CN1 Spoke 10: ”Quantum Computing”).

## Acknowledgement

L.M. thanks Prof. Maria Carmela Lombardo for her invitation at the University
of Palermo for scientific collaboration.

##  Appendix A Derivation of Equations (59) to (68)

In this appendix, we find the roots of the polynomial (10) in the case in
which

$\displaystyle\Delta(p,q)\equiv\frac{p^{3}}{27}+\frac{q^{2}}{4}\geq 0,$ (A1)

From Equation (50) it is immediately seen that the inequality (A1) implies
$\chi^{2}<1$ or $\chi^{2}>1$ depending on whether $p>0$ or $p<0$,
respectively. As a consequence, Equations (27), (46), and (49) lead to
different polynomial roots depending on the sign of $p$, in agreement with
previous analyses [51].

We begin with considering the case $p>0$, which means $\Theta_{p}=0$, whence
$\varphi_{p}=\pi$ according to Equation (32) and $\chi$ is given by Equation
(64), that is,

$\chi=-iu,\quad u=\frac{3q}{2p}\sqrt{\frac{3}{p}}.$ (A2)

In this case, $\operatorname{Arg}(1-\chi^{2})=0$ and Equation (27) gives

$\displaystyle\Phi_{13}$ $\displaystyle=$
$\displaystyle\operatorname{Arg}\left(\chi+i\sqrt{1-\chi^{2}}\right)-i\operatorname{Ln}\left(\chi+i\sqrt{1-\chi^{2}}\right)$
(A3) $\displaystyle=$
$\displaystyle\frac{\pi}{2}-i\operatorname{ln}\left(\sqrt{1+u^{2}}-u\right)=\frac{\pi}{2}+i\operatorname{ln}\left(\sqrt{1+u^{2}}+u\right).$

Then, using Euler’s formula and rationalization, Equation (46) easily yields

$\tilde{\eta}_{1}=\frac{\sqrt{3}}{2}(A+B)+\frac{i}{2}(A-B)$ (A4)

with

$\displaystyle A=\sqrt[3]{\sqrt{1+u^{2}}-u},\quad
B=\sqrt[3]{\sqrt{1+u^{2}}+u},$ (A5)

whence

$\displaystyle
z_{1}=i\sqrt{\frac{p}{3}}\tilde{\eta}_{1}-\frac{c_{1}}{3}=\frac{\sqrt{p}}{2}\left[\frac{1}{\sqrt{3}}(B-A)+i(A+B)\right]-\frac{c_{1}}{3},$
(A6)

namely Equation (59), being $u=i\chi$ and

$\displaystyle X=A+B,\quad Y=\frac{B-A}{\sqrt{3}},$ (A7)

Considering that $AB=1$ and using Equation (49), after some lengthy algebra
one obtains

$\displaystyle\tilde{\eta}_{k}$ $\displaystyle=$
$\displaystyle\frac{\sqrt{3}}{2}\left[-\frac{A+B}{2}+i\frac{B-A}{2\sqrt{3}}+(-1)^{k+1}\sqrt{1-\frac{(B-A)^{2}}{2}+i\frac{\sqrt{3}(B^{2}-A^{2})}{2}}\right]$
(A8) $\displaystyle=$
$\displaystyle\frac{\sqrt{3}}{2}\left[-\frac{X}{2}+i\frac{Y}{2}+\frac{(-1)^{k+1}}{2}\sqrt{(X+3iY)^{2}}\right],\quad
k=2,3.$

Choosing the root in the last expression in accordance with Equation (49), we
thus have

$\tilde{\eta}_{2}=-\frac{\sqrt{3}}{2}(X+iY)$ (A9)

and

$\tilde{\eta}_{3}=i\sqrt{3}Y,$ (A10)

from which the root expressions (60) and (61) immediately result.

Consider, for example, the polynomial $z^{3}+4z-7\sqrt{3}=0$, which is
directly given in canonical form, so that $c_{1}=0$, $c_{2}=p$, and $c_{3}=q$.
In this case, $u=-7\frac{9}{16}$, whence $A=2$, $B=\frac{1}{2}$ and therefore
$X=\frac{5}{2}$, $Y=-\frac{\sqrt{3}}{2}$. Equations (59) to (61) thus give
$z_{1}=\frac{1}{2}(-\sqrt{3}+5i)$,$z_{2}=-\frac{1}{2}(\sqrt{3}+5i)$, and
$z_{3}=\sqrt{3}$, which are readily verified to be the roots of the above
polynomial.

For $p<0$, we have $\Theta_{p}=0$, from which $\varphi_{p}=2\pi$, and

$\chi=-\frac{3q}{2p}\sqrt{-\frac{3}{p}}.$ (A11)

Therefore, $\operatorname{Arg}(1-\chi^{2})=\pi$ and Equation (27) gives

$\displaystyle\Phi_{13}$ $\displaystyle=$
$\displaystyle\operatorname{Arg}\left(\chi-\sqrt{\chi^{2}-1}\right)-i\operatorname{ln}\left(\chi-\sqrt{\chi^{2}-1}\right)$
(A12) $\displaystyle=$ $\displaystyle
i\operatorname{ln}\left(\chi+\sqrt{\chi^{2}-1}\right)\equiv i\nu.$

Using Euler’s formula again, we obtain

$\displaystyle\tilde{\eta}_{1}=2\cos\left(i\frac{\nu}{3}\right)=2\cosh\left(\frac{\nu}{3}\right)=C$
(A13)

with $C$ given by Equation (67), from which Equation (65) immediately follows.

Since

$\displaystyle\sin^{2}(i\frac{\nu}{3})=-\sin^{2}(\frac{\nu}{3})=1-\cosh^{2}(\frac{\nu}{3})=1-\frac{C^{2}}{4}<0\quad\forall\nu,$
(A14)

Equation (49) gives

$\displaystyle\tilde{\eta}_{k}$ $\displaystyle=$
$\displaystyle-\left[\frac{C}{2}+i(-1)^{k}\sqrt{3\left(\frac{C^{2}}{4}-1\right)}\right],\quad
k=2,3,$ (A15)

whence Equation (66).

## References

  * [1] G. Frobenius.  Theorie der linearen formen mit ganzen coefficienten.  J. Reine Angew. Math., 86:146–208, 1879.
  * [2] R. A. Horn and C. R. Johnson.  Matrix Analysis.  Cambridge University Press, 2013.
  * [3] T. Hawkins.  The mathematics of Frobenius in context: A journey through 18th to 20th century mathematics, Sources and Studies in the History of Mathematics and Physical Sciences.  Springer, New-York, 2013.
  * [4] A. Loewy.  Die begleitmatrix eines linearen homogenen differentialstatusdruckes.  Nachr. Ges. Wiss. Gottingen, Math.-Phys. Kl, 1:255–263, 1917.
  * [5] S. Barnett.  Congenial matrices.  Linear Algebra Appl., 41:277–298, 1981.
  * [6] J. L. Aurentz, R. Vandebril, and D. S. Watkins.  Fast computation of the zeros of a polynomial via factorization of the companion matrix.  SIAM J. Scien. Comp., 35(1):A255–A269, 2013.
  * [7] F. De Teran, F. M. Dopico, and J. Perez.  New bounds for roots of polynomials based on fiedler companion matrices.  Linear Algebra Appl., 451:197–230, 2014.
  * [8] Dario Andrea Bini.  Numerical computation of polynomial zeros by means of aberth’s method.  Num. alg., 13(2):179–200, 1996.
  * [9] Nicholas J. Higham and Francoise Tisseur.  Bounds for eigenvalues of matrix polynomials.  Linear Algebra Appl., 358(1):5–22, 2003.
  * [10] M. I. Bueno, F. De Terán, and F. M. Dopico.  Recovery of eigenvectors and minimal bases of matrix polynomials from generalized fiedler linearizations.  SIAM J. Matrix Anal. Appl., 32(2):463–483, 2011.
  * [11] E. Antoniou and S. Vologiannidis.  A new family of companion forms of polynomial matrices.  Electron. J. Linear Algebra, 11:78–87, 2004.
  * [12] L. Brand.  Applications of the companion matrix.  Amer. Math. Monthly, 75(2):146–152, 1968.
  * [13] William P Wardlaw.  Matrix representation of finite fields.  Math. Mag., 67(4):289–293, 1994.
  * [14] Gábor Szederkényi, Rozália Lakner, and Miklós Gerzson.  Intelligent control systems: an introduction with examples, volume 60.  Springer Science & Business Media, 2006.
  * [15] A. Lim and J. Dai.  On product of companion matrices.  Linear Algebra Appl., 435(11):2921–2935, 2011.
  * [16] W. Specht.  Die lage der nullstellen eines polynoms iii.  Math. Nachr., 16:257–263, 1957.
  * [17] W. Specht.  Die lage der nullstellen eines polynoms iv.  Math. Nachr., 21:201–222, 1960.
  * [18] I.J. Good.  The colleague matrix, a Chebyshev analogue of the companion matrix.  Quart. J. Math. Oxford Ser., 12 (2):61–68, 1961.
  * [19] J. Maroulas and S. Barnett.  Polynomials with respect to a general basis.  J. Math. Anal. Appl, 72(1):177–194, 1979.
  * [20] P. Brändén.  On linear transformations preserving the Polya frequency property.  Rans. Amer. Math. Soc., 358:3697–3716, 2006.
  * [21] J. Haglund.  Further investigations involving Rook polynomials with only real zeros.  Eur. J. Comb., 21(8):1017 – 1037, 2000.
  * [22] J. Pitman.  Probabilistic bounds on the coefficients of polynomials with only real zeros.  J. Comb. Theory Ser. A., 77(2):279 – 303, 1997.
  * [23] D. G. Wagner.  The partition polynomial of a finite set system.  J. Comb. Theory Ser. A., 56(1):138 – 159, 1991.
  * [24] D. G. Wagner.  Total positivity of Hadamard products.  J. Math. Anal. Appl., 163(2):459 – 483, 1992.
  * [25] Y. Wang and Y.-N. Yeh.  Polynomials with real zeros and Polya frequency sequences.  J. Comb. Theory Ser. A., 109(1):63 – 74, 2005.
  * [26] G. Sun, S. Su, and M. Xu.  Quantum algorithm for polynomial root finding problem.  In 2014 Tenth International Conference on Computational Intelligence and Security, pages 469–473, 2014.
  * [27] K. Nagata, T. Nakamura, H. Geurdes, J. Batle, A. Farouk, D.N. Diep, and S. K. Patro.  Efficient quantum algorithms of finding the roots of a polynomial function.  Int. J. Theor. Phys., 57(8):2546–2555, Aug 2018.
  * [28] K. Nagata and T. Nakamura.  Quantum algorithm for the root-finding problem.  Quant. Stud.: Math. and Found., 1(6):2196–5617, 2019.
  * [29] T. Tansuwannont, S. Limkumnerd, S. Suwanna, and P. Kalasuwan.  Quantum phase estimation algorithm for finding polynomial roots.  Open Phys. J., 17(1):839–849, 2019.
  * [30] L. Tan and A.C. Pugh.  Spectral structures of the generalized companion form and applications.  Syst. Control. Lett., 46(2):75–84, 2002.
  * [31] S. Weigert.  A quantum search for zeros of polynomials.  J. opt., B Quantum semiclass. opt., 5(6):S586–S588, oct 2003.
  * [32] G. Schmeisser.  A real symmetric tridiagonal matrix with a given characteristic polynomial.  Linear Algebra Appl., 193:11–18, 1993.
  * [33] M. Fiedler.  Expressing a polynomial as the characteristic polynomial of a symmetric matrix.  Linear Algebra Appl., 141:265–270, 1990.
  * [34] B. Eastman, I.-J. Kim, B.L. Shader, and K.N. Vander Meulen.  Companion matrix patterns.  Linear Algebra Appl., 463:255–272, 2014.
  * [35] Louis Deaett, Jonathan Fischer, Colin Garnett, and Kevin Vander Meulen.  Non-sparse companion matrices.  Electron. J. Linear Algebra, 35:223–247, 2019.
  * [36] A.I. Borisenko and I. E. Tarapov.  Vector and tensor analysis with applications.  Courier Corporation, 1968.
  * [37] D. Kalman.  A matrix proof of newton’s identities.  Math. Mag., 73(4):313–315, 2000.
  * [38] V. V. Prasolov.  Problems and theorems in linear algebra, volume 134.  American Math. Soc., 1994.
  * [39] Mary L Boas.  Mathematical methods in the physical sciences.  John Wiley & Sons, 2006.
  * [40] J. Hadamard.  Sur les problèmes aux dérivées partielles et leur signification physique.  Princeton university bulletin, pages 49–52, 1902.
  * [41] S.I. Kabanikhin.  Definitions and examples of inverse and ill-posed problems.  J. Inv. Ill-Posed Problems, 16:317–357, 2008.
  * [42] I. von Würtemberg.  Ill-posed problems and their applications to climate research, u.u.d.m. project report.  Technical report, Uppsala university, Department of Mathematics, June 2011\.
  * [43] S. Barnett.  Matrices: Methods and Applications.  Oxford University Press, 1990.
  * [44] H. G. Funkhouser.  A short account of the history of symmetric functions of roots of equations.  Am. Math. Mon., 37(7):357–365, 1930.
  * [45] M. Abramowitz and I.A. Stegun.  Handbook of mathematical functions with formulas, graphs, and mathematical tables, volume 55.  US Government printing office, 1964.
  * [46] Haber, H.E.  The complex inverse trigonometric and hyperbolic functions.  scipp.ucsc.edu/ haber/webpage/arc3.pdf, 2022.  University of California.
  * [47] W. Kahan.  Branch cuts for complex elementary functions.  The State of the Art m Numerical Analyszs, MJD Powell and A Iserles, Eds., oxford University Press, NY, 1987.
  * [48] G. V. Milovanovic, D. S. Mitrinovic, and Th. M. Rassias.  Topics in Polynomials.  World Scientific, 1994.
  * [49] W. D. Lambert.  A generalized trigonometric solution of the cubic equation.  Amer. Math. Monthly, 13:73–76, 1906.
  * [50] L. E. Dickson.  First course in the theory of equations.  John Wiley & Sons, Inc., 1922.
  * [51] F. Tricomi.  Lezioni di analisi matematica, Vol.1.  CEDAM, 1965.
  * [52] D. C. Kurtz.  A sufficient condition for all the roots of a polynomial to be real.  Am. Math. Mon., 99(3):259–263, 1992.
  * [53] H. J. Carmichael, R. J. Glauber, and M. O. Scully.  Directions in Quantum Optics: A Collection of Papers Dedicated to the Memory of Dan Walls Including Papers Presented at the TAMU-ONR Workshop Held at Jackson, Wyoming, USA, 26–30 July 1999, volume 561.  Springer Science & Business Media, 2001.
  * [54] U. Fano.  Description of states in quantum mechanics by density matrix and operator techniques.  Rev. Mod. P., 29(1):74, 1957.
  * [55] P. Blanchard and E. Brüning.  Mathematical methods in Physics: Distributions, Hilbert space operators, variational methods, and applications in quantum physics, volume 69.  Birkhäuser, 2015.
  * [56] M.B. Connor.  A historical survey of methods of solving cubic equations.  Master’s thesis, University of Richmond, 1956.
  * [57] R. Descartes.  The Geometry of Rene Descartes: With a facsimile of the first edition.  Courier Corporation, 2012.
  * [58] E. Brüning, H. Mäkelä, A. Messina, and F. Petruccione.  Parametrizations of density matrices.  J. Mod. Opt., 59(1):1–20, 2012.
  * [59] J.V. Armitage and W. F. Eberlein.  Elliptic functions, volume 67.  Cambridge University Press, 2006.