The hyperbolic rotation group of neutral meson mixing and $C\\!P$ violation

Jordi Garra Tico1

1Cavendish Laboratory, University of Cambridge, Cambridge, United Kingdom

Neutral meson mixing and $C\\!P$ violation are very well known weak processes
that involve decays to meson states that are, in general, a superposition of
flavor eigenstates. This paper describes a mathematical interpretation of the
time-dependent mixing amplitudes as a complex hyperbolic rotation of the time
evolution of those amplitudes without mixing, which involves a Lie group
$SO(1,1,\mathbb{C})$.

This allows a geometric interpretation of mixing as a curve into the
$SO(1,1,\mathbb{C})$ manifold, parameterized with the proper decay time, where
$C\\!P$ violation is the image of this curve at $t=0$.

To show the power of this new interpretation, it is applied to several aspects
of the measurement of the CKM angle $\gamma$ in $B$ decays to neutral $D$
mesons. On one hand, the charm mixing correction on the $CPV$ parameters is
derived. On the other hand, it is shown how the expressions used in GLW, ADS
and GGSZ methods are affected by charm mixing. Finally, the complete example
with both charm and strange mixing and $CPV$ is described.

##  1 Introduction

Mixing occurs in weak decays of neutral mesons with flavor eigenstates that
are not self-conjugate. All the information about mixing is encoded in a
complex mixing coefficient $z$, that is defined in terms of the Hamiltonian
eigenvalues, and characterizes the time evolution of any neutral meson
eigenstates.

$C\\!P$ violation may also have an effect on the time evolution of any neutral
meson eigenstates, either through different amplitudes to the same final
$C\\!P$ eigenstate (direct) or through a difference between the Hamiltonian
and $C\\!P$ eigenstates (indirect).

This paper describes a parameterization that can be used to describe mixing
and $C\\!P$ violation in a consistent and simplified way. In particular, it
describes an interpretation that exploits the fact that the neutral $D$ mesons
produced in $B$ meson decays are a superposition of flavor eigenstates that
can be used to extract the CKM matrix phase $\gamma$, and these states undergo
mixing as they evolve in time.

##  2 The mixing formalism

###  2.1 States and conventions

There are three bases of states that are relevant to the discussion on mixing
and $C\\!P$ violation of neutral mesons $M$.

  * •

The flavor eigenstates $\left|\vphantom{\bar{M}^{0}}{M}^{0}\right\rangle$ and
$\left|\bar{M}^{0}\right\rangle$ have a definite flavor content. The $C\\!P$
operator acts on these states with an arbitrary phase,

$\displaystyle CP\left|\vphantom{\bar{M}^{0}}{M}^{0}\right\rangle$
$\displaystyle=e^{+i\xi_{\mathrm{CP}}}\left|\bar{M}^{0}\right\rangle,$ (1)
$\displaystyle CP\left|\bar{M}^{0}\right\rangle$
$\displaystyle=e^{-i\xi_{\mathrm{CP}}}\left|\vphantom{\bar{M}^{0}}{M}^{0}\right\rangle.$
(2)

The most common conventions are $e^{i\xi_{\mathrm{CP}}}=\pm 1$.

  * •

The $C\\!P$ eigenstates $\left|{M}_{\pm}^{\mathrm{CP}}\right\rangle$, such
that
$CP\left|{M}_{\pm}^{\mathrm{CP}}\right\rangle=\pm\left|{M}_{\pm}^{\mathrm{CP}}\right\rangle$.
They can be expressed in terms of the flavor eigenstates as

$\left|{M}_{\pm}^{\mathrm{CP}}\right\rangle=\frac{\left|\vphantom{\bar{M}^{0}}{M}^{0}\right\rangle\pm
e^{i\xi_{\mathrm{CP}}}\left|\bar{M}^{0}\right\rangle}{\sqrt{2}}.$ (3)

  * •

The Hamiltonian eigenstates $\left|{M}_{\pm}\right\rangle$. They can be
expressed in terms of the flavor eigenstates as

$\left|{M}_{\pm}\right\rangle=p\left|\vphantom{\bar{M}^{0}}{M}^{0}\right\rangle\pm
s\,q\left|\bar{M}^{0}\right\rangle,$ (4)

which defines the change of base parameters $p$ and $q$, where $s$ is an
arbitrary sign. These states are properly normalized if
$\left|p\right|^{2}+\left|q\right|^{2}=1$. If $C\\!P$ is preserved, then
$\left|{M}_{\pm}\right\rangle=\left|{M}_{\pm}^{\mathrm{CP}}\right\rangle$, and

$\frac{q}{p}=s\,e^{i\xi_{\mathrm{CP}}}.$ (5)

In this paper, the $\left|{M}_{\pm}\right\rangle$ states are intentionally
noted to represent the Hamiltonian eigenstates that are closest to the
$\left|{M}_{\pm}^{\mathrm{CP}}\right\rangle$ $C\\!P$ eigenstates,
respectively.

For the rest of this paper, the convention chosen is
$e^{i\xi_{\mathrm{CP}}}=1$ and $s=+1$.

###  2.2 Mixing equations

The time evolution of the Hamiltonian eigenstates is given by the Schrödinger
equation,

$i\frac{d}{dt}\left|{M}_{\pm}\right\rangle=\hat{H}\left|{M}_{\pm}\right\rangle,$
(6)

where $\hat{H}$ is the effective Hamiltonian operator

$\hat{H}=\hat{M}-i\frac{\hat{\Gamma}}{2}.$ (7)

The solution of the time evolution can be expressed, therefore, as

$\left|{M}_{\pm}(t)\right\rangle=\theta(t)e^{-iH_{\pm}t}\left|{M}_{\pm}\right\rangle=h_{\pm}(t)\left|{M}_{\pm}\right\rangle,$
(8)

where $H_{\pm}$ are the Hamiltonian eigenvalues for
$\left|{M}_{\pm}\right\rangle$. This defines the $h_{\pm}(t)$ functions. For
convenience, it is useful to define

$\displaystyle m$ $\displaystyle=\frac{m_{-}+m_{+}}{2},$ (9)
$\displaystyle\Gamma$ $\displaystyle=\frac{\Gamma_{-}+\Gamma_{+}}{2},$ (10)
$\displaystyle H_{0}$
$\displaystyle=\frac{H_{-}+H_{+}}{2}=m-i\frac{\Gamma}{2}.$ (11)

With these definitions it is useful to express

$h_{\pm}(t)=\theta(t)e^{-iH_{\pm}t}=\theta(t)e^{-iH_{0}t}e^{\pm z\frac{\Gamma
t}{2}}=\theta(t)e^{-imt}e^{-\frac{\Gamma t}{2}}e^{\pm\phi_{\mathrm{mix}}(t)},$
(12)

where

$z=\frac{i\left(H_{-}-H_{+}\right)}{\Gamma}=\frac{\Gamma_{-}-\Gamma_{+}}{2\Gamma}+i\frac{m_{-}-m_{+}}{\Gamma},$
(13)

and

$\phi_{\mathrm{mix}}(t)=\frac{z\Gamma t}{2}.$ (14)

The $z$ complex coefficient contains all the necessary information to describe
mixing. In the charm sector, equations are typically expressed in terms of the
mixing parameters $x_{D}$ and $y_{D}$, such that

$z=-(y_{D}+ix_{D}).$ (15)

In the bottom sector, the parameters of interest are typically $\Delta m$,
defined as the mass difference between the heavy and the light eigenstates,
$\Delta m=m_{h}-m_{l}$, and $\Delta\Gamma$, defined as the width difference
between the light and the heavy eigenstates,
$\Delta\Gamma=\Gamma_{l}-\Gamma_{h}$. With this convention, $\Delta m$ is
positively defined and

$z=-\frac{\Delta\Gamma}{2\Gamma}+i\frac{\Delta m}{\Gamma}.$ (16)

In this paper, the real and imaginary parts of $z$ are noted $x$ and $y$,
respectively, i.e. $z=x+i\,y$.

The time dependence of all the mixing observables can be expressed in terms of
$\left|h_{\pm}(t)\right|^{2}$ and $h_{+}h_{-}^{\star}$. Therefore, the term
$e^{-imt}$ in equation (12) vanishes in all the observables and can be
omitted,

$h_{\pm}(t)=\theta(t)e^{-\frac{\Gamma t}{2}}e^{\pm\phi_{\mathrm{mix}}(t)}.$
(17)

The time evolution of the flavor eigenstates can be derived from their
expression in terms of Hamiltonian eigenstates (4),

$\displaystyle\left|{M}^{0}(t)\right\rangle$
$\displaystyle=\frac{h_{+}(t)+h_{-}(t)}{2}\left|\vphantom{\bar{M}^{0}}{M}^{0}\right\rangle+\frac{q}{p}\frac{h_{+}(t)-h_{-}(t)}{2}\left|\bar{M}^{0}\right\rangle,$
(18) $\displaystyle\left|\bar{M}^{0}(t)\right\rangle$
$\displaystyle=\frac{h_{+}(t)+h_{-}(t)}{2}\left|\bar{M}^{0}\right\rangle+\frac{p}{q}\frac{h_{+}(t)-h_{-}(t)}{2}\left|\vphantom{\bar{M}^{0}}{M}^{0}\right\rangle.$
(19)

For convenience, the $g_{\pm}(t)$ functions are defined as

$g_{\pm}(t)=\frac{h_{+}(t)\pm h_{-}(t)}{2}=\theta(t)\,e^{-\frac{\Gamma
t}{2}}~{}^{\cosh}_{\sinh}\left[\phi_{\mathrm{mix}}(t)\right],$ (20)

so equations (18) and (19) can be written as

$\displaystyle p\left|{M}^{0}(t)\right\rangle$
$\displaystyle=g_{+}(t)\,p\left|\vphantom{\bar{M}^{0}}{M}^{0}\right\rangle+g_{-}(t)\,q\left|\bar{M}^{0}\right\rangle,$
(21) $\displaystyle q\left|\bar{M}^{0}(t)\right\rangle$
$\displaystyle=g_{+}(t)\,q\left|\bar{M}^{0}\right\rangle+g_{-}(t)\,p\left|\vphantom{\bar{M}^{0}}{M}^{0}\right\rangle,$
(22)

which can be expressed in matrix form as

$\begin{pmatrix}p\left|{M}^{0}(t)\right\rangle\vphantom{e^{i\xi_{\mathrm{CP}}}q\bar{A}(t)e^{\frac{\Gamma
t}{2}}}\\\
q\left|\bar{M}^{0}(t)\right\rangle\vphantom{e^{i\xi_{\mathrm{CP}}}q\bar{A}(t)e^{\frac{\Gamma
t}{2}}}\end{pmatrix}=\begin{pmatrix}\vphantom{e^{i\xi_{\mathrm{CP}}}p\left|{M}^{0}(t)\right\rangle
e^{\frac{\Gamma
t}{2}}}\cosh\phi_{\mathrm{mix}}(t)&\sinh\phi_{\mathrm{mix}}(t)\\\
\vphantom{e^{i\xi_{\mathrm{CP}}}q\left|\bar{M}^{0}(t)\right\rangle
e^{\frac{\Gamma
t}{2}}}\sinh\phi_{\mathrm{mix}}(t)&\cosh\phi_{\mathrm{mix}}(t)\end{pmatrix}\begin{pmatrix}e^{-\frac{\Gamma
t}{2}}\,p\left|\vphantom{\bar{M}^{0}}{M}^{0}\right\rangle\\\ e^{-\frac{\Gamma
t}{2}}\,q\left|\bar{M}^{0}\right\rangle\end{pmatrix}.$ (23)

This allows us to interpret mixing as a complex hyperbolic rotation of the
time evolution of the states vector without mixing, given by

$e^{-\frac{\Gamma
t}{2}}\begin{pmatrix}p\left|\vphantom{\bar{M}^{0}}{M}^{0}\right\rangle\\\
q\left|\bar{M}^{0}\right\rangle\end{pmatrix}.$ (24)

The time evolution of the neutral mesons can, therefore, be expressed as

$\begin{pmatrix}\left|{M}^{0}(t)\right\rangle\vphantom{e^{i\xi_{\mathrm{CP}}}q\bar{A}(t)e^{\frac{\Gamma
t}{2}}}\\\
\left|\bar{M}^{0}(t)\right\rangle\vphantom{e^{i\xi_{\mathrm{CP}}}q\bar{A}(t)e^{\frac{\Gamma
t}{2}}}\end{pmatrix}=e^{-\frac{\Gamma
t}{2}}Q^{-1}G_{\mathrm{mix}}Q\begin{pmatrix}\left|\vphantom{\bar{M}^{0}}{M}^{0}\right\rangle\\\
\left|\bar{M}^{0}\right\rangle\end{pmatrix},$ (25)

where

$G_{\mathrm{mix}}=G[\phi_{\mathrm{mix}}(t)]=\begin{pmatrix}\vphantom{e^{i\xi_{\mathrm{CP}}}p\bar{A}(t)e^{\frac{\Gamma
t}{2}}}\cosh\phi_{\mathrm{mix}}(t)&\sinh\phi_{\mathrm{mix}}(t)\\\
\vphantom{e^{i\xi_{\mathrm{CP}}}q\bar{A}(t)e^{\frac{\Gamma
t}{2}}}\sinh\phi_{\mathrm{mix}}(t)&\cosh\phi_{\mathrm{mix}}(t)\end{pmatrix},\qquad
Q=\begin{pmatrix}p&0\\\ 0&q\end{pmatrix}.$ (26)

The $g_{\pm}(t)$ functions have the following useful properties:

$\displaystyle\left|g_{\pm}(t)\right|^{2}$
$\displaystyle=\theta(t)\,e^{-\Gamma t}\,\frac{\cosh{(x\Gamma
t)}\pm\cos{(y\Gamma t)}}{2},$ (27) $\displaystyle g_{+}^{\star}(t)g_{-}(t)$
$\displaystyle=\theta(t)\,e^{-\Gamma t}\,\frac{\sinh{(x\Gamma
t)}+i\sin{(y\Gamma t)}}{2}.$ (28)

For the rest of the paper, the $\theta(t)$ term is not written explicitly and
the expressions that follow are only valid for positive $t$. For negative $t$,
all amplitudes and states are zero.

The amplitudes of the $\left|\vphantom{\bar{M}^{0}}{M}^{0}\right\rangle$ and
$\left|\bar{M}^{0}\right\rangle$ decays into a final state
$\left|f\right\rangle$, $\left\langle
f\\!\left|\vphantom{\bar{M}^{0}}H\right|\\!{M}^{0}\right\rangle$ and
$\left\langle
f\\!\left|\vphantom{\bar{M}^{0}}H\right|\\!\bar{M}^{0}\right\rangle$, are
given by

$\begin{pmatrix}p{A}(t)\vphantom{e^{i\xi_{\mathrm{CP}}}q\bar{A}(t)e^{\frac{\Gamma
t}{2}}}\\\
q\bar{A}(t)\vphantom{e^{i\xi_{\mathrm{CP}}}q\bar{A}(t)e^{\frac{\Gamma
t}{2}}}\end{pmatrix}=G_{\mathrm{mix}}(t)\begin{pmatrix}p{A}\,e^{-\frac{\Gamma
t}{2}}\\\ q\bar{A}\,e^{-\frac{\Gamma t}{2}}\end{pmatrix},$ (29)

which can be interpreted as a complex hyperbolic rotation of the amplitude
vector time evolution without mixing,

$\begin{pmatrix}p{A}\,e^{-\frac{\Gamma t}{2}}\\\ q\bar{A}\,e^{-\frac{\Gamma
t}{2}}\end{pmatrix}.$ (30)

The hyperbolic rotation $G_{\mathrm{mix}}$ is an element of the Lie group
$SO(1,1,\mathbb{C})$, which is also a differentiable manifold. The time
variable $t$ parameterizes a curve into the manifold. This gives mixing a
geometric interpretation. In section §3 it is shown that this interpretation
can also be extended to $CPV$.

Because the Lorentz group with one space dimension is
$SO^{+}(1,1,\mathbb{R})$, the mixing group has properties similar to those of
special relativity. In particular, one can write the time evolution of

$\lambda=\frac{q}{p}\frac{\bar{A}}{{A}}$ (31)

as

$\lambda(t)=\frac{q}{p}\frac{\bar{A}(t)}{{A}(t)}=\frac{\lambda+\tanh\phi_{\mathrm{mix}}(t)}{1+\lambda\tanh\phi_{\mathrm{mix}}(t)}$
(32)

which, not surprisingly, has the same form as the formula of addition of
velocities in special relativity. In analogy to the concept of rapidity, one
can define the hyperbolic magnitude

$\phi_{\lambda}=\mathrm{atanh}\left(\lambda\right),$ (33)

whose time evolution is just additive,

$\phi_{\lambda}(t)=\phi_{\lambda}+\phi_{\mathrm{mix}}(t).$ (34)

In this hyperbolic space, the time evolution of $\phi_{\lambda}$ is a point
moving from its initial value towards a constant direction determined by $z$
and $\Gamma$ and, since $\phi_{\mathrm{mix}}(t)$ is a linear function in time,
this move takes place at a constant pace.

Equation (29) imposes a mixing invariant, given by Minkowski squaring the
transformed vector,

$p^{2}A^{2}(t)-q^{2}\bar{A}^{2}(t)=\left(p^{2}A^{2}-q^{2}\bar{A}^{2}\right)e^{-\Gamma
t}.$ (35)

##  3 CPV equations

In experimental measurements of the CKM angle $\gamma$, it is important to
derive the time dependence of amplitudes in the whole decay chain. To
illustrate the formalism described above, it will be useful to go through the
complete example of a $B$ meson decay to a neutral $D$ meson.

Measurements of the CKM angle $\gamma$ involve decays where a neutral $D$
meson is produced as a superposition of flavor eigenstates
$\left|\vphantom{\bar{D}^{0}}{D}^{0}\right\rangle$ and
$\left|\bar{D}^{0}\right\rangle$,

$\displaystyle\left|{D}_{-}\right\rangle$
$\displaystyle\propto\left|\vphantom{\bar{D}^{0}}{D}^{0}\right\rangle+z_{-}\left|\bar{D}^{0}\right\rangle,$
(36) $\displaystyle\left|{D}_{+}\right\rangle$
$\displaystyle\propto\left|\bar{D}^{0}\right\rangle+z_{+}\left|\vphantom{\bar{D}^{0}}{D}^{0}\right\rangle,$
(37)

where $\left|{D}_{-}\right\rangle$ denotes a state dominated by the
$\left|\vphantom{\bar{D}^{0}}{D}^{0}\right\rangle$ component and
$\left|{D}_{+}\right\rangle$ a state dominated by the
$\left|\bar{D}^{0}\right\rangle$ component,

$\left|\frac{\left\langle\bar{D}^{0}\left|\vphantom{\bar{D}^{0}}\right.\\!D_{-}\right\rangle}{\left\langle\vphantom{\bar{D}^{0}}{D}^{0}\left|\vphantom{\bar{D}^{0}}\right.\\!D_{-}\right\rangle}\right|<1,\qquad\left|\frac{\left\langle\vphantom{\bar{D}^{0}}{D}^{0}\left|\vphantom{\bar{D}^{0}}\right.\\!D_{+}\right\rangle}{\left\langle\bar{D}^{0}\left|\vphantom{\bar{D}^{0}}\right.\\!D_{+}\right\rangle}\right|<1.$
(38)

Decays such as $B^{\pm}\rightarrow DK^{\pm}$ produce
$\left|{D}_{\pm}\right\rangle$ states, respectively, but the sign in
$\left|{D}_{\pm}\right\rangle$ may not correspond to the charge of the $B$
mother particle, such as in $B^{0}\rightarrow DK^{*0}$ decays. For this
reason, to avoid confusion between the $B$ mother charge and the flavor
content of its daughters, the initial state is denoted
$\left|{B}_{\pm}\right\rangle$, instead of $\left|B^{\pm}\right\rangle$.

The time evolution of the product of amplitudes from the initial
$\left|{B}_{\pm}\right\rangle$ state to a final state $\left|f\right\rangle$
is given by

$A^{B_{\pm}}_{f}(t)=\left\langle
f\right|\mathcal{H}\begin{pmatrix}\left|\vphantom{\bar{D}^{0}}{D}^{0}(t)\right\rangle&\left|\bar{D}^{0}(t)\right\rangle\end{pmatrix}\begin{pmatrix}\vphantom{\frac{1^{1}}{1^{1}}}\left\langle\vphantom{\bar{D}^{0}}{D}^{0}\right|\\\
\vphantom{\frac{1^{1}}{1^{1}}}\left\langle\bar{D}^{0}\right|\end{pmatrix}\mathcal{H}\left|{B}_{\pm}\right\rangle$
(39)

The time evolution of the neutral $D$ component in this equation is given by
equation (25), so

$\displaystyle\left\langle
f\right|\mathcal{H}\begin{pmatrix}\left|\vphantom{\bar{D}^{0}}{D}^{0}(t)\right\rangle&\left|\bar{D}^{0}(t)\right\rangle\end{pmatrix}$
$\displaystyle=e^{-\frac{\Gamma t}{2}}\left\langle
f\right|\mathcal{H}\begin{pmatrix}\left|\vphantom{\bar{D}^{0}}{D}^{0}\right\rangle&\left|\bar{D}^{0}\right\rangle\end{pmatrix}QG_{\mathrm{mix}}Q^{-1}$
(40) $\displaystyle=e^{-\frac{\Gamma
t}{2}}\begin{pmatrix}A^{D}_{f}&A^{\bar{D}}_{f}\end{pmatrix}QG_{\mathrm{mix}}Q^{-1},$

which uses the fact that $G^{\intercal}=G$ and $Q^{\intercal}=Q$. On the other
hand,

$\begin{pmatrix}\vphantom{\frac{1^{1}}{1^{1}}}\left\langle\vphantom{\bar{D}^{0}}{D}^{0}\right|\\\
\vphantom{\frac{1^{1}}{1^{1}}}\left\langle\bar{D}^{0}\right|\end{pmatrix}\mathcal{H}\left|{B}_{\pm}\right\rangle=A^{\pm}_{\tilde{D}}\begin{pmatrix}1&z_{\pm}\\\
z_{\pm}&1\end{pmatrix}\begin{pmatrix}\delta_{\pm-}\\\
\delta_{\pm+}\end{pmatrix},$ (41)

where $\delta_{ab}$ is the Kronecker delta, the vector on the right hand side
is used to select the appropriate column of the matrix, and
$A^{\pm}_{\tilde{D}}$ is used to represent either of

$A^{-}_{D}=\left\langle{D}^{0}|\mathcal{H}|B^{-}\right\rangle,\qquad
A^{+}_{\bar{D}}=\left\langle\bar{D}^{0}|\mathcal{H}|B^{+}\right\rangle.$ (42)

By defining

$\displaystyle\beta_{\pm}$ $\displaystyle=\left(\frac{q}{p}\right)^{\\!\\!\pm
1}z_{\pm},$ (43) $\displaystyle\gamma_{\pm}$
$\displaystyle=\frac{1}{\displaystyle\sqrt{1-\beta_{\pm}^{2}}},$ (44)
$\displaystyle\phi_{\pm}$ $\displaystyle=\mathrm{atanh}{\beta_{\pm}},$ (45)

it is easy to check that

$Q^{-1}\begin{pmatrix}1&z_{\pm}\\\
z_{\pm}&1\end{pmatrix}\begin{pmatrix}\delta_{\pm-}\\\
\delta_{\pm+}\end{pmatrix}=\gamma_{\pm}^{-1}G_{\pm}Q^{-1}\begin{pmatrix}\delta_{\pm-}\\\
\delta_{\pm+}\end{pmatrix},$ (46)

where $G_{\pm}=G(\phi_{\pm})$.

With all these definitions, equation (39) becomes

$A^{B_{\pm}}_{f}(t)=e^{-\frac{\Gamma
t}{2}}\frac{A^{\pm}_{\tilde{D}}}{\gamma_{\pm}}\begin{pmatrix}A^{D}_{f}&A^{\bar{D}}_{f}\end{pmatrix}QG_{\pm}(t)Q^{-1}\begin{pmatrix}\delta_{\pm-}\\\
\delta_{\pm+}\end{pmatrix},$ (47)

with

$G_{\pm}(t)=G_{\mathrm{mix}}G_{\pm}=G[\phi_{\pm}(t)],$ (48)

where, analogously to equation (34), the time evolution of the $\phi_{\pm}$
observables is given by

$\phi_{\pm}(t)=\phi_{\pm}+\phi_{\mathrm{mix}}(t).$ (49)

In some cases it may be useful to even include the terms of the amplitude
vector into the hyperbolic rotation matrix,

$A^{B_{\pm}}_{f}(t)=e^{-\frac{\Gamma
t}{2}}\frac{A^{\pm}_{\tilde{D}}}{\gamma_{\pm}}\frac{A^{\tilde{D}}_{f}}{\gamma_{\pm}^{\lambda}}\begin{pmatrix}\delta_{\pm-}&\delta_{\pm+}\end{pmatrix}QG_{\lambda\pm}(t)Q^{-1}\begin{pmatrix}\delta_{\pm-}\\\
\delta_{\pm+}\end{pmatrix},$ (50)

where the function used for $G_{\lambda\pm}(t)$ is given by

$\phi^{\lambda_{D}}_{\pm}(t)=\phi_{\pm}+\phi_{\pm}^{\lambda_{D}}+\phi_{\mathrm{mix}}(t),$
(51)

and

$\phi_{\pm}^{\lambda_{D}}=\mathrm{atanh}(\lambda_{D}^{\mp 1}),$ (52)

and

$\lambda_{D}=\frac{q}{p}\frac{A^{\bar{D}}_{f}}{A^{D}_{f}}.$ (53)

However, in other cases $A^{D}_{f}$ may be zero or very small in some regions
of the phase space, and $\lambda_{D}$ in equation (53) may not be well defined
or be numerically unstable in these regions. To preserve generality as much as
possible, the following sections do not include the terms of the amplitude
vector in the hyperbolic rotation matrix.

###  3.1 Charm mixing correction on $CPV$ parameters

Equations (47) allow to express the $A_{\pm}(t)$ amplitudes using a common
formalism with mixing, as described in §2. In order to take all experimental
effects into account, a simultaneous fit for the mixing and $C\\!P$ violation
parameters is advised. However, considering the large effort it may represent,
a mixing correction of the $C\\!P$ violation parameters is easily deduced from
(49). Denoting as $\phi_{\pm}^{\mathrm{m}}$ the measured hyperbolic $C\\!P$
violation parameters in a fit that ignores mixing,

$\phi_{\pm}^{\mathrm{m}}=\left\langle\phi_{\pm}(t)\right\rangle=\phi_{\pm}+\left\langle\phi_{\mathrm{mix}}(t)\right\rangle,$
(54)

so the actual hyperbolic $C\\!P$ violation parameters can be obtained as a
correction on the measured ones as

$\phi_{\pm}=\phi_{\pm}^{\mathrm{m}}-\frac{z\left\langle\Gamma
t\right\rangle}{2}.$ (55)

Notice that, if $\phi_{\pm}$ parameters are used, the only information
necessary to apply a mixing correction to a result is a measurement of
$\left\langle\Gamma t\right\rangle$, which is valid for any lifetime
distribution. If $z_{\pm}$ was used instead, one would have to calculate

$\beta_{\pm}=\left\langle\frac{\beta_{\pm}^{\mathrm{m}}-\tanh\left[\phi_{\mathrm{mix}}(t)\right]}{1-\beta_{\pm}^{\mathrm{m}}\tanh\left[\phi_{\mathrm{mix}}(t)\right]}\right\rangle,$
(56)

and, in this case, a measurement of $\left\langle\Gamma t\right\rangle$ would
not be enough to calculate the correction.

###  3.2 Specific equations for established methodologies

Charm mixing has effects on the GLW, ADS and GGSZ observables. This subsection
describes how the equations relevant to these methods are modified in the
presence of charm mixing.

The time-dependent measurement of $\gamma$ in $B_{s}\rightarrow
D_{s}^{\mp}K^{\pm}$ depends on $B_{s}$ mixing and it can also be easily
expressed using the formalism in §3.

####  3.2.1 Common trace

Since the most common amplitudes are proportional to

$\gamma_{\pm}^{-1}\begin{pmatrix}a&b\end{pmatrix}QG_{\pm}(t)Q^{-1}\begin{pmatrix}\delta_{\pm-}\\\
\delta_{\pm+}\end{pmatrix},$ (57)

for some values of $a$ and $b$, it is useful to calculate

$\mathrm{Tr}\left[e^{-\Gamma
t}\left|\gamma_{\pm}\right|^{-2}\begin{pmatrix}\delta_{\pm-}&\delta_{\pm+}\end{pmatrix}Q^{\star-1}G_{\pm}(t)^{\star}Q^{\star}\begin{pmatrix}a^{\star}\\\
b^{\star}\end{pmatrix}\begin{pmatrix}a&b\end{pmatrix}QG_{\pm}(t)Q^{-1}\begin{pmatrix}\delta_{\pm-}\\\
\delta_{\pm+}\end{pmatrix}\right].$ (58)

The result can be expressed as

$\mathrm{Tr}\left[\dots\right]=\delta_{\pm-}\left|a\,u_{-}(t)+b\,\zeta_{-}(t)\right|^{2}+\delta_{\pm+}\left|b\,u_{+}(t)+a\,\zeta_{+}(t)\right|^{2},$
(59)

where

$\displaystyle u_{\pm}(t)$ $\displaystyle=e^{-\frac{\Gamma
t}{2}}\frac{\cosh\phi_{\pm}(t)}{\cosh\phi_{\pm}},$ (60)
$\displaystyle\zeta_{\pm}(t)$ $\displaystyle=e^{-\frac{\Gamma
t}{2}}\left(\frac{q}{p}\right)^{\\!\\!\mp
1}\frac{\sinh\phi_{\pm}(t)}{\cosh\phi_{\pm}},$ (61)

which satisfy

$\displaystyle u_{\pm}(0)$ $\displaystyle=1,$ (62)
$\displaystyle\zeta_{\pm}(0)$ $\displaystyle=z_{\pm}.$ (63)

For a later section, it is also useful to define

$\xi_{\pm}(t)=e^{-\frac{\Gamma
t}{2}}\frac{\sinh\phi_{\pm}(t)}{\cosh\phi_{\pm}}.$ (64)

####  3.2.2 GLW equations

The GLW method [1, 2] uses, on one hand, states that are accessible from only
one of the flavor eigenstates, either
$\left|\vphantom{\bar{D}^{0}}{D}^{0}\right\rangle$ or
$\left|\bar{D}^{0}\right\rangle$, such that

$\displaystyle A^{{D}}_{{f}}$ $\displaystyle=\left\langle
f_{{D}}|\mathcal{H}|{D}^{0}\right\rangle,$ (65) $\displaystyle
A^{\bar{D}}_{\bar{f}}$ $\displaystyle=\left\langle
f_{\bar{D}}|\mathcal{H}|\bar{D}^{0}\right\rangle,$ (66) $\displaystyle
A^{{D}}_{\bar{f}}$ $\displaystyle=\left\langle
f_{\bar{D}}|\mathcal{H}|{D}^{0}\right\rangle=0,$ (67) $\displaystyle
A^{\bar{D}}_{{f}}$ $\displaystyle=\left\langle
f_{{D}}|\mathcal{H}|\bar{D}^{0}\right\rangle=0,$ (68)

and, on the other hand, states that are accessible from either of the $CP$
eigenstates $\left|{D}_{\pm}^{\mathrm{CP}}\right\rangle$, such that

$\displaystyle A^{\mathrm{CP}}_{\pm}=$ $\displaystyle\left\langle
f_{\pm}|\mathcal{H}|D^{\mathrm{CP}}_{\pm}\right\rangle,$ (69)
$\displaystyle\left\langle
f_{\mp}|\mathcal{H}|D^{\mathrm{CP}}_{\pm}\right\rangle=0.$ (70)

If the initial $D$ meson state is a superposition
$\left|{D}_{\pm}\right\rangle$, then

$\displaystyle\left\langle f_{{D}}|\mathcal{H}|D_{-}(t)\right\rangle$
$\displaystyle=e^{-\frac{\Gamma
t}{2}}A^{{D}}_{{f}}\gamma_{-}^{-1}\begin{pmatrix}1&0\end{pmatrix}Q_{D}^{-1}G_{-}(t)Q_{D}\begin{pmatrix}1\\\
0\end{pmatrix},$ (71) $\displaystyle\left\langle
f_{\bar{D}}|\mathcal{H}|D_{+}(t)\right\rangle$ $\displaystyle=e^{-\frac{\Gamma
t}{2}}A^{\bar{D}}_{\bar{f}}\gamma_{+}^{-1}\begin{pmatrix}0&1\end{pmatrix}Q_{D}^{-1}G_{+}(t)Q_{D}\begin{pmatrix}0\\\
1\end{pmatrix},$ (72) $\displaystyle\left\langle
f_{\pm}|\mathcal{H}|D_{-}(t)\right\rangle$ $\displaystyle=e^{-\frac{\Gamma
t}{2}}A^{\mathrm{CP}}_{\pm}\gamma_{-}^{-1}\begin{pmatrix}1&0\end{pmatrix}Q_{D}^{-1}G_{-}(t)Q_{D}\begin{pmatrix}\frac{1}{\sqrt{2}}\\\
\pm\frac{1}{\sqrt{2}}\end{pmatrix},$ (73) $\displaystyle\left\langle
f_{\pm}|\mathcal{H}|D_{+}(t)\right\rangle$ $\displaystyle=e^{-\frac{\Gamma
t}{2}}A^{\mathrm{CP}}_{\pm}\gamma_{+}^{-1}\begin{pmatrix}0&1\end{pmatrix}Q_{D}^{-1}G_{+}(t)Q_{D}\begin{pmatrix}\frac{1}{\sqrt{2}}\\\
\pm\frac{1}{\sqrt{2}}\end{pmatrix}.$ (74)

The observables of interest are

$\displaystyle R_{\mathrm{CP}}^{\pm}$
$\displaystyle=\frac{\Gamma\left(B^{-}\rightarrow
D_{\pm}^{\mathrm{CP}}h^{-}\right)+\Gamma\left(B^{+}\rightarrow
D_{\pm}^{\mathrm{CP}}h^{+}\right)}{\Gamma\left(B^{-}\rightarrow{D}^{0}h^{-}\right)+\Gamma\left(B^{+}\rightarrow\bar{D}^{0}h^{+}\right)}$
(75) $\displaystyle=\frac{\left|\left\langle
f_{\pm}|\mathcal{H}|D_{-}(t)\right\rangle\right|^{2}+\left|\left\langle
f_{\pm}|\mathcal{H}|D_{+}(t)\right\rangle\right|^{2}}{\left|\left\langle
f_{{D}}|\mathcal{H}|D_{-}(t)\right\rangle\right|^{2}+\left|\left\langle
f_{\bar{D}}|\mathcal{H}|D_{+}(t)\right\rangle\right|^{2}}$ (76)
$\displaystyle=\frac{1}{2}\left|\frac{A^{\mathrm{CP}}_{\pm}}{A^{D}_{f}}\right|^{2}\frac{\left|u_{-}(t)\pm\zeta_{-}(t)\right|^{2}+\left|u_{+}(t)\pm\zeta_{+}(t)\right|^{2}}{\left|u_{-}(t)\right|^{2}+\left|u_{+}(t)\right|^{2}},$
(77)

and

$\displaystyle A_{\mathrm{CP}}^{\pm}$
$\displaystyle=\frac{\Gamma\left(B^{-}\rightarrow
D_{\pm}^{\mathrm{CP}}h^{-}\right)-\Gamma\left(B^{+}\rightarrow
D_{\pm}^{\mathrm{CP}}h^{+}\right)}{\Gamma\left(B^{-}\rightarrow
D_{\pm}^{\mathrm{CP}}h^{-}\right)+\Gamma\left(B^{+}\rightarrow
D_{\pm}^{\mathrm{CP}}h^{+}\right)}$ (78)
$\displaystyle=\frac{\left|\left\langle
f_{\pm}|\mathcal{H}|D_{-}(t)\right\rangle\right|^{2}-\left|\left\langle
f_{\pm}|\mathcal{H}|D_{+}(t)\right\rangle\right|^{2}}{\left|\left\langle
f_{\pm}|\mathcal{H}|D_{-}(t)\right\rangle\right|^{2}+\left|\left\langle
f_{\pm}|\mathcal{H}|D_{+}(t)\right\rangle\right|^{2}}$ (79)
$\displaystyle=\frac{\left|u_{-}(t)\pm\zeta_{-}(t)\right|^{2}-\left|u_{+}(t)\pm\zeta_{+}(t)\right|^{2}}{\left|u_{-}(t)\pm\zeta_{-}(t)\right|^{2}+\left|u_{+}(t)\pm\zeta_{+}(t)\right|^{2}}.$
(80)

Notice that, at $t=0$,

$\displaystyle\frac{\left|u_{-}(t)\pm\zeta_{-}(t)\right|^{2}+\left|u_{+}(t)\pm\zeta_{+}(t)\right|^{2}}{\left|u_{-}(t)\right|^{2}+\left|u_{+}(t)\right|^{2}}=\frac{\left|1\pm
z_{-}\right|^{2}+\left|1\pm z_{+}\right|^{2}}{2}$ $\displaystyle=1+r^{2}\pm
2r\cos\delta\cos\gamma,$ (81)
$\displaystyle\frac{\left|u_{-}(t)\pm\zeta_{-}(t)\right|^{2}-\left|u_{+}(t)\pm\zeta_{+}(t)\right|^{2}}{\left|u_{-}(t)\pm\zeta_{-}(t)\right|^{2}+\left|u_{+}(t)\pm\zeta_{+}(t)\right|^{2}}=\frac{\left|1\pm
z_{-}\right|^{2}-\left|1\pm z_{+}\right|^{2}}{\left|1\pm
z_{-}\right|^{2}+\left|1\pm z_{+}\right|^{2}}$ $\displaystyle=\frac{\pm
2r\sin\delta\sin\gamma}{1+r^{2}\pm 2r\cos\delta\cos\gamma}.$ (82)

####  3.2.3 ADS equations

The ADS method [3] uses states that are accessible from both flavor
eigenstates. With the convention
$CP\left|\vphantom{\bar{D}^{0}}{D}^{0}\right\rangle=\left|\bar{D}^{0}\right\rangle$
and assuming no direct $CP$ violation in the $D$ decay, one can define the
$\rho$ ratio of amplitudes as

$\rho=\frac{A^{\bar{D}}_{{f}}}{A^{{D}}_{{f}}}=\frac{A^{{D}}_{\bar{f}}}{A^{\bar{D}}_{\bar{f}}}.$
(83)

If the initial $D$ meson state is a superposition
$\left|{D}_{\pm}\right\rangle$, then

$\displaystyle\left\langle f_{{D}}|\mathcal{H}|D_{-}(t)\right\rangle$
$\displaystyle=e^{-\frac{\Gamma
t}{2}}A^{{D}}_{{f}}\gamma_{-}^{-1}\begin{pmatrix}1&0\end{pmatrix}Q_{D}^{-1}G_{-}(t)Q_{D}\begin{pmatrix}1\\\
\rho\end{pmatrix},$ (84) $\displaystyle\left\langle
f_{\bar{D}}|\mathcal{H}|D_{-}(t)\right\rangle$ $\displaystyle=e^{-\frac{\Gamma
t}{2}}A^{\bar{D}}_{\bar{f}}\gamma_{-}^{-1}\begin{pmatrix}1&0\end{pmatrix}Q_{D}^{-1}G_{-}(t)Q_{D}\begin{pmatrix}\rho\\\
1\end{pmatrix},$ (85) $\displaystyle\left\langle
f_{{D}}|\mathcal{H}|D_{+}(t)\right\rangle$ $\displaystyle=e^{-\frac{\Gamma
t}{2}}A^{{D}}_{{f}}\gamma_{+}^{-1}\begin{pmatrix}0&1\end{pmatrix}Q_{D}^{-1}G_{+}(t)Q_{D}\begin{pmatrix}1\\\
\rho\end{pmatrix},$ (86) $\displaystyle\left\langle
f_{\bar{D}}|\mathcal{H}|D_{+}(t)\right\rangle$ $\displaystyle=e^{-\frac{\Gamma
t}{2}}A^{\bar{D}}_{\bar{f}}\gamma_{+}^{-1}\begin{pmatrix}0&1\end{pmatrix}Q_{D}^{-1}G_{+}(t)Q_{D}\begin{pmatrix}\rho\\\
1\end{pmatrix}$ (87)

One can define

$\displaystyle\Gamma^{\pm}_{\mathrm{fav}}$
$\displaystyle=\Gamma\left(B^{\pm}\rightarrow
D_{\mathrm{fav}}\,h^{\pm}\right)$ $\displaystyle=\left\\{\begin{aligned}
\left|\left\langle
f_{{D}}|\mathcal{H}|D_{-}(t)\right\rangle\right|^{2}&&\text{for $D_{-}$}\\\
\left|\left\langle
f_{\bar{D}}|\mathcal{H}|D_{+}(t)\right\rangle\right|^{2}&&\text{for
$D_{+}$}\end{aligned}\right.$ (88)
$\displaystyle=\left|A^{\pm}_{\tilde{D}}A^{D}_{f}\right|^{2}\left|u_{\pm}(t)+\rho\,\zeta_{\pm}(t)\right|^{2},$
(89) $\displaystyle\Gamma^{\pm}_{\mathrm{sup}}$
$\displaystyle=\Gamma\left(B^{\pm}\rightarrow
D_{\mathrm{sup}}\,h^{\pm}\right)$ $\displaystyle=\left\\{\begin{aligned}
\left|\left\langle
f_{\bar{D}}|\mathcal{H}|D_{-}(t)\right\rangle\right|^{2}&&\text{for
$D_{-}$}\\\ \left|\left\langle
f_{{D}}|\mathcal{H}|D_{+}(t)\right\rangle\right|^{2}&&\text{for
$D_{+}$}\end{aligned}\right.$ (90)
$\displaystyle=\left|A^{\pm}_{\tilde{D}}A^{D}_{f}\right|^{2}\left|\rho\,u_{\pm}(t)+\zeta_{\pm}(t)\right|^{2},$
(91)

where $D_{\mathrm{sup}}$ and $D_{\mathrm{fav}}$ refer to suppresed and favored
decay modes of the produced $D$ meson.

The observables of interest are

$R_{\mathrm{ADS}}^{\pm}=\frac{\Gamma^{\pm}_{\mathrm{sup}}}{\Gamma^{\pm}_{\mathrm{fav}}}=\left|\frac{\rho\,u_{\pm}(t)+\zeta_{\pm}(t)}{u_{\pm}(t)+\rho\,\zeta_{\pm}(t)}\right|^{2}.$
(92)

It is also frequent to use the observables

$\displaystyle R_{\mathrm{ADS}}$
$\displaystyle=\frac{\Gamma^{-}_{\mathrm{sup}}+\Gamma^{+}_{\mathrm{sup}}}{\Gamma^{-}_{\mathrm{fav}}+\Gamma^{+}_{\mathrm{fav}}}$
$\displaystyle=\frac{\left|\rho\,u_{-}(t)+\zeta_{-}(t)\right|^{2}+\left|\rho\,u_{+}(t)+\zeta_{+}(t)\right|^{2}}{\left|u_{-}(t)+\rho\,\zeta_{-}(t)\right|^{2}+\left|u_{+}(t)+\rho\,\zeta_{+}(t)\right|^{2}},$
(93) $\displaystyle A_{\mathrm{ADS}}^{\mathrm{sup}}$
$\displaystyle=\frac{\Gamma^{-}_{\mathrm{sup}}-\Gamma^{+}_{\mathrm{sup}}}{\Gamma^{-}_{\mathrm{sup}}+\Gamma^{+}_{\mathrm{sup}}}$
$\displaystyle=\frac{\left|\rho\,u_{-}(t)+\zeta_{-}(t)\right|^{2}-\left|\rho\,u_{+}(t)+\zeta_{+}(t)\right|^{2}}{\left|\rho\,u_{-}(t)+\zeta_{-}(t)\right|^{2}+\left|\rho\,u_{+}(t)+\zeta_{+}(t)\right|^{2}},$
(94) $\displaystyle A_{\mathrm{ADS}}^{\mathrm{fav}}$
$\displaystyle=\frac{\Gamma^{-}_{\mathrm{fav}}-\Gamma^{+}_{\mathrm{fav}}}{\Gamma^{-}_{\mathrm{fav}}+\Gamma^{+}_{\mathrm{fav}}}$
$\displaystyle=\frac{\left|u_{-}(t)+\rho\,\zeta_{-}(t)\right|^{2}-\left|u_{+}(t)+\rho\,\zeta_{+}(t)\right|^{2}}{\left|u_{-}(t)+\rho\,\zeta_{-}(t)\right|^{2}+\left|u_{+}(t)+\rho\,\zeta_{+}(t)\right|^{2}}.$
(95)

####  3.2.4 GGSZ equations

The GGSZ method [4] uses $3$ or more body decays to final states that can be
accessed from any of $\left|\vphantom{\bar{D}^{0}}{D}^{0}\right\rangle$ or
$\left|\bar{D}^{0}\right\rangle$. In this case, there may be regions of the
phase space where one of the amplitudes $A^{D}_{f}$ or $A^{\bar{D}}_{f}$ is
zero or very small. Because of this, it may be inconvenient to use terms where
one of the amplitudes is in the denominator and the expression for the common
trace obtained in §3.2.1 may be undefined or numerically unstable.

The probability distribution function $p_{\pm}(t)$ is proportional to
$\left|A^{B_{\pm}}_{f}(t)\right|^{2}$,

$\left|A^{B_{\pm}}_{f}(t)\right|^{2}=e^{-\Gamma
t}\left|\frac{A^{\pm}_{\tilde{D}}}{\gamma_{\pm}}\right|^{2}\begin{pmatrix}\delta_{\pm-}&\delta_{\pm+}\end{pmatrix}Q^{-1\star}G_{\pm}(t)^{\star}Q^{\star}\begin{pmatrix}{A^{D}_{f}}^{\star}\\\
{A^{\bar{D}}_{f}}^{\star}\end{pmatrix}\begin{pmatrix}A^{D}_{f}&A^{\bar{D}}_{f}\end{pmatrix}QG_{\pm}(t)Q^{-1}\begin{pmatrix}\delta_{\pm-}\\\
\delta_{\pm+}\end{pmatrix}.$ (96)

To simplify this expression, it is convenient to define

$\delta_{\pm}=\begin{pmatrix}\delta_{\pm-}\\\
\delta_{\pm+}\end{pmatrix}\begin{pmatrix}\delta_{\pm-}&\delta_{\pm+}\end{pmatrix}=\begin{pmatrix}\delta_{\pm-}&0\\\
0&\delta_{\pm+}\end{pmatrix},$ (97)

and

$\begin{pmatrix}A_{+}\\\
A_{-}\end{pmatrix}=\frac{1}{2}SQ\begin{pmatrix}A^{D}_{f}\\\
A^{\bar{D}}_{f}\end{pmatrix},$ (98)

where

$S=\begin{pmatrix}1&1\\\ 1&-1\end{pmatrix},$ (99)

such that

$Q\begin{pmatrix}A^{D}_{f}\\\
A^{\bar{D}}_{f}\end{pmatrix}=S\begin{pmatrix}A_{+}\\\ A_{-}\end{pmatrix}.$
(100)

By defining

$M=\begin{pmatrix}\left|A_{+}\right|^{2}&A_{+}^{\star}A_{-}\\\
A_{+}A_{-}^{\star}&\left|A_{-}\right|^{2}\end{pmatrix}$ (101)

and

$\Psi_{\pm}(t)=e^{-\Gamma
t}SG_{\pm}(t)\delta_{\pm}G_{\pm}(t)^{\star}S=e^{-\Gamma
t}\begin{pmatrix}e^{2{{\rm\,Re}\left[\phi_{\pm}(t)\right]}}&\mp
e^{2i{{\rm\,Im}\left[\phi_{\pm}(t)\right]}}\\\ \mp
e^{-2i{{\rm\,Im}\left[\phi_{\pm}(t)\right]}}&e^{-2{{\rm\,Re}\left[\phi_{\pm}(t)\right]}}\end{pmatrix}=\begin{pmatrix}\psi_{+}(t)&\mp\psi_{i}(t)\\\
\mp{\psi_{i}}^{\star}(t)&\psi_{-}(t)\end{pmatrix},$ (102)

one can see that

$\left|A^{B_{\pm}}_{f}(t)\right|^{2}=\left|\frac{A^{\pm}_{\tilde{D}}}{\gamma_{\pm}}\right|^{2}\frac{1}{\left|p\,\delta_{\pm-}+q\,\delta_{\pm+}\right|^{2}}\mathrm{Tr}\left[\Psi_{\pm}(t)M\right].$
(103)

The magnitudes involved in the previous equation include

$\displaystyle A_{\pm}$ $\displaystyle=\frac{pA^{D}_{f}\pm
qA^{\bar{D}}_{f}}{2},$ (104) $\displaystyle\psi_{\pm}(t)$
$\displaystyle=e^{\pm 2{{\rm\,Re}\left(\phi_{\pm}\right)}}e^{-\left(1\mp
x\right)\Gamma t},$ (105) $\displaystyle\psi_{i}(t)$
$\displaystyle=e^{2i{{\rm\,Im}\left(\phi_{\pm}\right)}}e^{-\left(1-iy\right)\Gamma
t}.$ (106)

To account for lifetime resolution and acceptance effects, the $\psi_{\pm}(t)$
and $\psi_{i}(t)$ functions should be replaced by the result of convolving
them by the lifetime resolution function and multiplying the result by the
lifetime acceptance function, as described in [5].

The normalized time-dependent amplitude pdf is given by

$p_{\pm}(t)=\frac{\mathrm{Tr}\left[\Psi_{\pm}(t)M\right]}{\mathrm{Tr}\left[N_{\pm}^{t}N^{M}\right]},$
(107)

where

$N_{\pm}^{t}=\int\mathrm{d}t\,\Psi_{\pm}(t),$ (108)

and

$N^{M}=\int\mathrm{d\mathcal{P}}\,M.$ (109)

####  3.2.5 Time dependent equations

The time dependent method [6] uses $B_{s}$ decays that undergo mixing before
they decay, such as $B_{s}\rightarrow D_{s}^{\mp}K^{\pm}$. The amplitudes of
the $B_{s}$ decay are given by

$\displaystyle A^{B_{s}}_{D_{s}^{\pm}}(t)$
$\displaystyle=A^{B_{s}}_{D_{s}^{\pm}}\left[g_{+}(t)+\hbox
to0.0pt{$\displaystyle\lambda_{\pm}$\hss}\phantom{\lambda_{\pm}^{-1}}g_{-}(t)\right],$
(110) $\displaystyle A^{\bar{B}_{s}}_{D_{s}^{\pm}}(t)$
$\displaystyle=A^{\bar{B}_{s}}_{D_{s}^{\pm}}\left[g_{+}(t)+\lambda_{\pm}^{-1}g_{-}(t)\right],$
(111)

where $t$ represents the $B_{s}$ lifetime. These expressions can also be
written as

$\begin{pmatrix}pA^{B_{s}}_{D_{s}^{\pm}}(t)\\\
qA^{\bar{B}_{s}}_{D_{s}^{\pm}}(t)\end{pmatrix}=e^{-\frac{\Gamma
t}{2}}\frac{pA^{B_{s}}_{D_{s}^{\pm}}}{\gamma_{\lambda}}\begin{pmatrix}\cosh\phi^{B_{s}}_{\pm}(t)\\\
\sinh\phi^{B_{s}}_{\pm}(t)\end{pmatrix}=pA^{B_{s}}_{D_{s}^{\pm}}\begin{pmatrix}u^{B_{s}}_{\pm}(t)\\\
\xi^{B_{s}}_{\pm}(t)\end{pmatrix},$ (112)

where $\Gamma$ represents the $B_{s}$ decay width and

$\displaystyle\phi^{B_{s}}_{\pm}(t)$
$\displaystyle=\phi_{\lambda_{\pm}}+\phi_{\mathrm{mix}}^{B_{s}}(t),$ (113)
$\displaystyle\phi_{\lambda_{\pm}}$
$\displaystyle=\mathrm{atanh}\left(\lambda_{\pm}\right),$ (114)
$\displaystyle\lambda_{\pm}$
$\displaystyle=\frac{q}{p}e^{-i\phi_{s}}z_{\pm}^{\mp 1}.$ (115)

###  3.3 A complete example with charm and strange mixing and $CPV$

This example describes all charm and strange mixing and $CPV$ effects in
decays of the form $B\rightarrow Dh$, where $D\rightarrow Kh^{+}h^{-}$ and
$K\rightarrow\pi^{+}\pi^{-}$. The vast majority of neutral kaons that decay to
$\pi^{+}\pi^{-}$ are $K_{s}$, but because neither $K_{s}$ or $K_{l}$ are pure
$CP$ eigenstates, there may be a small amount of $K_{l}$ that decay to
$\pi^{+}\pi^{-}$ as well, which results in

$\eta=\frac{\left\langle\pi\pi\left|\mathcal{H}\right|K_{l}\right\rangle}{\left\langle\pi\pi\left|\mathcal{H}\right|K_{s}\right\rangle}$
(116)

being non-zero.

In measurements of $CP$ violation in $B$ decays, kaon mixing and $CP$
violation are negligible in practice and, as of 2017, it is impossible to take
these effects into account in $\gamma$ measurements because all the
information available on the $D$ decay amplitude has been obtained assuming no
$CP$ violation in the kaon. This is, therefore, a purely academic exercise.

In this example, $t_{D}$ is the lifetime of the $D$ meson and $t_{K}$ is the
lifetime of the $K$ meson.

$\displaystyle A^{B_{\pm}}_{f}(t_{D},t_{K})$
$\displaystyle=\left\langle\pi\pi\right|\mathcal{H}\begin{pmatrix}\left|\vphantom{\bar{K}^{0}}{K}^{0}(t_{K})\right\rangle&\left|\bar{K}^{0}(t_{K})\right\rangle\end{pmatrix}\begin{pmatrix}\vphantom{\frac{1^{1}}{1^{1}}}\\!\left\langle\vphantom{\bar{K}^{0}}{K}^{0}\right|\\\
\vphantom{\frac{1^{1}}{1^{1}}}\\!\left\langle\bar{K}^{0}\right|\end{pmatrix}\mathcal{H}\begin{pmatrix}\left|\vphantom{\bar{D}^{0}}{D}^{0}(t_{D})\right\rangle&\left|\bar{D}^{0}(t_{D})\right\rangle\end{pmatrix}\begin{pmatrix}\vphantom{\frac{1^{1}}{1^{1}}}\\!\left\langle\vphantom{\bar{D}^{0}}{D}^{0}\right|\\\
\vphantom{\frac{1^{1}}{1^{1}}}\\!\left\langle\bar{D}^{0}\right|\end{pmatrix}\mathcal{H}\left|{B}_{\pm}\right\rangle$
(117) $\displaystyle\begin{aligned}
\;\\!=&\;e^{-\frac{\Gamma_{D}t_{D}}{2}}e^{-\frac{\Gamma_{K}t_{K}}{2}}\\\
&\left\langle\pi\pi\right|\mathcal{H}\begin{pmatrix}\left|\vphantom{\bar{K}^{0}}{K}^{0}\right\rangle&\\!\\!\\!\left|\bar{K}^{0}\right\rangle\end{pmatrix}Q_{K}G_{K}^{\mathrm{mix}}Q_{K}^{-1}\begin{pmatrix}\vphantom{\frac{1^{1}}{1^{1}}}\\!\left\langle\vphantom{\bar{K}^{0}}{K}^{0}\right|\\\
\vphantom{\frac{1^{1}}{1^{1}}}\\!\left\langle\bar{K}^{0}\right|\end{pmatrix}\mathcal{H}\begin{pmatrix}\left|\vphantom{\bar{D}^{0}}{D}^{0}\right\rangle&\\!\\!\\!\left|\bar{D}^{0}\right\rangle\end{pmatrix}Q_{D}G_{D}^{\mathrm{mix}}Q_{D}^{-1}\begin{pmatrix}\vphantom{\frac{1^{1}}{1^{1}}}\\!\left\langle\vphantom{\bar{D}^{0}}{D}^{0}\right|\\\
\vphantom{\frac{1^{1}}{1^{1}}}\\!\left\langle\bar{D}^{0}\right|\end{pmatrix}\mathcal{H}\left|{B}_{\pm}\right\rangle\end{aligned}$
(118)
$\displaystyle=e^{-\frac{\Gamma_{D}t_{D}}{2}}e^{-\frac{\Gamma_{K}t_{K}}{2}}\frac{A^{\pm}_{\tilde{D}}}{\gamma_{\pm}}\left\langle\pi\pi\right|\mathcal{H}\begin{pmatrix}\left|\vphantom{\bar{K}^{0}}{K}^{0}\right\rangle&\\!\\!\\!\left|\bar{K}^{0}\right\rangle\end{pmatrix}Q_{K}G_{K}^{\mathrm{mix}}Q_{K}^{-1}A_{0}Q_{D}G_{\pm}(t_{D})Q_{D}^{-1}\begin{pmatrix}\delta_{\pm-}\\\
\delta_{\pm+}\end{pmatrix}$ (119)
$\displaystyle=e^{-\frac{\Gamma_{D}t_{D}}{2}}e^{-\frac{\Gamma_{K}t_{K}}{2}}\frac{A^{\pm}_{\tilde{D}}A^{K}_{\pi\pi}}{\gamma_{\pm}}\begin{pmatrix}1&\rho\end{pmatrix}Q_{K}G_{K}^{\mathrm{mix}}Q_{K}^{-1}A_{0}Q_{D}G_{\pm}(t_{D})Q_{D}^{-1}\begin{pmatrix}\delta_{\pm-}\\\
\delta_{\pm+}\end{pmatrix}$ (120)
$\displaystyle=e^{-\frac{\Gamma_{D}t_{D}}{2}}e^{-\frac{\Gamma_{K}t_{K}}{2}}\frac{A^{\pm}_{\tilde{D}}A^{K}_{\pi\pi}}{\gamma_{\pm}\gamma_{\lambda}}\begin{pmatrix}1&0\end{pmatrix}Q_{K}G_{\lambda}G_{K}^{\mathrm{mix}}Q_{K}^{-1}A_{0}Q_{D}G_{\pm}(t_{D})Q_{D}^{-1}\begin{pmatrix}\delta_{\pm-}\\\
\delta_{\pm+}\end{pmatrix}$ (121)
$\displaystyle=e^{-\frac{\Gamma_{D}t_{D}}{2}}e^{-\frac{\Gamma_{K}t_{K}}{2}}\frac{A^{\pm}_{\tilde{D}}A^{K}_{\pi\pi}}{\gamma_{\pm}\gamma_{\lambda}}\begin{pmatrix}1&0\end{pmatrix}Q_{K}G_{\lambda}(t_{K})Q_{K}^{-1}A_{0}Q_{D}G_{\pm}(t_{D})Q_{D}^{-1}\begin{pmatrix}\delta_{\pm-}\\\
\delta_{\pm+}\end{pmatrix},$ (122)

where

$\displaystyle A_{0}$
$\displaystyle=\begin{pmatrix}\vphantom{\frac{1^{1}}{1^{1}}}\left\langle\vphantom{\bar{K}^{0}}{K}^{0}\right|\\\
\vphantom{\frac{1^{1}}{1^{1}}}\left\langle\bar{K}^{0}\right|\end{pmatrix}\mathcal{H}\begin{pmatrix}\left|\vphantom{\bar{D}^{0}}{D}^{0}\right\rangle&\left|\bar{D}^{0}\right\rangle\end{pmatrix}=\begin{pmatrix}A^{D}_{{K}}&A^{\bar{D}}_{{K}}\\\
A^{D}_{\bar{K}}&A^{\bar{D}}_{\bar{K}}\end{pmatrix},$ (123) $\displaystyle\rho$
$\displaystyle=\frac{A^{\bar{K}}_{\pi\pi}}{A^{{K}}_{\pi\pi}},$ (124)
$\displaystyle\lambda$
$\displaystyle=\left(\frac{q}{p}\right)_{\\!\\!K}\rho=\frac{1-\eta}{1+\eta},$
(125) $\displaystyle\gamma_{\lambda}$
$\displaystyle=\frac{1}{\sqrt{1-\lambda^{2}}},$ (126)
$\displaystyle\phi_{\lambda}$ $\displaystyle=\mathrm{atanh}{\lambda},$ (127)
$\displaystyle\phi_{\lambda}(t_{K})$
$\displaystyle=\phi_{\lambda}+\phi^{K}_{\mathrm{mix}}(t_{K}),$ (128)
$\displaystyle G_{\lambda}$ $\displaystyle=G\left[\phi_{\lambda}\right],$
(129) $\displaystyle G_{\lambda}(t_{K})$
$\displaystyle=G\left[\phi_{\lambda}(t_{K})\right]=G_{\lambda}\,G_{K}^{\mathrm{mix}}(t_{K}).$
(130)

The squared amplitude becomes

$\left|A^{B_{\pm}}_{f}(t_{D},t_{K})\right|^{2}=\left|\frac{A^{\pm}_{\tilde{D}}A^{K}_{\pi\pi}}{\gamma_{\pm}\gamma_{\lambda}}\right|^{2}\left|\frac{p_{K}}{p_{D}\delta_{\pm-}+q_{D}\delta_{\pm+}}\right|^{2}\mathrm{Tr}\left[\Psi_{\lambda}^{\star}(t_{K})A\Psi_{\pm}(t_{D})A^{\dagger}\right],$
(131)

where

$\displaystyle\Psi_{\lambda}(t_{K})$
$\displaystyle=\begin{pmatrix}\psi_{+}^{K}(t_{K})&\psi_{i}^{K}(t_{K})\\\
\psi_{i}^{K\star}(t_{K})&\psi_{-}^{K}(t_{K})\end{pmatrix},$ (132)
$\displaystyle A$ $\displaystyle=\frac{S}{2}Q_{k}^{-1}A_{0}Q_{D}\frac{S}{2}.$
(133)

In this case, it is convenient to define the hypermatrix

$M_{ijkl}=A^{\star}_{ij}A_{kl},$ (134)

such that

$\mathrm{Tr}\left[\Psi_{\lambda}^{\star}(t_{K})A\Psi_{\pm}(t_{D})A^{\dagger}\right]=\Psi_{\pm}^{ij}(t_{D})\Psi_{\lambda}^{kl}(t_{K})M_{ljki}.$
(135)

With this hypermatrix, the normalized pdf becomes

$p_{\pm}(t_{D},t_{K})=\frac{\Psi_{\pm}^{ij}(t_{D})\Psi_{\lambda}^{kl}(t_{K})M_{ljki}}{N_{\pm}^{ij}N_{\lambda}^{kl}N^{M}_{ljki}},$
(136)

where

$\displaystyle N_{\pm}^{ij}$
$\displaystyle=\int\mathrm{d}t\,\Psi_{\pm}^{ij}(t),$ (137) $\displaystyle
N_{\lambda}^{ij}$ $\displaystyle=\int\mathrm{d}t\,\Psi_{\lambda}^{ij}(t),$
(138) $\displaystyle N^{M}_{ijkl}$
$\displaystyle=\int\mathrm{d\mathcal{P}}\,M_{ijkl}.$ (139)

##  4 Conclusions

The mixing expressions have been written in terms of new hyperbolic parameters
that allow for an interpretation of the time evolution of decay amplitudes as
a complex hyperbolic rotation of a vector of flavor amplitudes of decays
without mixing. The definition of hyperbolic variables, in analogy with
rapidities in special relativity, simplifies the composition of mixing and
$C\\!P$ violating effects in a succession of particle decays.

These hyperbolic expressions have been used to obtain the charm mixing
correction to the $C\\!P$-violating parameters $\phi_{\pm}$ or $z_{\pm}$
involved in several measurements of the CKM angle $\gamma$. To properly
account for mixing and $C\\!P$ violating effects in the background, or
experimental resolution and acceptance effects, a simultaneous fit of charm
mixing and $C\\!P$-violating parameters $\phi_{\pm}$ or $z_{\pm}$ is advised.

## Acknowledgements

I wish to thank the Science and Technology Facilities Council (STFC, UK).

## References

  * [1] M. Gronau and D. London, _How to determine all the angles of the unitarity triangle from $B_{d}^{0}\rightarrow DK_{S}$ and $B_{s}^{0}\rightarrow D\phi$_, Phys. Lett. B 253 (1991) 483
  * [2] M. Gronau and D. Wyler, _On determining a weak phase from CP asymmetries in charged B decays_ , Phys. Lett. B 265 (1991) 172
  * [3] D. Atwood, I. Dunietz, and A. Soni, _Enhanced CP violation with $B\rightarrow KD^{0}(\overline{D}^{0})$ modes and extraction of the CKM angle $\gamma$_, Phys. Rev. Lett. 78 (1997) 3257, arXiv:hep-ph/9612433
  * [4] A. Giri, Y. Grossman, A. Soffer, and J. Zupan, _Determining $\gamma$ using $B^{\pm}\rightarrow DK^{\pm}$ with multibody $D$ decays_, Phys. Rev. D 68 (2003), no. 5 054018
  * [5] T. M. Karbach, G. Raven, and M. Schiller, _Decay time integrals in neutral meson mixing and their efficient evaluation_ , arXiv:1407.0748
  * [6] R. Fleischer, _New strategies to obtain insights into CP violation through $B_{(s)}\rightarrow D_{(s)}^{\pm}K^{\mp}$, $D_{(s)}^{*\pm}K^{\mp}$, … and $B_{(d)}\rightarrow D^{\pm}\pi^{\mp}$, $D^{*\pm}\pi^{\mp}$, … decays_, Nucl. Phys. B671 (2003) 459, arXiv:hep-ph/0304027


#  Lossy Compression for Schrödinger-style Quantum Simulations

Noah Huffman∗‡ Dmitri Pavlichin  and Tsachy Weissman∗
∗Stanford University ‡Corresponding Author Palo Alto, CA, 94306, USA
<EMAIL_ADDRESS>
###### Abstract

Simulating quantum circuits on classical hardware is a powerful and necessary
tool for developing and testing quantum algorithms and hardware as well as
evaluating claims of quantum supremacy in the Noisy Intermediate-Scale Quantum
(NISQ) regime. Schrödinger-style simulations are limited by the exponential
growth of the number of state amplitudes which need to be stored. In this
work, we apply scalar and vector quantization to Schrödinger-style quantum
circuit simulations as lossy compression schemes to reduce the number of bits
needed to simulate quantum circuits. Using quantization, we can maintain
simulation fidelities $>0.99$ when simulating the Quantum Fourier Transform,
while using only 7 significand bits in a floating-point number to characterize
the real and imaginary components of each amplitude. Furthermore, using vector
quantization, we propose a method to bound the number of bits/amplitude needed
to store state vectors in a simulation of a circuit that achieves a desired
fidelity, and show that for a 6 qubit simulation of the Quantum Fourier
Transform, 15 bits/amplitude is sufficient to maintain fidelity $>0.9$ at
$10^{4}$ depth.

##  1 Introduction

Quantum computers are state-of-the-art machines, which are known to solve
problems that are hard for classical computers to solve [1]. While quantum
computers that can solve meaningful problems exist, implementation of quantum
computers is currently limited by practical hardware challenges [2, 3, 4, 5].
Due to these complications, quantum computers of the immediate future will be
notably small and noisy, leading to what many refer to as the Noisy
Intermediate-Scale Quantum (NISQ) regime [6]. During this period, simulations
of quantum computers and systems on classical hardware are of great interest
because they allow us to explore problems that our current quantum computers
are too small and noisy to explore, and because they raise the bar for
verification of Quantum Supremacy claims [7].

Quantum Computation Fundamentals

A qubit can be represented as a 2-dimentional vector with complex
coefficients, $\left\\{\psi_{1},\psi_{2}\right\\}\in\mathbb{C}$, in other
words:

$\begin{pmatrix}\psi_{1}\\\ \psi_{2}\end{pmatrix}=\psi_{1}\begin{pmatrix}1\\\
0\end{pmatrix}+\psi_{2}\begin{pmatrix}0\\\
1\end{pmatrix}=\psi_{1}|0\rangle+\psi_{2}|1\rangle=|\psi\rangle$

(1)

Here, the basis vectors, $|0\rangle$ and 1$\rangle$, serve as the
computational basis. Thus, the vector describing the qubit can be seen as a
superposition of these two basis vectors with complex coefficients and the
additional normalization constraint:

$\left|\psi_{1}\right|^{2}+\left|\psi_{2}\right|^{2}=1$ (2)

More generally, an $n$-qubit system can be described as a superposition of
$N=2^{n}$ basis states, each with its own complex amplitude and subject to a
similar normalization constraint:

$|\psi\rangle=\psi_{1}|000\ldots 00\rangle+\psi_{2}|000\ldots
01\rangle+\cdots+\psi_{N}|111\ldots 111\rangle$ (3)

$\forall\psi_{i}\in\mathbb{C}\quad\&\quad\sum_{i=1}^{N}\left|\psi_{i}\right|^{2}=1$
(4)

To perform computations in the Schrödinger paradigm, these quantum states are
acted upon by $2^{n}\times 2^{n}$ unitary matrices (i.e. gates), which are the
tensor products of smaller gates that affect smaller subsets of the total
qubit arrangement. For example, applying a single-qubit gate, $U$, to the
$k^{\text{th }}$ qubit in a quantum circuit is represented by the $2^{n}\times
2^{n}$ unitary transformation, $A=I^{\otimes n-k-1}\otimes U\otimes I^{\otimes
k}$.

Our lossy compression schemes strive to preserve the quantum fidelity between
the original vector and our lossy reconstruction. Given two density matrices,
$\rho$ and $\sigma$, the fidelity is defined as
$f(\rho,\sigma)=(\operatorname{tr}\sqrt{\sqrt{\rho}\sigma\sqrt{\rho}})^{2}$.
For the specific case where both quantum states are pure (i.e.
$\rho=\left|\psi_{\rho}\right\rangle\left\langle\psi_{\rho}\right|$ and
$\left.\sigma=\left|\psi_{\sigma}\right\rangle\left\langle\psi_{\sigma}\right|\right)$,
the fidelity reduces to
$f(\rho,\sigma)=\left|\left\langle\psi_{\rho}\mid\psi_{\sigma}\right\rangle\right|^{2}$.

Related Work

Several methods exist to simulate quantum circuits on classical hardware. The
most fundamental of these is Schrödinger-style simulation, which maintains the
full $2^{n}$ quantum state vector in memory and updates the state vector
sequentially by applying the unitary transformations defined by gates which
act upon the qubits (see Quantum Computation Fundamentals above). Schrödinger
simulations can further be segregated into array methods and decision diagram
methods [8, 9]. In general, Schrödinger methods scale both exponentially in
time and space with the number of qubits, as both storing and operating on the
full $2^{n}$ quantum state vector is proportional to its size [10, 11].
However, since the state vector only needs to be updated $d$ times, where $d$
is the number of gates in the circuit (i.e. circuit depth), Schrödinger-style
simulation only scales linearly with circuit depth. Currently, state-of-the-
art Schrödinger simulations can calculate circuits with $n\approx 50$ [12, 13,
14].

Alternatively, Feynman-style simulations rely on summation over integral paths
[13, 8]. Effectively, Feynman path simulations work by considering each gate
which connects two or more qubits as a decision point from which the
simulation branches. Feynman simulations compute an amplitude by summing the
contributions of every possible “path” through the decision tree to compute
the final result [13, 8]. These simulations are only polynomial in space [15],
but because the number of paths scales exponentially with the number of
decision points these simulations require $\Theta(2^{dn})$ time [13, 8], which
means that they are impractical for deep circuit simulation.

Finally, tensor network approaches represent quantum circuits’ connectivity in
a tensor network. While these methods are popular, they only work well if the
connectivity of the gates is reduced to a grid, or the simulation handles
states close to linear combinations of product states [14]. Furthermore, the
time and space costs for contracting these tensor networks scales
exponentially with the treewidth of the underlying graphs, and therefore are
impractical to simulate deep quantum circuits [13, 14]. Furthermore, tensor-
network based simulations often only simulate a small number of amplitudes
instead of the entire state vector [8].

Of these methods, Schrödinger-style simulation is the most appealing setting
for compression, as it scales well with circuit depth, but is held back by
memory requirements. Work has been done to explore the use of lossy
compression on classical simulations to improve the space requirements of said
simulations [16, 13]. These initial results found that traditional lossy
compressors such as SZ and ZFP underperform on this task due to the lack of
patterns or “spikiness” in the quantum data. These same results also show that
bit truncation may serve as a promising method for lossy data compression
[13]. Moreover, benefits of low-precision simulation for quantum circuits have
been previously explored for non-native algebraic representations of complex
values [14], but such representations require conversion to double precision
to perform all arithmetic operations (i.e. gate applications). We expand upon
this literature by performing traditional floating-point Schrödinger-style
simulation compressed with scalar and vector quantized amplitude values.

In this work, we consider the computation of all complex amplitudes of the
quantum state resulting from the execution of the circuit as well as
intermediate steps. Furthermore, we are concerned with techniques to simulate
general quantum circuits, so we eschew specialized simulation techniques which
assume reduced gate sets [17, 13].

##  2 Lossy Compression

Scalar Quantization

We begin by noting that matrix multiplication can be conjugated into
multiplication by constituent real and imaginary components

$U\vec{\psi}=(R+iJ)(\vec{a}+i\vec{b})=(R\vec{a}-J\vec{b})+i(J\vec{a}+R\vec{b})$
(5)

We quantize each float in $R$, $J$, $\vec{a}$, and $\vec{b}$ separately, then
perform the multiplications in equation 5 for each gate application in the
circuit (Algorithm 1). For $n$ qubits, $R$ and $J$ each have $2^{2n}$ floating
point values, while $\vec{a}$ and $\vec{b}$ each have $2^{n}$ floating point
values. We compress the real and imaginary components of each complex number
to the following precisions: double precision (float64, 128 bits/complex
number), single precision (float32, 64 bits/complex number), half precision
(float16, 32 bits/complex number), and bfloat16 (Figure 1), a precision
popular in machine learning [18, 19]. Additionally, we explored extreme bit
truncation by rounding the significand of float16 objects to $k$ bits. These
significand-truncated precisions we refer to as floatk where $k$ is the number
of usable bits in the significand (Figure 1).

Algorithm 1 Gate Apply

Gate ($U$), state vector ($\psi$), and desired precision

$R\leftarrow real(U)$

$J\leftarrow imag(U)$

$a\leftarrow real(\psi)$

$b\leftarrow imag(\psi)$

for object in $\left[R,J,a,b\right]$ do

for float in object do

$float\leftarrow cast(float,\text{desired precision})$

end for

end for

return $\psi_{out}=(R\cdot a-J\cdot b)+i(J\cdot a+R\cdot b)$

SignExponent (5 bits)Significand (10 bits)
---
(a) IEEE float16 half-precision format [20]
SignExponent (8 bits)Significand (7 bits)
(b) bfloat16 format
Sign Exponent (5 bits)Significand (8 bits)not used
(c) float8 custom precision

Figure 1: 16 bit precisions utilized. (a) standard float16 format (b) bfloat16
dedicates more bits to the exponent than float16, and can take on the same
range of values as float32, making it a popular tool in machine learning
because conversion to and from float32 is simple [18]. (c) Our custom “floatk”
precision forces the use of only $k$ significand bits in a 16 bit float. The
exponent is 5 bits, just like float16.

Vector Quantization

We next utilize vector quantization to lossly represent quantum data. Because
quantum state vectors, $\ket{\psi}$, consist of $2^{n}$ complex amplitudes,
quantizing these amplitudes in the complex plane is natural and powerful means
of representing the data. We consider the setting where the circuit meant to
be compressed is one which is a frequently-used subroutine of many quantum
algorithms. We employ a two-pass vector quantization solution (Algorithm 2)
where the circuit is first run once without compression, and then those
complex amplitude values are used to create codewords for future runs of the
same circuit. By using this two-pass method, we avoid the need to run k-means
multiple times and have the benefit of having all possible amplitude values
available to create codewords for the entire dataset.

Algorithm 2 Two Pass Vector Quantization

Set of amplitudes, $Q=\\{\psi_{0},\psi_{1},\ldots,\psi_{d}\\}$, from an
uncompressed simulation of the quantum circuit.

Initialize data array $K$

for $\psi$ in $Q$ do

for amplitude, $A$, in $\psi$ do

Append $A$ to $K$

end for

end for

Call k-means on data in K. Return Centroids (codewords), $C$

for t from 0 to d-1 do

Apply gate, $G_{t+1}$, to $\psi_{t}$: $\psi_{t+1}=G_{t+1}\cdot\psi_{t}$ using
Algorithm 1

for amplitude, $A$ in $\psi_{t+1}$ do

Update $A$ to its nearest codeword:
$A\leftarrow\arg\min_{j}\left\|A-C_{j}\right\|^{2}$

end for

end for

##  3 Experimental Results and Discussion

To evaluate the effects of quantization on quantum simulations, we simulated
repeated applications of the Quantum Fourier Transform (QFT). The QFT circuit
is an appealing benchmarking candidate because it is a common sub-routine of
many important, widely-used quantum algorithms such as Shor’s factoring
algorithm, quantum phase estimation, and the hidden subgroup problem [21]. The
QFT only requires Hadamard and controled-rotation gates, and it is a popular
benchmark circuit [13, 12, 14]. In this paper, we simulate the QFT repeated 31
times on $6$ qubits for a total circuit depth of $d=651$. Our initial state
vector, $\ket{\psi_{0}}$, is a superposition of computational basis states. We
assess our lossy simulations by evaluating the fidelity between the simulated
state vector and an ideal state vector computed analytically, then stored in
complex double precision (128 bits/complex number). Lower precision floats are
upcast to complex double precision for the fidelity calculation.

Scalar Quantization

Scalar quantization works well in simulating deep quantum circuits. Figure 2
shows the results of our simulations. Figure 2 (a) displays the high precision
results. For all precisions above float7, fidelities remained well above
$0.99$ for the duration of the circuit. We see little distinction between
double, single, and half precision truncated simulation. Interestingly,
bfloat16 noticeably under-performs not only float16, which has access to the
same number of bits, but also float8, a 16-bit float restricted to only $8$ of
its significand bits. bfloat16’s performance is closer to that of float7;
while they share the same number of significand bits, bfloat16 has access to
more exponent bits (Figure 1). This indicates that significand bits are more
important than exponent bits when simulating quantum data. This is likely due
to the irregular distribution of floating point numbers, which jump by a
factor of $2$ when the exponent increases [14]. Figure 2 (b) displays reducing
the precision of the significand below $8$ bits, all the way down to a single
bit. We can see that precisions float4 and above maintain simulation
fidelities $>0.9$ after hundreds of gate applications; however, below float4
the simulation fidelity rapidly declines.

|
---|---
(a) float64 - float7 | (b) float8 - float1
Figure 2: Scalar quantization simulation results.

Still, these results are promising, as such high fidelities at $4$ bits of
precision in the significand indicates that lossy simulations of quantum
circuits can perform well while using few bits. The relative insignificance of
the exponent bits when simulating quantum circuits suggest that a non-
traditional data format based on, for example, algebraic representation of
complex numbers [9] or their complex logarithm [14] may be a more efficient
use of bits than the floating point format. Furthermore, the success of
extreme significand-constrained floats in this work indicates that such custom
data formats may be able to use less bits than previously thought.

Vector Quantization

We implement vector quantization by accounting for all possible complex
amplitudes in the simulation (Figure 3 (a)), then assigning codewords based on
k-means as outlined in Algorithm 2. The $2^{m}$ codewords themselves are
stored in complex double precision format, but since a one-to-one mapping
exists between the codewords and length $m$ bit strings, only $m$ bits are
needed to represent a codeword. Since arithmetic operations (e.g. gate
application) must be done at some precision, we employ vector quantization in
addition to scalar quantization. We first employ Algorithm 1 to evolve a state
vector at the desired precision, then we round each amplitude to its nearest
codeword in the complex plane. That result is in turn used as the input to the
next state vector evolution. At any given time $t$, the state vector
$\ket{\psi_{t}}$ can be represented using $m2^{n}$ bits where $2^{m}$ is the
number of codewords.

|
---|---
(a) Distribution of complex amplitudes | (b) Histogram of amplitude magnitudes
Figure 3: Distribution of simulation amplitudes. (a) shows every complex
amplitude of every state vector in the simulation for double precision
($2^{n}(d+1)$ amplitudes) and the codewords, $X$s, selected by k-means and
their associated clusters. $m=3$ above for a total of $2^{3}=8$ codewords. (b)
is a histogram of the magnitudes, $R$, of the numbers in (a).

We simulated the QFT for $m\in\left[2,15\right]$. Results for
$m=[3,5,8,10,13,15]$ are shown in Figure 4. Simulation fidelities quickly
decay when few codewords are used, but improve with the number of codewords.
At $2^{13}$ codewords, fidelities for all of the tested precisions are $>0.95$
and at $2^{15}$ codewords, fidelities are all $>0.98$. While the number of
codewords remains low, the underlying precision used for the arithmetic has
less of an impact on the simulation fidelity, as the ultra-low number of
codewords is the largest source of error. This is why all precisions
demonstrate similarly noisy fidelity results at low codeword numbers. However,
when the number of codewords increases, while some noise due to the random
initialization of the k-means centroids is present, we begin to see the higher
precision floats perform better in general, until at $2^{15}$ codewords, the
results are ordered with the precision of the underlying arithmetic
operations.

We next investigate how the fidelity changes with respect to the number of
codewords. Figure 5 shows slices of the circuit simulation taken after
sequential steps through the circuit of 200 gates. Just like in Figure 4, we
can see that regardless of circuit depth, noise dominates at small number of
codewords due to the error introduced by truncating to so few codewords, but
as the number of codewords increases, the results become less noisy. From this
relationship between the number of codewords used for vector quantization and
the simulation fidelity, we can derive an upper-bound estimate of the number
of codewords, $2^{m}$, needed to achieve a desired fidelity at a given depth.
First, we empiricaly fit the following logistic function to the data in Figure
5 for each time step in the circuit simulation:

$\text{fidelity}(m)=\frac{A}{1+e^{-k\left(m-x_{0}\right)}}+\text{off}$ (6)

Figure 6 shows how the parameters of this fit change with the depth of the
circuit being simulated. For three out of the four parameters, their
asymptotic behavior with respect to the circuit depth is constant with some
high-frequency noise. However, $x_{0}$ grows logarithmically with the circuit
depth while sharing the same high-frequency noise as the other three
parameters. We can invert equation (6) to model the number of codewords as a
function of the fidelity, $A$, $k$, and, the offset, off. If we model $A$,
$k$, and off as constants, and $x_{0}$ as logarithmically increasing with
circuit depth, then, for a desired fidelity, $f$, we can model the asymptotic
behavior of the number of codewords needed to simulate $f$ as a function of
circuit depth. Figure 7 shows the results of such a model. We can estimate the
number of codewords needed in our vector quantization scheme to simulate a
circuit of some depth, $d$, to a desired fidelity. $m$ asympotically increases
as $O(\log d)$. Since a state vector can be represented in $m2^{n}$ bits, this
means that to simulate a circuit while maintaining a given fidelity, the size
of the stored state vectors should only scale logarithmically with the depth
of the circuit to be simulated.

|  |
---|---|---
|  |
Figure 4: Computed fidelities for $m=[3,5,8,10,13,15]$. As the number of codewords increases, the simulation fidelity improves, especially at large depths. |  |
---|---|---
Figure 5: Simulation fidelity as a function of the number of codewords used for vector quantization, shown (left to right) after gate 200, 400, and 600. The dashed line is a logistic fit of the mean of the results across precisions. |  |  |
---|---|---|---
(a) A | (b) k | (c) off | (d) $x_{0}$
Figure 6: Parameters of the logistic fit $\text{fidelity}(m)=\frac{A}{1+e^{-k\left(m-x_{0}\right)}}+\text{off}$. $m=\log_{2}\text{\\#codewords}$ |
---|---
(b) $f=0.9$ | (c) $f=0.99$
Figure 7: Estimated number of codewords needed to achieve a given fidelity as
a function of circuit depth, plotted for $d\in[10^{2},10^{4}]$. Using a vector
quantization scheme no more than $2^{15}$ codewords should be needed to
achieve simulation fidelities $\approx 0.9$ at $10^{4}$ depth, and no more
than $2^{18}$ codewords should be needed to achieve simulation fidelities
$\approx 0.99$.

##  4 Conclusion

In this work we study the lossy Schrödinger-style simulation of quantum
circuits by applying both scalar and vector compression to reduce the storage
overhead required for these kinds of simulations. We succeed in simulating
$d=651$ depth Quantum Fourier Transform circuits on $n=6$ qubits to fidelities
$>0.99$ by scalar quantizing the real and imaginary components of the complex
amplitudes of state vectors. Further, we maintain simulation fidelities $>0.9$
while truncating the significand of a float to only 4 bits. We also show that
vector quantization can maintain fidelities $>0.98$ with $2^{15}$ codewords.
We also utilize the way that the simulation fidelities improve with additional
codewords to predict the behavior of the number of codewords necessary to
achieve a desired simulation fidelity for a circuit of given depth.

Our work leaves open several opportunities for future investigation. First,
the results of our scalar quantized simulations indicate that exponent bits in
floating point numbers may be less relevant to simulating quantum data, and
the development of a quantum domain-specific data format and hardware build to
handle such a format natively to could prove invaluable to quantum
simulations, especially in the NISQ era, where we can not rely on large,
fault-tolerent quantum devices. Second, in this work, we implement a two-pass
vector quantizer, which first runs the circuit without compression, then uses
that distribution of amplitudes to assign codewords. This is useful for
circuits which are run frequently, but for infrequent circuits, a one-pass
solution may be called for wherein codewords are assigned after every gate
application while the circuit is running. This has $O(d)$ more calls to the
k-means codeword finding subroutine, but avoids the need to run the circuit
once without vector quantization. Third, our lossy quantization methods can be
applied to other quantum simulation methods such as Feynman path integral
simulation or tensor networks. Finally, more work can be done to compress the
quantized state vectors post-simulation via lossless compression such as gzip,
or state-of-the-art lossy compressor like SZ [13].

##  5 Acknowledgements

The authors would like to thank Shubham Chandak, Katharine Hyatt, Qingxi Meng,
Dorsa Fathollahi, and Pulkit Tandon for helpful conversations.

Some of the computing for this project was performed on the Sherlock cluster.
We would like to thank Stanford University and the Stanford Research Computing
Center for providing computational resources and support that contributed to
these research results.

This research was supported by the National Science Foundation under Grant No.
2106508. Any opinions, findings, and conclusions or recommendations expressed
in this material are those of the authors and do not necessarily reflect the
views of the National Science Foundation.

##  6 References

## References

  * [1] Peter W Shor,  Algorithms for quantum computation: discrete logarithms and factoring,  IEEE Comput. Soc. Press, 1999.
  * [2] John Preskill,  “Quantum computing and the entanglement frontier,”  arXiv pre-print server, 2012.
  * [3] Aram W Harrow and Ashley Montanaro,  “Quantum computational supremacy,”  Nature, vol. 549, no. 7671, pp. 203–209, 2017.
  * [4] Sergio Boixo and et al.,  “Characterizing quantum supremacy in near-term devices,”  Nature Physics, vol. 14, no. 6, pp. 595–600, 2018.
  * [5] Frank Arute and et al.,  “Quantum supremacy using a programmable superconducting processor,”  Nature, vol. 574, no. 7779, pp. 505–510, 2019.
  * [6] John Preskill,  “Quantum computing in the nisq era and beyond,”  Quantum, vol. 2, pp. 79, 2018.
  * [7] Thomas Jones and et al.,  “Quest and high performance simulation of quantum computers,”  Scientific Reports, vol. 9, no. 1, 2019.
  * [8] Lukas Burgholzer and et al.,  “Hybrid schrödinger-feynman simulation of quantum circuits with decision diagrams,”  in 2021 IEEE International Conference on Quantum Computing and Engineering (QCE), 2021, pp. 199–206.
  * [9] Yi-Hsiang Tsai and et al.,  “Bit-slicing the hilbert space: Scaling up accurate quantum circuit simulation,”  IEEE, 2016.
  * [10] Gabriel F Viamontes and et al.,  “Gate-level simulation of quantum circuits,”  IEEE, 2008.
  * [11] Michael Frank, Uwe Meyer-Baese, and Irinel Chiorescu,  “A space-efficient quantum computer simulator suitable for high-speed fpga implementation,”  in SPIE Defense, Security, and Sensing, Orlando, Florida, United States, 2009, SPIE.
  * [12] Alwin Zulehner and Robert Wille,  “Advanced simulation of quantum computations,”  IEEE Transactions on Computer-Aided Design of Integrated Circuits and Systems, vol. 38, no. 5, pp. 848–859, 2019.
  * [13] Xin-Chuan Wu, Sheng Di, Emma Maitreyee Dasgupta, Franck Cappello, Hal Finkel, Yuri Alexeev, and Frederic T. Chong,  “Full-state quantum circuit simulation by using data compression,”  in Proceedings of the International Conference for High Performance Computing, Networking, Storage and Analysis, New York, NY, USA, 2019, SC ’19, Association for Computing Machinery.
  * [14] Santiago I. Betelu,  “The limits of quantum circuit simulation with low precision arithmetic,”  arXiv pre-print server, 2020.
  * [15] Scott Aaronson and Lijie Chen,  “Complexity-theoretic foundations of quantum supremacy experiments,”  in Proceedings of the 32nd Computational Complexity Conference, Riga, Latvia, 2017, Schloss Dagstuhl–Leibniz-Zentrum fuer Informatik.
  * [16] Xiang-Chao Wu and et al.,  “Amplitude-aware lossy compression for quantum circuit simulation,”  arXiv pre-print server, 2018.
  * [17] Daniel Gottesman,  “The heisenberg representation of quantum computers,”  1998\.
  * [18] Dhiraj Kalamkar, Dheevatsa Mudigere, Naveen Mellempudi, Dipankar Das, Kunal Banerjee, Sasikanth Avancha, Dharma Teja Vooturi, Nataraj Jammalamadaka, Jianyu Huang, Hector Yuen, Jiyan Yang, Jongsoo Park, Alexander Heinecke, Evangelos Georganas, Sudarshan Srinivasan, Abhisek Kundu, Misha Smelyanskiy, Bharat Kaul, and Pradeep Dubey,  “A Study of BFLOAT16 for Deep Learning Training,”  arXiv e-prints, p. arXiv:1905.12322, May 2019.
  * [19] Shibo Wang and Pankaj Kanwar,  “Bfloat16: The secret to high performance on cloud tpus,” August 2019.
  * [20] “Ieee standard for floating-point arithmetic,”  IEEE Std 754-2019 (Revision of IEEE 754-2008), pp. 1–84, 2019.
  * [21] Stephen Jordan,  “Quantum algorithm zoo,” 2011, updated June 26, 2022.