\usetikzlibrary{shapes.geometric}
\usetikzlibrary{positioning}

\chapter{Postulates of Quantum Mechanics} \label{Chapter 3}

In the previous chapter, we exposed two major deviations from classical behavior. The SG experiment implies the existence of quantized spin angular momentum, and consecutive measurements imply that spin components in independent directions have incompatible sample spaces. The goal of quantum theory is to predict and explain this new type of behavior.

To show how this is done, we first consider the mathematical objects used to model physical systems and variables. For the Stern-Gerlach experiment, the system to model is the electron, and the physical variables of interest are its spin angular momentum along different axes. By comparing the objects used in classical and quantum mechanics, we will make sense of the first three postulates of quantum mechanics. Then, we introduce the remaining postulates to describe the standard approach to quantum measurement (in preparation of proposing revisions). Our presentation of these postulates is based on the ordering and language used in texts by Cohen-Tannoudji et al. \cite{cohen} and McIntyre\cite{mcintyre}.

\section{Physical Variables and State Spaces}
\subsection{Classical States} \label{classical states}
Consider the spin angular momentum of an electron. Treating the electron as a classical system, its spin state is modeled by a vector $\vec{S} \in \mathbb{R}^3$,
\begin{align}
\vec{S} = (S_x, S_y, S_z).
\end{align}

Each component $S_i$ is a physical variable representing the magnitude of the spin in the $\hat{i}$ direction.

$\vec{S}$ specifies the spin in any direction using the inner product of the state space $\mathbb{R}^3$,
\begin{align}
S_n(\vec{S}) = \vec{S} \cdot \hat{n}.
\end{align}

We see that in classical mechanics, physical variables are modeled using functions. Each function $S_n$ maps a spin state $\vec{S}$ to a real scalar representing the component of spin in the $\hat{n}$ direction.

What makes classical mechanics familiar to everyday experience boils down to intuitive but important properties of the state space $\mathbb{R}^3$:  $S_n$ can be any real value, and for any direction $\hat{n}$, $\vec{S}$ determines the spin along that axis $S_n$. Because $\vec{S}$ determines spin in any direction, the sample spaces for spin in any two directions $\hat{n}$ and $\hat{m}$ are compatible. Spin states in $\mathbb{R}^3$ are interpreted physically as the electron possessing definite values for every $S_n$ at an instant in time.

In addition to spin states determining all $S_n$, the state space allows $S_n$ to take on any real value. There are no fundamental restrictions on which real numbers $S_n$ could be; its sample space is continuous and infinitely large.

\subsection{Quantum States}
In the previous chapter, we exposed deviation from classical behavior when measuring components of electron spin. Only two results are observed; $\frac{\hbar}{2}$ (spin-up), and $-\frac{\hbar}{2}$ (spin-down). $S_n$ is a quantized physical variable; its sample space is discrete and finite.

Furthermore, consecutive measurements show that the spin state does not determine spin in some general direction $S_n$. All we may know about the system upon measurement is the spin magnitude in one direction. The inability to simultaneously determine spin in two independent directions $\hat{n}$ and $\hat{m}$ is reflected through $S_n$ and $S_m$ having incompatible sample spaces.

In response to this new behavior, we must change the mathematical objects used to represent system states and physical variables. Specifically, the sample space of $S_n$ must restrict observable values to spin up and spin down, and $S_n$ and $S_m$ must have incompatible sample spaces. In combination, the first three postulates of quantum mechanics take care of these differences between classical and quantum systems.

Quantum mechanics postulates that a system's state is completely described by a normalized vector in a linear state space.
\invisiblesubsubsection{Postulate 1 (Hilbert Space)}
\begin{Thm:Postulate}{1}
    The state of a physical system is defined by specifying an abstract vector $\ket{\psi}$ in a Hilbert state space $\mathcal{H}$.
\end{Thm:Postulate}

For electron spin systems, the two-dimensional Hilbert space consists of all linear combinations of spin-up and spin-down,
\begin{align}
  \ket{\psi} &\in \mathcal{H} \\ \nonumber
  \ket{\psi} &= \alpha\ket{+_{S_z}} + \beta\ket{-_{S_z}}
\end{align}
where $\alpha, \beta \in \mathbb{C}$.

$\mathcal{H}$ is an abstract state space; components of $\ket{\psi}$ cannot be interpreted as physical variables as they are for the classical spin state $\vec{S}$. So, we introduce physical meaning with more postulates.
\invisiblesubsubsection{Postulate 2 (Physical Variables as Operators)}
The second postulate of quantum mechanics states that physical variables are described by linear operators.
\begin{Thm:Postulate}{2}
    Every physical variable $\mathcal{A}$ is described by an operator $A$ acting in $\mathcal{H}$.
\end{Thm:Postulate}
\invisiblesubsubsection{Postulate 3 (Observable Values)}
Explaining the second postulate is easiest in tandem with the third postulate.
\begin{Thm:Postulate}{3}
    The only possible result of the measurement of a physical variable $\mathcal{A}$ is one of the eigenvalues $a_n$ of the corresponding operator $A$.
\end{Thm:Postulate}

The operator representing $S_z$ correlates elements of a finite sample space (eigenvalues) with particular system states (eigenstates). Consequently, a state can only be interpreted as having a definite $S_z$ magnitude if it is an eigenstate of the $S_z$ operator. Written in the basis of its own eigenstates,
\begin{align}
    S_z = \frac{\hbar}{2}\begin{bmatrix} 1 & 0 \\ 0 & -1 \end{bmatrix}.
\end{align}
This operator correlates $\hat{z}$ spin-up $\left(S_z \ket{\psi} = \frac{\hbar}{2}\ket{\psi}\right)$ with eigenstate
\begin{align} \label{eq:z up state}
    \ket{\psi} = \ket{+_{S_z}} = \begin{bmatrix} 1 \\ 0 \end{bmatrix},
\end{align}
and $\hat{z}$ spin-down $\left(S_z \ket{\psi} = \frac{-\hbar}{2}\ket{\psi}\right)$ with eigenstate
\begin{align}
    \ket{\psi} = \ket{-_{S_z}} = \begin{bmatrix} 0 \\ 1 \end{bmatrix}.
\end{align}
Here, the subscript $S_z$ reminds us of the physical variable for which $\ket{\pm_{S_z}}$ is an eigenstate.

Similarly, we write the operator representing $S_x$ in the $S_z$ basis,
\begin{align}
    S_x = \frac{\hbar}{2}\begin{bmatrix} 0 & 1 \\ 1 & 0 \end{bmatrix}.
\end{align}
This operator correlates $\hat{x}$ spin-up $\left(S_x \ket{\psi} = \frac{\hbar}{2} \ket{\psi}\right)$ with eigenstate
\begin{align} \label{eq:x up state}
    \ket{\psi} = \ket{+_{S_x}} = \frac{1}{\sqrt{2}}\begin{bmatrix} 1 \\ 1 \end{bmatrix},
\end{align}
and $\hat{x}$ spin-down $\left(S_x \ket{\psi} = \frac{-\hbar}{2} \ket{\psi}\right)$ with eigenstate
\begin{align} \label{eq:x down state}
    \ket{\psi} = \ket{-_{S_x}} = \frac{1}{\sqrt{2}}\begin{bmatrix} 1 \\ -1 \end{bmatrix}.
\end{align}

Operators for $S_z$ and $S_x$ share no common eigenstates, hence they do not commute,
\begin{align}
  [S_z, S_x] = S_zS_x - S_xS_z \neq 0,
\end{align}
and no state can posses definite values for both variables. In general, operators for any two spin components $S_i$ and $S_j$ do not share common eigenstates with each other; in other words, $S_i$ and $S_j$ have incompatible sample spaces. $S_i$ and $S_j$ are called \textit{complementary} variables.

By representing physical variables with operators rather than functions, sample spaces may become quantized and may be incompatible with each other. These features are necessary for predicting the results of electron spin measurements.

\subsection{Linearity}
Like the classical state space, the Hilbert space is linear. However, linear combinations are not interpreted in the same intuitive way. Consider summing two classical spin states with components of equal and opposite magnitude $\vec{S_1} = (a, 0, 0)$ and $\vec{S_2} = (-a, 0, 0)$,
\begin{align}
  \vec{S} = \vec{S_1} + \vec{S_2} = (0, 0, 0).
\end{align}
$\vec{S}$ is interpreted as the electron having no spin in any direction.

Now consider summing two quantum spin states representing spin in equal but opposite directions $\ket{\psi_1} = \ket{+_{S_z}}$ and $\ket{-_{S_z}}$,
\begin{align}
  \ket{\psi} = \ket{\psi_1} + \ket{\psi_2} = \ket{+_{S_z}} + \ket{-_{S_z}},
\end{align}
which we renormalize to
\begin{align}
  \ket{\psi} = \frac{1}{\sqrt{2}} \left(\ket{+_{S_z}} + \ket{-_{S_z}} \right).
\end{align}

Though states of equal and opposite spin magnitudes have been summed, $\ket{\psi}$ is not interpreted as having zero spin. Instead, the spin-up and spin-down components are in some sense simultaneously present. Strictly speaking, $\ket{\psi}$ has no definite value for $S_z$, recalling that only eigenstates of the $S_z$ operator may be interpreted as having definite $S_z$ values. In linear combinations such as this, we say there is \textit{coherence} between spin-up and spin-down components. Coherent superpositions have no classical analog.

\section{Copenhagen Description of Measurement}
The fourth and fifth postulates constitute the Copenhagen description of measurement. Primarily formulated by Niels Bohr and Werner Heisenberg, this description is characterized by postulating a fundamental separation between quantum and classical systems \cite{Schlosshauer}. In this thesis, we use the terms ``standard'' and ``Copenhagen'' interchangeably, as this interpretation is the most widely accepted and most commonly taught in textbooks and introductory quantum courses \cite{siddiqui}.

The probability postulate (also known as the Born Rule) assigns a probability distribution to the sample space of a physical variable.
\invisiblesubsection{Postulate 4 (Probability Postulate)}
\begin{Thm:Postulate}{4}
    When measuring physical variable $A$, the probability $\mathcal{P}(n)$ of obtaining result $a_n$ corresponding to $\ket{a_n}$  is equal to
     \begin{align}
        \mathcal{P}(n) = |\braket{a_n|\psi}|^2.
    \end{align}
\end{Thm:Postulate}

\invisiblesubsection{Postulate 5 (Projection Postulate)}

The fifth postulate (known as the projection postulate) describes a system's evolution upon measurement. Contingent upon the system's interaction with a ``classical apparatus'', measurement instantaneously changes the state of the system to some eigenstate of the variable being measured, with a probability of occurrence given by the Born Rule.

\begin{Thm:Postulate}{5} \label{projection postulate}
    If the measurement of the physical variable $\mathcal{A}$ on the system in the state $\ket{\psi}$ gives the result $a_n$, the state of the system immediately after the measurement is the normalized projection
    \begin{align}
        \ket{\psi^\prime} = \frac{P^A_n\ket{\psi}}{\sqrt{\bra{\psi}P^A_n\ket{\psi}
        }}
    \end{align}
    onto the subspace associated with $a_n$.
\end{Thm:Postulate}
Here, $P^A_n = \ket{a_n}\bra{a_n}$ is the projection operator for the $\ket{a_n}$ state. The superscript $A$ labels the observable, while the subscript $n$ labels a particular eigenvalue of that observable. By this postulate, the initial state $\ket{\psi}$ instantaneously evolves to $\ket{a_n}$ upon measurement. This process is known as \textit{state collapse} or \textit{wavefunction collapse}.

\subsection{Experiment 1}\label{Standard Experiment 1}
Consider a measurement result for the $\hat{z}$ component of spin. By the third postulate, the result is either spin-up or spin-down. The projection postulate gives the possible final states
\begin{align}
  \ket{\psi'} &= \ket{\pm_{S_z}},
\end{align}
which is visualized in \autoref{Figure:Measurement:Copenhagen Experiment 1}. The Born Rule then assigns probabilities to each outcome
\begin{align}
  \mathcal{P}(\pm_{S_z}) = |\braket{\pm_{S_z} | \psi}|^2 .
\end{align}

\begin{figure}
\centering\CaptionFontSize
\begin{tikzpicture}[shorten >=1pt,auto, thick,
     square node/.style={rectangle, minimum height=2cm, minimum width=1.50cm, text width = 1.25cm, draw, font=\sffamily\Large\bfseries},
     port/.style={rectangle, draw,  minimum height=1cm, minimum width=0.75cm, font=\sffamily\Large\bfseries},
     wf/.style={rectangle, minimum height=1cm}]
    \apparatus{1}{2}{0}{$\hat{z}$};

    \node(w0) at (0,0) {$\ket{\psi_s}$};
    \node[wf] (w1) at (4, 0.5) {$\ket{+_{S_z}}$};
    \node[wf] (w2) at (4, -0.5) {$\ket{-_{S_z}}$};

    % \node(label1) at (0, -1.75) {$\bm{t_0}$};
    % \node(label2) at (6.25, -1.75) {$\bm{t_1}$};

    \draw[line width=0.5mm] (w0) -- (1);
    \draw[line width=0.5mm] (1+) -- (w1);
    \draw[line width=0.5mm] (1-) -- (w2);
\end{tikzpicture}

\caption[Standard approach to Stern-Gerlach Experiment 1]
{Stern-Gerlach Experiment 1 as described by the standard measurement scheme. When a general initial spin state is measured, it instantaneously evolves to an eigenstate of $S_z$ (either spin-up or spin-down). }
\label{Figure:Measurement:Copenhagen Experiment 1}
\end{figure}

\subsection{Experiment 2} \label{standard consecutive measurements}
Now we consecutively measure spin as shown in \autoref{Figure:Measurement:Copenhagen Experiment 2}. Electrons measured spin-down by the first apparatus are discarded, while electrons measured spin-up are routed to another apparatus. The first apparatus effectively prepares an initial state of $\ket{+_{S_z}}$ for the second apparatus. Using the projection postulate, the state after the first measurement is
\begin{align}
    \ket{\psi^\prime} &= \frac{{P^{S_z}_+}\ket{\psi}}{\sqrt{\bra{\psi}P^{S_z}_+\ket{\psi}}} = \ket{+_{S_z}}.
\end{align}
Similarly, the possible output states from the second apparatus are
\begin{align}
  \ket{\psi^{\prime\prime}} &= \frac{P^{S_x}_+\ket{+_{S_z}}}{\sqrt{\bra{+_z}P^{S_x}_+\ket{+_{S_z}}}} = \ket{+_{S_x}}
\end{align}
or
\begin{align}
  \ket{\psi^{\prime\prime}} &= \frac{P^{S_x}_-\ket{+_{S_z}}}{\sqrt{\bra{+_z}P^{S_x}_-\ket{+_{S_z}}}} = \ket{-_{S_x}}.
\end{align}

Because we ignore spin-down particles from the first measurement, we are certain that particles entering the second apparatus are in the spin-up state $\left(\mathcal{P}(+_{S_z}) = 1 \right)$. The probabilities assigned to each state leaving the $S_x$ Stern-Gerlach device are
\begin{align} \label{eq:standard conditional probabilites}
    \mathcal{P}(+_{S_z} \cap \pm_{S_x}) &= \mathcal{P}(+_{S_z})\mathcal{P}(\pm_{S_x})  \\ \nonumber
    &= (1)\left(|\braket{\pm_{S_x}|+_{S_z}}|^2\right).
\end{align}
Using \autoref{eq:z up state}, \autoref{eq:x up state}, and \autoref{eq:x down state} to evaluate the inner product,
\begin{align}
  \mathcal{P}(+_{S_z} \cap \pm_{S_x}) &= (1)\left(\left|
\frac{1}{\sqrt{2}}\begin{bmatrix} 1 & \pm 1 \end{bmatrix} \begin{bmatrix} 1 \\ 0 \end{bmatrix} \right|^2 \right) \\ \nonumber
  &= \frac{1}{2}.
\end{align}

\begin{figure}
\centering\CaptionFontSize
\begin{tikzpicture}[shorten >=1pt,auto, thick,
     square node/.style={rectangle, minimum height=2cm, minimum width=1.50cm, text width = 1.25cm, draw, font=\sffamily\Large\bfseries},
     port/.style={rectangle, draw,  minimum height=1cm, minimum width=0.75cm, font=\sffamily\Large\bfseries},
     wf/.style={rectangle, minimum height=1cm}]
    \apparatus{1}{3}{0}{$\hat{z}$};
    \apparatus{2}{6}{1.5}{$\hat{x}$};

    \node[wf] (w0) at (0,0) {$\ket{\psi_s}$};
    \node[wf] (w1) at (8, 2.0) {$\ket{+_{S_x}}$};
    \node[wf] (w2) at (8, 1.0) {$\ket{-_{S_x}}$};

    \draw[line width=0.5mm] (w0) -- (1);

    \draw[line width=0.5mm] (1+) -- (2) node [near end] {$\ket{+_{S_z}}$};

    \draw[line width=0.5mm] (2+) -- (w1);
    \draw[line width=0.5mm] (2-) -- (w2);
\end{tikzpicture}
\caption[Standard approach to Stern-Gerlach Experiment 2]
{Stern-Gerlach Experiment 2 as described by the standard measurement scheme. Notice that each measurement outcome is re-normalized, so information about the state prior to measurement is lost.}
\label{Figure:Measurement:Copenhagen Experiment 2}
\end{figure}

\section{Dynamics}
In a mechanical theory, the equations of motion (or \textit{dynamics}) describe how a state evolves with time. In classical Newtonian mechanics, this is given by Newton's law of motion
\begin{align}
  \vec{F} = m\vec{a}.
\end{align}

These dynamics are deterministic, meaning that they can be represented by a one-to-one map from initial to final states.

In quantum mechanics, the projection postulate describes one type of dynamics, which apply only during measurement. When applied, information about the initial state is lost as the state instantaneously becomes an eigenstate of the measured variable. The map from initial to final states is not one-to-one; ``collapse dynamics'' are non-deterministic.

Quantum theory postulates another type of dynamics that are analogous to Newton's law of motion. These dynamics are deterministic, and apply at all times between measurements.
\invisiblesubsubsection{Postulate 6 (Unitary Dynamics)}
\begin{Thm:Postulate}{6}
  The time evolution of a quantum system $\ket{\psi}$ is determined by the Hamiltonian operator $H(t)$ through the Schrödinger equation
  \begin{align}
    i\hbar \frac{d}{dt} \ket{\psi(t)} = H(t)\ket{\psi(t)},
  \end{align}
\end{Thm:Postulate}
Time evolution operators $U$ satisfying the Schrödinger equation are \textit{unitary}, meaning that $UU^\dagger = I$ \cite{Griffiths}. The ability to reverse time evolution with $U^\dagger$ implies that $U$ is a one-to-one map, reflecting deterministic dynamics.

\chapter{Measurement} \label{Chapter 4}

The projection postulate introduces foundational assumptions to describe the measurement process. The principle of Occam's razor says that, in general, a theory is strengthened by making as few assumptions as possible. This motivates the pursuit to describe quantum measurement without using the projection postulate, and as a unitary process instead.

In this chapter, we further motivate elimination of the projection postulate by summarizing some issues and limitations surrounding state collapse. Then, we propose a unitary measurement model for the SG experiment that implements the scheme proposed by John von Neumann in 1932 \cite{Neumann}. This scheme brings its own interpretational issues, which we use to motivate the introduction of the environment into our measurement model. To conclude, we apply our model to SG Experiment 2.

\section{Issues with State Collapse}
The projection postulate relies on ambiguous definitions. State collapse occurs upon ``interaction with a classical measuring apparatus'', yet no objective criterion identifying such a system is provided. Classical systems are not described by the theory, yet they play a fundamental role in the measurement process \cite{landau}. This ambiguity makes quantum mechanics exploitable to anthropocentric reasoning and vulnerable to misrepresentation. Suggestions that atomic properties may be understood only through their interactions with human or ``man-like'' brains are widespread in both popular \cite{Capra} and scientific \cite{stapp} literature. It has been argued that many of the pseudo-scientific metaphysics that mislead public understanding of quantum physics arise from these ideas \cite{stenger}.

The trouble with the ``classical measuring apparatus'' continues when thinking about the early universe. Nothing resembling such an apparatus could exist shortly after the big bang, so the standard approach to quantum mechanics is incapable of making any predictions during this time \cite{Craig}. Standard quantum mechanics is also incapable of answering any questions about closed systems (such as the universe itself); without a ``classical observer'' outside of the system making measurements, no predictions are made \cite{Craig}.

Furthermore, the emergence of time asymmetric processes cannot be properly studied within the standard approach, as the state collapse mechanism is not reversible \cite{mann}. After measurement, information about the initial state is lost; this injects time asymmetry into the foundations of quantum mechanics, making arrows of time postulated rather than emergent.

The issues with interpretation of state collapse and the limitations of non-unitary dynamics in general are indicators that the projection postulate is formulated with ignorance of some underlying process. Describing measurement as a unitary process instead is desirable for multiple reasons. We could assume less about the nature of measurement; humans and classical measurement apparatuses would no longer play a special role indescribable by the theory. Quantum mechanics could then make predictions about the early universe and situations without measuring apparatuses. With dynamics symmetric in time, the emergence of the arrow of time could be properly studied.

To begin describing this process, we discard the projection postulate and describe measurement using dynamics permitted by the Schrödinger equation.
%
% This attitude towards quantum measurement prompted Einstein to ask a colleague if they believed that the moon existed only when they looked at it \cite{Pais}. In this thesis, we assert that the moon does exist, even when not directly observed by a human. Instead, we allow a multitude of non-living systems to continuously ``measure'' the moon. This is done using the \textit{von Neumann measurement scheme}, which describes measurement as a physical process involving two quatum systems, neither of which need be human or a ``classical measuring apparatus''.

\section{von Neumann Measurement Scheme} \label{vnms}
In the discussion of Stern-Gerlach experiments, the position of the electron played an implicit role in measurement. So far, we have deduced measurement results using the localization of the electrons in the spin-up or spin-down regions of a detection screen. The primary measurement is that of position, which is used to imply the spin state. However, position has been formally ignored so far.

Our goal is to formalize the correlation of position and spin eigenstates observed in Stern-Gerlach experiments. We start by representing the electron with a composite spin-position system,
\begin{align}
  \mathcal{H} = \mathcal{H}_s \otimes \mathcal{H}_\mathcal{X}.
\end{align}

Revisiting Experiment 1, the result of the measurement is determined by the final location of the electron; spin-up and spin-down particles are deflected in opposing directions to different ``outputs'' of the apparatus. We name position states of interest; $\ket{\varnothing_\mathcal{X}}$ represents the localization at the beginning of the magnetic field (which we call the ``ready'' position), while $\ket{+_{\mathcal{X}}}$ and $\ket{-_{\mathcal{X}}}$ represent localization at the spin-up and spin-down output regions, respectively. Numerous papers detail these position states in terms of Gaussian wave packets \cite{Venugopalan}, but for simplicity we leave them abstracted. It is the purpose of the Stern-Gerlach experiment to separate spin-up and spin-down particles into spatially distinct regions, so we assert that the named position states are mutually orthonormal,
\begin{align}
  \braket{i_\mathcal{X}| j_\mathcal{X}} &= \delta_{i,j}.
\end{align}

We now introduce a unitary operator that correlates the position states with $S_z$ eigenstates,
\begin{align} \label{eq: Experiment 1 unitary operator}
  U(t_1, t_0) &= P^{S_z}_+ \otimes \left(\: \ket{+_{\mathcal{X}}}\bra{\varnothing_\mathcal{X}} \: \bm{+} \: \ket{\varnothing_\mathcal{X}}\bra{+_\mathcal{X}} \: \bm{+} \: I_\mathcal{X} \: \bm{-} \: P^\mathcal{X}_+  \: \bm{-} \: P^\mathcal{X}_\varnothing \: \right) \\ \nonumber
  &\phantom{{}={}} + P^{S_z}_- \otimes \left( \: \ket{-_{\mathcal{X}}}\bra{\varnothing_\mathcal{X}} \: \bm{+} \: \ket{\varnothing_\mathcal{X}}\bra{-_\mathcal{X}} \: \bm{+} \: I_\mathcal{X} \: \bm{-} \: P^\mathcal{X}_-  \: \bm{-} \: P^\mathcal{X}_\varnothing \: \right).
\end{align}
The $P^{S_z}_\pm$ component selects the $\pm$ component of the spin state, while the corresponding $\mathcal{H}_\mathcal{X}$ operator takes the ``ready`` position state to the $\pm$ position state (accomplished by the $\ket{\pm_\mathcal{X}}\bra{\varnothing_\mathcal{X}}$ term). The $\ket{\varnothing_\mathcal{X}}\bra{\pm_\mathcal{X}}$ term is not of physical interest because measurements do not begin with the electron in the $\pm$ position state. However, it is included to make the operator unitary. The $I_\mathcal{X} - P^\mathcal{X}_\pm - P^\mathcal{X}_\varnothing$ terms leave position states distinct from $\ket{\pm_\mathcal{X}}$ and $\ket{\varnothing_\mathcal{X}}$ unaffected.

Notice that the $\mathcal{H}_\mathcal{X}$ operators are nearly the identity operator, with the exception of swapping ``ready'' and $\pm$ position states. To shorten future calculations, we define the \textit{swaperator}
\begin{align}
  \mathcal{S}^A_{\varnothing, \pm} &= \ket{\pm_A}\bra{\varnothing_A} + \ket{\varnothing_A}\bra{\pm_A} + I_A - P^A_\pm - P^A_\varnothing,
\end{align}
where the superscript $A$ labels the observable, and the subscript $\varnothing, \pm$ labels the states being swapped. The unitary operator is now written as
\begin{align}
  U(t_1, t_0) &= \left(P^{S_z}_+ \otimes \mathcal{S}^{\mathcal{X}}_{\varnothing, +}\right) + \left(P^{S_z}_- \otimes \mathcal{S}^{\mathcal{X}}_{\varnothing, -}\right).
\end{align}
Note that, like the identity operator, $\mathcal{S}$ is Hermitian
\begin{align}
  \mathcal{S}^\dagger &= \left(\ket{\pm_A}\bra{\varnothing_A} + \ket{\varnothing_A}\bra{\pm_A} + I_A - P^A_\pm - P^A_\varnothing \right)^\dagger \\ \nonumber
  &= \ket{\pm_A}\bra{\varnothing_A}^\dagger + \ket{\varnothing_A}\bra{\pm_A}^\dagger + I_A^\dagger - {P^A_\pm}^\dagger - {P^A_\varnothing}^\dagger \\ \nonumber
  &= \ket{\varnothing_A}\bra{\pm_A} + \ket{\pm_A}\bra{\varnothing_A} + I_A - P^A_\pm - P^A_\varnothing \\ \nonumber
  &=\mathcal{S}
\end{align}
and unitary
\begin{align}
  \mathcal{S}^\dagger \mathcal{S} &= \mathcal{S}\mathcal{S} \\ \nonumber
  &= \left(\ket{\pm_A}\bra{\varnothing_A} + \ket{\varnothing_A}\bra{\pm_A} + I_A - P^A_\pm - P^A_\varnothing \right) \mathcal{S} \\ \nonumber
  &= \ket{\pm_A}\bra{\varnothing_A}\mathcal{S} + \ket{\varnothing_A}\bra{\pm_A} \mathcal{S} + I_A\mathcal{S} - P^A_\pm\mathcal{S} - P^A_\varnothing \mathcal{S} \\ \nonumber
  &= P^A_\pm  + P^A_\varnothing  + \mathcal{S} -\ket{\pm_A}\bra{\varnothing_A} -\ket{\varnothing_A}\bra{\pm} \\ \nonumber
  &= P^A_\pm  + P^A_\varnothing  + \left(\ket{\pm_A}\bra{\varnothing_A} + \ket{\varnothing_A}\bra{\pm_A} + I_A - P^A_\pm - P^A_\varnothing \right) -\ket{\pm_A}\bra{\varnothing_A} -\ket{\varnothing_A}\bra{\pm} \\ \nonumber
  &= I_A.
\end{align}
Using these properties, we confirm the unitarity of $U(t_1, t_0)$:
\begin{align}
  U^\dagger(t_1, t_0) U(t_1, t_0) &=  \left({P^{S_z}_+}^\dagger {P^{S_z}_+} \otimes {\mathcal{S}^{\mathcal{X}}_{\varnothing, +}}^\dagger \mathcal{S}^{\mathcal{X}}_{\varnothing, +} \right) + \left({P^{S_z}_-}^\dagger P^{S_z}_- \otimes {\mathcal{S}^{\mathcal{X}}_{\varnothing, -}}^\dagger {\mathcal{S}^{\mathcal{X}}_{\varnothing, -}}\right) \\ \nonumber
  &= \left({P^{S_z}_+} \otimes I_\mathcal{X}\right) + \left({P^{S_z}_-} \otimes I_\mathcal{X}\right) \\ \nonumber
  &= \left( {P^{S_z}_+} + {P^{S_z}_-} \right) \otimes I_\mathcal{X} \\ \nonumber
  &= I.
\end{align}

Starting with a general spin state, the final state is
\begin{align} \label{eq: Experiment 1 final state}
  U(t_1, t_0)\ket{\psi_s} & =  U(t_1, t_0) \left(\ket{\psi_s} \otimes \ket{\varnothing_\mathcal{X}} \right) \\
  &= \nonumber P^{S_z}_+ \ket{\psi_s} \otimes \ket{+_{\mathcal{X}}} \: \bm{+} \: P^{S_z}_- \ket{\psi_s} \otimes \ket{-_{\mathcal{X}}}.
\end{align}

At the instant measurement begins $t_0$, the position state is $\ket{\varnothing_\mathcal{X}}$ as the electron enters the magnetic field. At the instant measurement ends $t_1$, the position state is either $\ket{+_{\mathcal{X}}}$ or $\ket{-_{\mathcal{X}}}$, realized with spin-up and spin-down spin states respectively. Notice that the final sum does not contain any terms representing incorrect correlations between spin and position states (such as $ P^{S_z}_+ \ket{\psi_s} \otimes \ket{-_{\mathcal{X}}}$). The presence of these terms would suggest that spin-up particles could be found in the spin-down region, or vice versa; if spin state cannot be deduced from the position state, then a good measurement has not been made. The absence of these terms means that we can deduce the spin state from the position state. Furthermore, the final state cannot be written as the tensor product of a state in $\mathcal{H}_s$ and a state in $\mathcal{H}_\mathcal{X}$ (as the initial state was). This is the definition of \textit{entanglement} of spin and position; the von Neumann measurement scheme describes the measurement process as entanglement of two independent degrees of freedom.

The von Neumann scheme is usually written as a linear map \cite{Schlosshauer}:
\begin{align} \label{eq: general final state}
    \nonumber U(t_1, t_0): \\
    & \ket{\psi} = \left(\sum_{n} P^{S_z}_n\ket{\psi_s}\right) \otimes \ket{\varnothing_\mathcal{X}} \mapsto \sum_{n}\left(P^{S_z}_n\ket{\psi_s} \otimes \ket{n_\mathcal{X}}\right),
\end{align}
where $n = +, -$.

Notice that the initial state is a single tensor product, while the final state is a sum of tensor products. The coherence initially present only in the spin system is extended to the spin-position system. This process is represented schematically in \autoref{Figure:vnm experiment 1}; the initial state branches into two distinct outcomes, each represented by a term in the final state.

If the final state of the von Neumann measurement scheme (\autoref{eq: Experiment 1 final state}) is a coherent state, then why do we observe definite measurements of spin components? Each possible outcome of measurement is simultaneously present in the final state, yet we only experience one of these outcomes. How this occurs is an open research question, known as the \textit{problem of outcomes}. We revisit this problem in \autoref{problem of outcomes}.
\begin{figure}
\centering\CaptionFontSize
\begin{tikzpicture}[shorten >=1pt,auto, thick,
     square node/.style={rectangle, minimum height=2cm, minimum width=1.50cm, text width = 1.25cm, draw, font=\sffamily\Large\bfseries},
     port/.style={rectangle, draw,  minimum height=1cm, minimum width=0.75cm, font=\sffamily\Large\bfseries},
     wf/.style={rectangle, minimum height=1cm}]
    \apparatus{1}{2}{0}{$\hat{z}$};

    \node(w0) at (-0.5,0) {$\ket{\psi_s} \otimes \ket{\varnothing_\mathcal{X}}$};
    \node[wf] (w1) at (4.75, 0.5) {$P^{S_z}_+\ket{\psi_s} \otimes \ket{+_{\mathcal{X}}}$};
    \node[wf] (w2) at (4.75, -0.5) {$P^{S_z}_-\ket{\psi_s} \otimes \ket{-_{\mathcal{X}}}$};

    % \node(label1) at (0, -1.75) {$\bm{t_0}$};
    % \node(label2) at (6.25, -1.75) {$\bm{t_1}$};

    \draw[line width=0.5mm] (w0) -- (1);
    \draw[line width=0.5mm] (1+) -- (w1);
    \draw[line width=0.5mm] (1-) -- (w2);
\end{tikzpicture}

\caption[Unitary measurement for Stern-Gerlach Experiment 1]
{The Stern-Gerlach experiment as described by the von Neumann measurement scheme. Each measurement outcome corresponds to a term in the time-evolved state (\autoref{eq: Experiment 1 final state}). Notice that the measurement interaction results in a branching structure, which is recapitulated spatially by the Stern-Gerlach apparatus.}
\label{Figure:vnm experiment 1}
\end{figure}

\section{Preferred Basis Problem}
In addition to the ambiguity of which term in \autoref{eq: general final state} actually occurs, there is ambiguity in which basis \autoref{eq: general final state} is written in. The \textit{preferred basis problem} arises from the ability to write the final state in the same form, but using a different basis,
\begin{align}  \label{eq: preferred basis state general}
  \ket{\psi'} = \sum_{n}\left(P^{S_z}_n\ket{\psi_s} \otimes \ket{n_\mathcal{X}}\right) = \sum_{n}\left({P^{S_z}_{n}}' \ket{\psi_s} \otimes \ket{{n_\mathcal{X}}'}\right).
\end{align}

Such a case is exemplified using Experiment 1. Consider setting the initial spin state to spin-up in the $\hat{x}$ direction,
\begin{align}
  \ket{\psi_s} = \ket{+_{S_x}} = \frac{\ket{+_{S_z}} + \ket{-_{S_z}}}{\sqrt{2}}.
\end{align}

The final state by \autoref{eq: Experiment 1 unitary operator} is
\begin{align} \label{eq:preferred basis state z}
  \ket{\psi'} = \frac{\ket{+_{S_z}}\otimes\ket{+_{\mathcal{X}}} + \ket{-_{S_z}}\otimes\ket{-_{\mathcal{X}}}}{\sqrt{2}}.
\end{align}

Similar to the $S_x$ eigenstates, we define orthonormal position states
\begin{align}
  \ket{+_{{\mathcal{X}}_x}} = \frac{\ket{+_{\mathcal{X}}} + \ket{-_{\mathcal{X}}}}{\sqrt{2}} \\ \nonumber
  \ket{-_{{\mathcal{X}}_x}} = \frac{\ket{+_{\mathcal{X}}} - \ket{-_{\mathcal{X}}}}{\sqrt{2}}
\end{align}

so that the final state can be written
\begin{align} \label{eq:preferred basis state x}
  \ket{\psi'} &= \frac{ \left(\frac{\ket{+_{S_x}} + \ket{-_{S_x}}}{\sqrt{2}} \otimes \frac{\ket{+_{{\mathcal{X}}_x}} + \ket{-_{{\mathcal{X}}_x}}}{\sqrt{2}} \right) +  \left(\frac{\ket{+_{S_x}} - \ket{-_{S_x}}}{\sqrt{2}} \otimes \frac{\ket{+_{{\mathcal{X}}_x}} - \ket{-_{{\mathcal{X}}_x}}}{\sqrt{2}} \right) }{\sqrt{2}} \\ \nonumber
  \ket{\psi'} &= \frac{\ket{+_{S_x}} \otimes \ket{+_{{\mathcal{X}}_x}} + \ket{-_{S_x}} \otimes \ket{-_{{\mathcal{X}}_x}}}{\sqrt{2}}.
\end{align}

\autoref{eq:preferred basis state x} matches \autoref{eq:preferred basis state z} in form; it appears that the measurement process of spin along the $\hat{z}$ axis has entangled orthonormal position states with spin states along the $\hat{x}$ axis. If we regard such an entanglement as the measurement process, the von Neumann measurement scheme violates the principle of complementarity by simultaneously measuring $S_z$ and $S_x$. We know the experimental setup was configured to measure $S_z$, but nothing in the theory singles out $S_z$ as the preferred basis.

Returning to the problem \autoref{eq: preferred basis state general}, we note that $\{ \ket{n_s} \}$ and $\{ \ket{n_\mathcal{X}} \}$ are orthogonal sets, so $\ket{\psi'}$ is a biorthogonal system. The biorthogonal decomposition theorem states that alternate bases $\{ \ket{n'_s} \}$ and $\{ \ket{n'_\mathcal{X}} \}$ satisfying \autoref{eq: preferred basis state general} exist when $\braket{n_s | \psi_s}$ are not all distinct \cite{Elby}. Limiting this condition to normalized states of spin-$\frac{1}{2}$ systems, states with coefficients $\braket{n_s | \psi_s} = \frac{1}{\sqrt{2}}$ for both $n = +$ and $n = -$ are subject to the preferred basis problem as shown. Since every state in $\mathcal{H}$ can be expressed in this form by expansion in the pertinent basis, the system is always subject to the preferred basis problem.

\section{Einselection}

While systems in the form \autoref{eq: general final state} do not generally have unique decompositions, systems with three or more components do by the triorthogonal decomposition theorem, so long as all three components are expanded in two orthogonal (and one non-collinear) bases \cite{Elby}. We open the spin-position system to interaction with some third system $\mathcal{H}_\epsilon$. Asserting that during measurement, $\ket{\psi_\epsilon}$ is entangled with the $\ket{\psi_s}$ just as $\ket{\psi_\mathcal{X}}$ is entangled with $\ket{\psi_s}$,
\begin{align} \label{eq:selected basis}
  \ket{\psi'} = \sum_{n}\left(P^{S_z}_n\ket{\psi_s} \otimes \ket{n_\mathcal{X}} \otimes \ket{n_\epsilon} \right) \neq \sum_{n}\left({P^{S_z}_n}'\ket{\psi_s} \otimes \ket{{n_\mathcal{X}}'} \otimes \ket{{n_\epsilon}'} \right).
\end{align}
Since there is no other basis into which $\ket{\psi'}$ can expand to this form, the preferred basis has been selected by including a third system that also undergoes von Neumann measurement. This indicates that we may be missing a hidden degree of freedom in our measurement model. But what is $\mathcal{H}_\epsilon$?

For guidance, we look back to the original phrasing of the von Neumann measurement scheme, where measurement is described as the entanglement of a microscopic system with a macroscopic measuring apparatus \cite{Neumann}. Many descriptions of Stern-Gerlach measurement interpret the electron position system as the apparatus itself \cite{Venugopalan}. This is a reasonable abstraction, as the position of the electron is used to ``read off'' the result of the measurement. However, this approach is misleading, because it conflates two distinct physical systems; the apparatus, and the position system belonging to the electron. By labeling the position system as the ``apparatus'', the degree of freedom corresponding to the actual apparatus is effectively ignored.

Newton's third law asserts that an interaction consists of equal and opposite actions between two systems. For the Stern-Gerlach experiment, the interaction between the apparatus magnet and the electron affects both the electron and the magnet, yet we have only described the effect on the electron. If we interpret the third system $H_\epsilon$ as the apparatus, \autoref{eq:selected basis} also describes the effect on the magnet from the interaction. Such an approach has been proposed under the name \textit{interaction induced superselection} (or \textit{inselection})\cite{Wang}.

A much more established approach interprets the third system as the \textit{environment}, which consists of every imaginable system other than the electron. This approach is called \textit{environment induced superselection} or \textit{einselection} \cite{Zurek}. Although inselection is pitched as a different response to the preferred basis problem, we suggest that it is a compatible (if not potentially more precise) approach to interpreting $\mathcal{H}_\epsilon$, because the apparatus is necessarily included in the environment. The electron's effect on the magnet is obscured but present when calling $\mathcal{H}_\epsilon$ the environment.

A benefit of using einselection is that the environment keeps persistent records about the electron's state. Imagine every system that collides with the electron (gas molecules, photons, etc.). The collision's occurrence depends on the electron's trajectory (which is dependent on its spin). Given omnipotent knowledge of every system's interaction with the electron, one could deduce the electron's spin state. When the electron is realized with spin-up or spin-down, there are causal effects in the environment that encode the electron's history; we say that the environment continuously records \textit{which-state information} about the system \cite{Schlosshauer}. We can think of the environment as constantly interacting with our system to establish the ``facts of the universe'' about the electron.

We now formalize the spin-position-environment interaction, similar to how the spin-position correlation implied in the projection postulate was formalized. We name $\ket{\varnothing_\epsilon}$ representing the environment's recording of the apparatus in the ready state only, and $\ket{\pm_\epsilon}$ representing the environment's recording of the apparatus in spin-up or spin-down. Representing classically distinct outcomes, we assert orthonormality
\begin{align}
  \braket{i_\epsilon | j_\epsilon} = \delta_{i,j}
\end{align}
for $i,j = \varnothing, +, -$.
Idealizing the environment as a perfect record keeper, the dynamics must map
\begin{align} \label{eq: unitary operator inselection}
    \nonumber U(t_1, t_0): \\
    & \ket{\psi} = \left(\sum_{n} P^{S_z}_n\ket{\psi_s}\right) \otimes \ket{\varnothing_\mathcal{X}} \otimes \ket{\varnothing_\epsilon} \mapsto \sum_{n}\left(P^{S_z}_n\ket{\psi_s} \otimes \ket{n_\mathcal{X}} \otimes \ket{n_\epsilon} \right),
\end{align}
where $n= +,-$.

Exemplifying this, we introduce the environment in Experiment 1 so that the state space is now composed of spin, position, and environment systems $\mathcal{H} = \mathcal{H}_s \otimes \mathcal{H}_\mathcal{X} \otimes \mathcal{H}_\epsilon$. The unitary operator implementing \autoref{eq: unitary operator inselection} is
\begin{align} \label{einselection experiment 1}
  U(t_1, t_0) &= \left(P^{S_z}_+ \otimes \mathcal{S}^\mathcal{X}_{\varnothing, +} \otimes \mathcal{S}^\epsilon_{\varnothing, +} \right) + \left(P^{S_z}_- \otimes \mathcal{S}^\mathcal{X}_{\varnothing, -} \otimes \mathcal{S}^\epsilon_{\varnothing, -} \right).
\end{align}

For a general initial spin state, this produces the final state
\begin{align} \label{einselection experiment 1 state}
  \ket{\psi'} &= P^{S_z}_+ \ket{\psi_s} \otimes \ket{+_{\mathcal{X}}} \otimes \ket{+_\epsilon} \: \bm{+} \: P^{S_z}_- \ket{\psi_s} \otimes \ket{-_{\mathcal{X}}} \otimes \ket{-_\epsilon},
\end{align}
where each term represents a possible outcome of the experiment. This result is visualized schematically in \autoref{fig: Experiment 1 inselection}.

When including the electron-environment interaction, there is no longer a basis ambiguity for the time evolved state; \autoref{einselection experiment 1 state} cannot be expanded using another basis. We also capture the behavior of the environment as a record keeper, which will be necessary for consistently assigning probabilities to measurement outcomes in \autoref{sec:consistency conditions}.

\begin{figure}
\centering\CaptionFontSize
\begin{tikzpicture}[shorten >=1pt,auto, thick,
     square node/.style={rectangle, minimum height=2cm, minimum width=1.50cm, text width = 1.25cm, draw, font=\sffamily\Large\bfseries},
     port/.style={rectangle, draw,  minimum height=1cm, minimum width=0.75cm, font=\sffamily\Large\bfseries},
     wf/.style={rectangle, minimum height=1cm}]
    \apparatus{1}{2}{0}{$\hat{z}$};

    \node(w0) at (-1,0) {$\ket{\psi_s} \otimes \ket{\varnothing_\mathcal{X}} \otimes \ket{\varnothing_\epsilon}$};
    \node[wf] (w1) at (5.25, 0.5) {$P^{S_z}_+\ket{\psi_s} \otimes \ket{+_{\mathcal{X}}} \otimes \ket{+_\epsilon}$};
    \node[wf] (w2) at (5.25, -0.5) {$P^{S_z}_-\ket{\psi_s} \otimes \ket{-_{\mathcal{X}}} \otimes \ket{-_\epsilon}$};

    % \node(label1) at (0, -1.75) {$\bm{t_0}$};
    % \node(label2) at (6.25, -1.75) {$\bm{t_1}$};

    \draw[line width=0.5mm] (w0) -- (1);
    \draw[line width=0.5mm] (1+) -- (w1);
    \draw[line width=0.5mm] (1-) -- (w2);
\end{tikzpicture}
\caption[Unitary measurement for Stern-Gerlach Experiment 1, including the electron-environment interaction]
{The most complete description of Experiment 1 presented, including position and environment degrees of freedom. The seemingly redundant correlation of both position and environment states to spin states validifies the abstraction of the apparatus as the position system. However, formalizing the interaction with the environment provides a description of record keeping and selects a preferred basis.}
\label{fig: Experiment 1 inselection}
\end{figure}

\section{Consecutive Measurements}

In \autoref{standard consecutive measurements}, we applied the projection postulate successively to account for consecutive measurements. Because we only proceeded to measure the $\hat{x}$ component of spin for electrons that initially measured spin-up for the $\hat{z}$ component, we did not subject spin-down states to the projection postulate again. By selectively applying the projection and probability postulates in succession, the results of consecutive measurement are predicted. The von Neumann measurement scheme can also be applied successively, and is used on a term-by-term basis to account for measurements that occur on a condition of prior results. We exemplify this process using Experiment 2.

Now, the environment must record the state of two separate measurements: the first measurement of spin along the $\hat{z}$ axis, and the second measurement of spin along the $\hat{x}$ axis. To simplify this, we separate the components of the environment responsible for recording each measurement
\begin{align}
  \mathcal{H}_\epsilon = \mathcal{H}_{\epsilon_1} \otimes \mathcal{H}_{\epsilon_2},
\end{align}
so that the complete Hilbert space is
\begin{align}
  \mathcal{H} = \mathcal{H}_s \otimes \mathcal{H}_\mathcal{X} \otimes \mathcal{H}_{\epsilon_1} \otimes \mathcal{H}_{\epsilon_2}.
\end{align}
We also name $+, -,$ and $\varnothing$ position states for the second apparatus, distinguishing them from positions state for the first apparatus. The position states of interest are now $\{ \ket{\varnothing_{\mathcal{X}}^1}, \ket{+_{\mathcal{X}}^1}, \ket{-_{\mathcal{X}}^1}, \ket{\varnothing_{\mathcal{X}}^2}, \ket{+_{\mathcal{X}}^2}, \ket{-_{\mathcal{X}}^2} \}$.

The dynamics are unchanged from \autoref{einselection experiment 1} for the first measurement, with the identity acting on the second environment system to leave it unaffected,
\begin{align}
  U(t_1, t_0) &= P^{S_z}_+ \otimes \mathcal{S}^{\mathcal{X}}_{\varnothing^1, +^1}  \nonumber \otimes \mathcal{S}^{\epsilon_1}_{ \varnothing, +} \otimes I_{\epsilon_2}\\ \nonumber
  &+ P^{S_z}_- \otimes \mathcal{S}^{\mathcal{X}}_{\varnothing^1, -^1} \otimes \mathcal{S}^{\epsilon_1}_{\varnothing, -} \otimes I_{\epsilon_2}.
\end{align}

For the second measurement, we begin by selecting $\hat{z}$ spin-down states and leaving them unaffected,
\begin{align}
  U(t_2, t_1) &=  P^{S_z}_- \otimes I_\mathcal{X} \otimes I_{\epsilon_1} \otimes I_{\epsilon_2}
\end{align}.
Then, we select $\hat{z}$ spin-up states and perform the measurement scheme again, since these are routed to the second apparatus,
\begin{align}
  U(t_2, t_1) &= P^{S_x}_+ P^{S_z}_+ \otimes \mathcal{S}^\mathcal{X}_{+^1, +^2} \otimes I_{\epsilon_1} \otimes \mathcal{S}^{\epsilon_2}_{+, \varnothing} \\ \nonumber
  &+ P^{S_x}_- P^{S_z}_+ \otimes \mathcal{S}^\mathcal{X}_{-^1, +^2} \otimes I_{\epsilon_1} \otimes \mathcal{S}^{\epsilon_2}_{-, \varnothing} \\ \nonumber
  &+ P^{S_z}_- \otimes I_\mathcal{X} \otimes I_{\epsilon_1} \otimes I_{\epsilon_2}.
\end{align}
The $\epsilon_2$ entanglement operator functions just as the $\epsilon_1$ operator did for the first measurement. The position entanglement operator is more subtle. Immediately after the first measurement, we expect the up and down position state to be mapped to the ready state of the second apparatus. Immediately after that, the ready state is mapped to up and down position states as the second measurement takes place. Combining both of these mappings, we directly map up/down position states from the first apparatus to up/down position states of the second.

Because the environment is used as the third degree of freedom, we do not have to worry about reversing the spin-apparatus entanglement after measurement. The role of the environment is to keep a persistent record, so it stays in the state $\ket{\pm_\epsilon}$ after the measurement. This effect is seen in \autoref{Figure:Measurement:consecutive final}, which visualizes the branching of a general initial state evolved by $U(t_2, t_0)$.

\begin{figure}
\centering\CaptionFontSize

\begin{tikzpicture}[shorten >=1pt,auto, thick,
     square node/.style={rectangle, minimum height=2cm, minimum width=1.50cm, text width = 1.25cm, draw, font=\sffamily\Large\bfseries},
     port/.style={rectangle, draw,  minimum height=1cm, minimum width=0.75cm, font=\sffamily\Large\bfseries},
     wf/.style={rectangle, minimum height=1cm}]
    \apparatus{1}{4}{0}{$\hat{z}$};
    \apparatus{2}{6.5}{1.5}{$\hat{x}$};

    \node(w0) at (0.25,0) {$\ket{\psi_s} \otimes \ket{\varnothing_\mathcal{X}^1} \otimes \ket{\varnothing_{\epsilon_1}} \otimes \ket{\varnothing_{\epsilon_2}} $};
    \node[wf] (w1) at (8, -.5) {$P^{S_z}_-\ket{\psi_s} \otimes \ket{-_{\mathcal{X}}^1}  \otimes \ket{-_{\epsilon_1}} \otimes \ket{\varnothing_{\epsilon_2}}$};
    \node[wf] (w2) at (10.75, 1) {$P^{S_x}_-P^{S_z}_+\ket{\psi}_s \otimes \ket{-_{\mathcal{X}}^2} \otimes \ket{+_{\epsilon_1}} \otimes \ket{-_{\epsilon_2}}$};
    \node[wf] (w3) at (10.75, 2) {$P^{S_x}_+ P^{S_z}_+\ket{\psi_s} \otimes \ket{+_{\mathcal{X}}^2} \otimes \ket{+_{\epsilon_1}} \otimes \ket{+_{\epsilon_2}}$};

    % \node(label0) at (0, -1.75) {$\bm{t_0}$};
    % \node(label1) at (4.75, -1.75) {$\bm{t_1}$};
    % \node(label2) at (7.25, -1.75) {$\bm{t_2}$};
    % \node(label3) at (9.75, -1.75) {$\bm{t_3}$};
    % \node(bw1) at (-1.75, 1.75) {$P^{S_z}_+\ket{\psi}^s \otimes \ket{+_{S_z}}^{D_1}_z \otimes \ket{\varnothing}^{D_2}_\mathcal{X} $};

    \draw[line width=0.5mm] (w0) -- (1);
    \draw[line width=0.5mm] (1+) -- (2);
    \draw[line width=0.5mm] (1-) --  (w1);
    \draw[line width=0.5mm] (2+) -- (w3);
    \draw[line width=0.5mm] (2-) -- (w2);

\end{tikzpicture}

\caption[Unitary measurement for Stern-Gerlach Experiment 2, including the electron-environment interaction]
{Schematic of consecutive measurement with spin, position and environment degrees of freedom. Notice the temporary encoding of measurement results in position states, and persistent encoding of measurement results in environment states.}
\label{Figure:Measurement:consecutive final}
\end{figure}

\chapter{Consistent Histories}

The probability postulate makes predictions about the results of the standard description of measurement. We can no longer frame the calculation of probabilities within this context, as we have  described measurement as a unitary process and discarded the projection postulate. This motivates the search for a method of assigning probability distributions to sets of unitary outcomes in general.

The \textit{consistent histories} approach extends the probability postulate to make predictions about  more general \textit{quantum histories} rather than individual measurement results. This is accomplished by modifying both the formalism and interpretation of quantum mechanics; hence, consistent histories is called an ``approach'' to quantum mechanics.

First, we re-articulate some of the foundational mathematics and reasoning originally proposed by Robert Griffiths in 1984 \cite{old_griffiths}. Then, we further develop the approach to reproduce the standard predictions of Stern-Gerlach experiments 1 and 2. This is done using the perspective of Murray Gell-Mann and James Hartle, who independently published similar ideas in 1990 under the name ``decoherent histories'' \cite{gell}.

\section{Events and Histories} \label{events}

As noted in \autoref{og experiment 1}, a sample space consists of an exhaustive set of mutually exclusive outcomes, called \textit{events}. In quantum mechanics, the sample space for a physical variable is found by decomposing the identity in that variable's basis. Each term in the decomposition represents a \textit{quantum event}. For example, the sample space of $S_z$ consists of the terms in
\begin{align}
  I = \sum_i P^{S_z}_i = P^{S_z}_+ + P^{S_z}_-.
\end{align}

Events exist within the context of a particular sample space. Consequently, we can use logical reasoning to make conjunctive or negative statements about events. For example, the event for ``spin is either up or down'' is the sum of spin-up and spin-down events, $P^{S_z}_+ + P^{S_z}_- = I$. Note that asserting that the system is either spin-up or spin-down is the conjunction of all outcomes in the sample space, so it is equivalent to asserting nothing at all.

A \textit{quantum history} is a set of events at sequential times. We only need to specify events of interest; as finite sets, histories necessarily ignore an infinite amount of insignificant events. For Experiment 1, the events of interest are those immediately before and after measurement in the $\hat{z}$ apparatus. The histories for measuring spin-up and spin-down are
\begin{align}
  h_\pm &= \left( \left(P_{\psi_{S_z}} \otimes P^\mathcal{X}_\varnothing \otimes P^\epsilon_\varnothing \right), \left(P^{S_z}_\pm \otimes P^\mathcal{X}_\pm \otimes P^\epsilon_\pm \right)  \right).
\end{align}

The first event describes the system at time $t_0$ before measurement. It asserts that the spin system is in the initial state $\ket{\psi_s}$, that the position system is in the ready state ${\ket{\varnothing_\mathcal{X}}}$, and that the environment has not yet encoded a result $\ket{\varnothing_\epsilon}$. The second event describes the system at time $t_1$ after measurement. It asserts that the spin system is either up or down, $\ket{\pm_{S_z}}$, that the position system is in the up or down state ${\ket{\pm_\mathcal{X}}}$, and that the environment has encoded a result of up or down $\ket{\varnothing_\pm}$.  To shorten future calculations, we name these events
\begin{align}
  P_\varnothing &= P_{\psi_{S_z}} \otimes P^\mathcal{X}_\varnothing \otimes P^\epsilon_\varnothing  \\ \nonumber
  P_{\pm_z} &= P^{S_z}_\pm \otimes P^\mathcal{X}_\pm \otimes P^\epsilon_\pm,
\end{align}
so that the histories of interest are written as
\begin{align}
  h_\pm &= \left(P_\varnothing, P^z_{\pm} \right).
\end{align}

Similarly, for Experiment 2, we identify histories for each outcome in \autoref{Figure:Measurement:consecutive final}
\begin{align} \label{eq:Experiment 2 Histories}
  h_{+_z, \pm_x} &= \left(P_\varnothing, P^z_+, P^x_\pm \right) \\ \nonumber
  h_{-_z} &= \left(P_\varnothing, P^z_-\right).
\end{align}

\section{Extending the Probability Postulate}

The standard probability postulate is written as the inner product of the system state $\ket{\psi}$ and an eigenstate of a physical variable $\ket{a_n}$. It can instead be written in terms of the projection operator for $\ket{a_n}$ by expanding the complex square,
\begin{align}
        \mathcal{P}(n) &= |\braket{a_n|\psi}|^2 \\ \nonumber
        &= \braket{\psi|a_n} \braket{a_n|\psi} \\ \nonumber
        &= \bra{\psi} P^A_n \ket{\psi}.
\end{align}

Here we identify Lüders' Rule, which states that the component of $\ket{\psi}$ measured in $a_n$ is represented by $P^A_n \ket{\psi}$ \cite{Hegerfeldt}. The Born Rule then states that the probability of measuring $a_n$ is the inner product of this branch of the final state with the initial state.

Now, we seek to make probabilistic predictions about the occurrence of histories. If we could find an operator analogous to the $P^A_n$ that represents the occurrence of a history instead of a measurement result, the Born Rule could be extended to assign probabilities to histories without changing form. Following Lüders' Rule, such an operator would evolve an initial state through the events of a given history, similar to how the projector for $\ket{a_n}$ evolves an initial state to a measurement outcome.

To exemplify finding this operator, we consider the history for measuring spin-up in both apparatuses $h_{+_z, +_x}$ identified for Experiment 2 in \autoref{eq:Experiment 2 Histories}. We follow the path from the initial state to the final $+_x$ outcome in \autoref{Figure:Measurement:consecutive final}, operating on the initial state with unitary dynamics and event projectors along the way. The resulting state is called the \textit{branch wavefunction} for that history, labeled $\ket{\psi_{+_z, +_x}}$.  First, we assert that the system begins in the state corresponding to the first event in the history
\begin{align}
  \ket{\psi_{+_z, +_z}} = P_\varnothing \: \ket{\psi}.
\end{align}
Then, we assert that after evolution from $t_0$ to $t_1$, the event for measuring spin-up in the $\hat{z}$ apparatus occurs
\begin{align}
  \ket{\psi_{+_z, +_x}} = P^{S_z}_+ \: U(t_1, t_0) \: P_\varnothing \: \ket{\psi}.
\end{align}
Finally, we assert that after evolution from $t_1$ to $t_2$, the event for measuring spin-up in the $\hat{x}$ apparatus occurs
\begin{align}
  \ket{\psi_{+_z, +_x}} = P^{S_x}_+ \: U(t_2, t_1) \: P^{S_z}_+ \: U(t_1, t_0) \: P_\varnothing \: \ket{\psi}.
\end{align}
Writing all unitary operators with time starting at $t_0$,
\begin{align}
  \ket{\psi_{+_z, +_x}} &= P^{S_x}_+ \: U(t_2, t_0) \: U^\dagger(t_1, t_0) \: P^{S_z}_+ \: U(t_1, t_0) \: P_\varnothing \: \ket{\psi} \\ \nonumber
  &= \left(P^{S_x}_- \: U(t_2, t_0) \right) \left( U^\dagger(t_1, t_0) \: P^{S_z}_+ \: U(t_1, t_0) \right) \left( P_\varnothing \right) \: \ket{\psi} \\ \nonumber
  &= U(t_2, t_0)\left(U^\dagger(t_2, t_0) \: P^{S_x}_+ \: U(t_2, t_0) \right) \left( U^\dagger(t_1, t_0) \: P^{S_z}_+ \: U(t_1, t_0) \right) \left( P_\varnothing \right) \: \ket{\psi},
\end{align}
we recognize the Heisenberg picture event operators ${P}(t) = U^\dagger(t, t_0) \: P \: U(t, t_0)$. In terms of Heisenberg projectors,
\begin{align} \label{eq:branch wavefunction}
  \ket{\psi_{+_z, +_x}} &= U(t_2, t_0) \: {P^{S_x}_+(t_2)} \: {P^{S_z}_+(t_1)} \: {P_\varnothing(t_0)} \: \ket{\psi}.
\end{align}

$\ket{\psi_{+_z, +_x}}$ represents the ``branch'' of the final system that evolved through $+_z$ and $+_x$ events. The operator that maps initial state $\ket{\psi}$ to $\ket{\psi_{+_z, +_x}}$ must accomplish branch selection as well as unitary evolution. The factoring of this operator in \autoref{eq:branch wavefunction} isolates unitary evolution $U(t_2, t_0)$, so the remaining projectors must be responsible for branch selection. We call the operator consisting of these projectors the \textit{class operator} for history $\left(+_z, +_x\right)$,
\begin{align}
    C^\dagger_{+_z, +_x} &= {P^{S_x}_+(t_2)} \: {P^{S_z}_+(t_1)} \: {P_\varnothing(t_0)}.
\end{align}
Through its constituent Heisenberg projectors, the class operator brings together the events of a history with the unitary dynamics experienced by the system to characterize the occurrence of a history.

In general, the class operator for a history consisting of $n$ events is defined by\footnote{Conventionally, the class operator is written with projectors appearing in the same left-to-right reading order as the order of events in the history. By calling our operator $C_h^\dagger$, we invert this order so that the event projectors operate on the initial state in the same order as the events in the history.}
\begin{align}
  C_h^\dagger = P^{A_n}_{{A_k}_n}(t_n) \: P^{A_{n-1}}_{{A_k}_{n-1}}(t_{n-1})) \: ... \: P^{A_0}_{{A_k}_0}(t_0),
\end{align}
where the superscript $A_n$ labels the physical variable for the event, and the subscript ${A_k}_n$ labels the eigenvalue for the event. $C_h^\dagger$ corresponds to the branch wavefunction
\begin{align}
  \ket{\psi_h} = U(t_n, t_0) C_h^\dagger \ket{\psi}.
\end{align}

To extend the probability postulate to make predictions about histories, we replace the measurement result projector $P^A_n$ with the class operator $C_h^\dagger$
\begin{align} \label{eq:Extended Born Rule}
  \mathcal{P}(h_n) = \bra{\psi} C_h^\dagger \ket{\psi}.
\end{align}
\autoref{eq:Extended Born Rule} is the Born Rule extended to assign probabilities to the occurrence of histories. Exemplifying use of this extended Born Rule, we return to Experiment 1. The class operator for measuring spin-up or spin-down is
\begin{align}
  C_\pm^\dagger = P^{S_z}_\pm (t_1) \: P_\varnothing (t_0),
\end{align}
so \autoref{eq:Extended Born Rule} assigns probabilities
\begin{align}
  \mathcal{P}(\pm) &= \bra{\psi} C_\pm^\dagger \ket{\psi} \\ \nonumber
  &= \bra{\psi} P^{S_z}_\pm (t_1) \: P_\varnothing (t_0) \ket{\psi}.
\end{align}
$P_\varnothing (t_0)$ confirms that $\ket{\psi}$ is the correct initial state, so
\begin{align}
  \mathcal{P}(\pm) &= \bra{\psi} P^{S_z}_\pm (t_1) \ket{\psi} \\ \nonumber
  &= \bra{\psi} U^\dagger(t_1, t_0) P^{S_z}_\pm U(t_1, t_0) \ket{\psi}.
\end{align}
Substituting in the time-evolved state found for Experiment 1 in \autoref{einselection experiment 1 state}, we find the factors
\begin{align}
  U(t_1, t_0) \ket{\psi} &= \left(P^{S_z}_+ \ket{\psi_s} \otimes \ket{+_\mathcal{X}} \otimes \ket{+_\epsilon}\right) + \left(P^{S_z}_- \ket{\psi_s} \otimes \ket{-_\mathcal{X}} \otimes \ket{-_\epsilon} \right)\\ \nonumber
  \bra{\psi} U^\dagger(t_1, t_0) &= \left(\bra{\psi_s}P^{S_z}_+ \otimes \bra{+_\mathcal{X}} \otimes \bra{+_\epsilon} + \bra{\psi_s}P^{S_z}_- \otimes \bra{-_\mathcal{X}} \otimes \bra{-_\epsilon}\right).
\end{align}
Applying the event projector to the unitary operator,
\begin{align}
  P^{S_z}_\pm U(t_1, t_0) \ket{\psi} &= P^{S_z}_\pm \ket{\psi_s} \otimes \ket{\pm_\mathcal{X}} \otimes \ket{\pm_\epsilon},
\end{align}
so the probability expression simplifies to
\begin{align} \label{eq:reproducing born rule}
  \mathcal{P}(\pm) &= \left(\bra{\psi}  U^\dagger(t_1, t_0)\right) \left( P^{S_z}_\pm \ket{\psi_s} \otimes \ket{\pm_\mathcal{X}} \otimes \ket{\pm_\epsilon}\right) \\ \nonumber
   &= \left(\bra{\psi_s}P^{S_z}_\pm \otimes \bra{\pm_\mathcal{X}} \otimes \bra{\pm_\epsilon} \pm \bra{\psi_s}P^{S_z}_- \otimes \bra{-_\mathcal{X}} \otimes \bra{-_\epsilon} \right) \left( P^{S_z}_\pm \ket{\psi_s} \otimes \ket{\pm_\mathcal{X}} \otimes \ket{\pm_\epsilon}\right) \\ \nonumber
   &= \bra{\psi_s} P^{S_z}_\pm \ket{\psi_s} \braket{\pm_\mathcal{X}|\pm_\mathcal{X}} \braket{\pm_\epsilon|\pm_\epsilon} \\ \nonumber
   &= \bra{\psi_s} P^{S_z}_\pm \ket{\psi_s}.
\end{align}
We have reproduced the predictions of the standard Born Rule for Experiment 1 made in \autoref{Standard Experiment 1}.

\section{Consistency Conditions} \label{sec:consistency conditions}

In standard quantum mechanics, the third postulate defines the subset of states corresponding to ``measurement results'', and the fourth postulate makes predictions about these states only. Now that we have extended the Born Rule to make predictions about histories, we must be careful about the context in which predictions are made.

In \autoref{eq:reproducing born rule}, the extended Born Rule reproduces the probabilities of the standard Born Rule for Experiment 1. However, the extension goes on to make predictions about other outcomes. For example, we could ask about the probability that spin-up in the $\hat{x}$ direction is measured using the history
\begin{align}
  h_{+_x} &= (P_\varnothing ,P_{+_x}),
\end{align}
resulting in
\begin{align}
  \mathcal{P}(h_{+_x}) &= \bra{\psi_h} C^\dagger_{+_x} \ket{\psi_h}  \\ \nonumber
  &= \bra{\psi_s} P^{S_x}_+ \ket{\psi_s},
\end{align}
which is non-zero in general. We could ask an infinite amount of similar questions, since the spin Hilbert space includes states representing spin-up along every direction in space. Consequently, probabilities no longer sum to unity, which is inconsistent with probability theory. The cause of this inconsistency is that $P_{+_z}$ and $P_{+_x}$ belong to incompatible sample spaces, so we are comparing predictions made within different contexts.

In \autoref{events}, we defined events as elements of some specific sample space. The extended Born Rule assigns probabilities to sequences of events \textit{within the context of their sample spaces}. The idea of consistency conditions is to explicitly state the context in which predictions are made. To establish such a context, we construct a sample space of histories by finding a set of histories that are mutually exclusive and exhaustive,
\begin{align} \label{consistency conditions}
  S = \{h \}: \\ \nonumber
  \sum_{h \in S} C_h &= I \\ \nonumber
  C_{h'}^\dagger C_h &= \delta_{h,h'} C_h.
\end{align}

A set of histories $S$ satisfying these conditions are called a \textit{consistent family} of histories. Once a family is established, the extended Born rule assigns probabilities to the occurrence of its histories that are consistent with probability theory. The consistency conditions \autoref{consistency conditions} provide an objective criterion for when probabilities may be assigned, rather than subjective language about interaction with a ``classical measuring apparatus''; consequently, quantum theory has been extended to make predictions outside the narrow scope of measurement by a classical apparatus \cite{Craig}.

To exemplify finding a consistent family, we return to Experiment 1. We start by including the spin-up and spin-down histories,
\begin{align}
  S = \{ \left(P_\varnothing, P_{+_z} \right), \left(P_\varnothing, P_{-_x} \right)\}.
\end{align}

Though the probabilities of these histories sum to one, the set is not yet complete,
\begin{align}
  \sum_{h \in S} C_h^\dagger &= P_{\psi_s} P^{S_z}_+ \otimes P^\mathcal{X}_\varnothing \otimes P^\epsilon_\varnothing + P_{\psi_s} P^{S_z}_- \otimes P^\mathcal{X}_\varnothing \otimes P^\epsilon_\varnothing \\ \nonumber
  &= P_{\psi_s} \otimes P^\mathcal{X}_\varnothing \otimes P^\epsilon_\varnothing \neq I.
\end{align}

Finding the class operator that completes the set,
\begin{align}
  C^\dagger_{I-\varnothing} &= I - \left(P_{\psi_s} \otimes P^\mathcal{X}_\varnothing \otimes P^\epsilon_\varnothing \right).
\end{align}

This is the class operator for any history not starting in the initial spin state, not starting in the ready position, or not starting with a ready environment. In other words, $C_{I-\varnothing}$ represents histories that start in some state other than the initial state. Even though these histories never occur, they must be included to complete the family; the prediction of non-occurrence of $h_{I - \varnothing}$ is part of the context.

Due to position's continuous sample space, there are an infinite number of histories distinct from the initial state with zero chance of occurrence. We group these histories by starting with the identity (projecting onto all states) and removing the initial state only,
\begin{align}
  h_{I-\varnothing} = \left(I - P_\varnothing \right) = \left(I_s - P_{\psi_s}\right) \otimes \left(I_\mathcal{X} - P_{\varnothing}^\mathcal{X} \right) \otimes \left(I_\epsilon - P^\epsilon_\varnothing \right).
\end{align}
Notice that histories in set do not need to specify the same amount of events; $h_{I-\varnothing}$ consists of only one event. The set of histories is now
\begin{align}
  S = \left\{\left( P_\varnothing, P^{S_z}_+ \right), \left(P_\varnothing, P^{S_z}_- \right), \left(I - P_\varnothing \right) \right\}.
\end{align}

Now that we have an exhaustive set, we show that its histories are mutually exclusive,
\begin{align}
  C_{+_z}^\dagger C_{-_z} &= \left( P_{+_z}(t_1)  P_\varnothing(t_0) \right) \left(P_\varnothing(t_0) P_{-_z}(t_1) \right) \\ \nonumber
  &= P_{+_z}(t_1) P_{-_z}(t_1) \\ \nonumber
  &= U^\dagger(t_1, t_0) P_{+_z} U(t_1, t_0) U^\dagger(t_1, t_0) P_{-_z} U(t_1, t_0)  \\ \nonumber
  &= U^\dagger(t_1, t_0) P_{+_z}P_{-_z} U(t_1, t_0) \\ \nonumber
  &= U^\dagger(t_1, t_0) \left( P^{S_z}_+ P^{S_z}_-  \otimes P^\mathcal{X}_+ P^\mathcal{X}_- \otimes P^\epsilon_+ P^\epsilon_- \right) U(t_1, t_0) \\ \nonumber
  &= 0
\end{align} and
\begin{align}
  C_{\pm_z}^\dagger C_{I-\varnothing} &= \left( P_{+_z}(t_1)  P_\varnothing(t_0) \right) \left(I-P_\varnothing\right) \\ \nonumber
  &= P_{+_z}(t_1)  \left(P_\varnothing - P_\varnothing \right)\\ \nonumber
  &= 0.
\end{align}

The set $S$ is shown to be a consistent family of histories, so the predictions of \autoref{eq:reproducing born rule} are made within this context.

\section{Conditional Probabilities}
The configuration of Experiment 2 sends electrons to the second apparatus only if they measured spin-up in the first apparatus. This allowed us to assert that the state routed to the $\hat{x}$ apparatus was spin-up with probability $1$; the purpose was to prepare an initial spin state $\ket{+_{S_z}}$ for the $S_x$ measurement. In \autoref{standard consecutive measurements}, probabilities were calculated one measurement at a time through piecewise application of the probability and projection postulates, with probability theory combining the results,
\begin{align}
  \mathcal{P}(+_z \cap \pm_x) &= \mathcal{P}(+_z)\mathcal{P}(\pm_x) \\ \nonumber
  &= (1)\left(\frac{1}{2}\right).
\end{align}

In the consistent histories approach, it is crucial to exhaust all possible outcomes when constructing a context for predictions. If we configure our experiment to discard certain outcomes, we must exclude those outcomes from the sample space and re-normalizes the remaining probabilities. Probability theory gives the probability of event $A$ occurring given the occurrence of $B$ as
\begin{align}
  P(A|B) = \frac{\mathcal{P}(A\cap B)}{\mathcal{P}(B)}.
\end{align}
Applying this to Experiment 2, the probabilities of measuring spin-up or spin-down at the $\hat{x}$ apparatus given the measurement of spin-up at the $\hat{z}$ apparatus are
\begin{align} \label{eq: conditional consecutive probability}
  P(\pm_x|+_z) &= \frac{{\mathcal{P}(+_z\cap \pm_x)}}{{\mathcal{P}(+_z)}} \\ \nonumber
  &= \frac{\mathcal{P}(h_{+_z, \pm_x})}{\mathcal{P}(h_{+_z})}.
\end{align}
We find a consistent family for Experiment 2
\begin{align}
  S = \left\{\left(P_\varnothing, P_{+_z}, P_{+_x} \right), \left(P_\varnothing, P_{+_z}, P_{-_x} \right), \left(P_\varnothing, P_{-_z} \right), \left(I - P_\varnothing \right) \right\},
\end{align}
so that we can use the extended Born Rule to calculate $\mathcal{P}(h_{+_z, \pm_x})$
\begin{align}
  \mathcal{P}(+_z, \pm_x) &= \bra{\psi} C^\dagger_{+_z, \pm_x} \ket{\psi} \\ \nonumber
  &= \bra{\psi} P_{\pm_x}(t_2) P_{+_z}(t_1) P_{\psi_s} \ket{\psi} \\ \nonumber
  &= \bra{\psi} U^\dagger(t_2, t_0) P_{\pm_x} U(t_2, t_0) U^\dagger(t_1, t_0) P_{+_z} U(t_1, t_0)  \ket{\psi} \\ \nonumber
  &= \bra{\psi} U^\dagger(t_2, t_0) P_{\pm_x} U(t_2, t_1) P_{+_z} U(t_1, t_0) \ket{\psi}.
\end{align}
As an intermediate calculation, we carry out branch selection
\begin{align}
   P_{\pm_x} U(t_2, t_1) P_{+_z} &= P^{S_x}_\pm P^{S_z}_+ \otimes \mathcal{S}^\mathcal{X}_{+^1, +^2} \mathcal{S}^\mathcal{X}_{\varnothing^1, +^1} \otimes I_{\epsilon_1} \otimes \mathcal{S}^{\epsilon_2}_{\varnothing, +}
\end{align}
and substituting the result into the probability expression
\begin{align}
  \mathcal{P}(+_z, \pm_x) &= \bra{\psi} U^\dagger(t_2, t_0) \left(P^{S_x}_\pm P^{S_z}_+ \otimes \mathcal{S}^\mathcal{X}_{+^1, \pm^2} \mathcal{S}^\mathcal{X}_{\varnothing^1, +^1} \otimes I_{\epsilon_1} \otimes \mathcal{S}^{\epsilon_2}_{\varnothing, \pm} \right) U(t_1, t_0) \ket{\psi} \\ \nonumber
  &= \bra{\psi}  U^\dagger(t_2, t_0) \left(P^{S_x}_\pm P^{S_z}_+ \otimes \mathcal{S}^\mathcal{X}_{+^1, \pm^2} \mathcal{S}^\mathcal{X}_{ \varnothing^1, +^1}  \mathcal{S}^{\mathcal{X}}_{\varnothing^1, +^1} \otimes \mathcal{S}^{\epsilon_1}_{\varnothing, +} \otimes \mathcal{S}^{\epsilon_2}_{\varnothing, \pm} \right) \ket{\psi}.
\end{align}
Remembering that $\mathcal{S} = \mathcal{S}^\dagger$ and $\mathcal{S}\mathcal{S}^\dagger = I$, we use $\mathcal{S}\mathcal{S} = I$ to simplify
\begin{align}
  \mathcal{P}(+_z, \pm_x) &= \bra{\psi}  U^\dagger(t_2, t_0) \left(P^{S_x}_\pm P^{S_z}_+ \otimes \mathcal{S}^\mathcal{X}_{+^1, \pm^2 } \otimes \mathcal{S}^{\epsilon_1}_{\varnothing, +} \otimes \mathcal{S}^{\epsilon_2}_{\varnothing, \pm} \right) \ket{\psi} \\ \nonumber
  &= \bra{\psi} \left(P^{S_z}_+ P^{S_x}_\pm P^{S_z}_+ \otimes \mathcal{S}^\mathcal{X}_{\varnothing^2, \pm^2}\mathcal{S}^\mathcal{X}_{\pm^2, \varnothing^2} \otimes \mathcal{S}^{\epsilon_1}_{\varnothing, +} \mathcal{S}^{\epsilon_1}_{ \varnothing, +} \otimes \mathcal{S}^{\epsilon_2}_{\varnothing, \pm} \mathcal{S}^{\epsilon_2}_{\varnothing, \pm} \right) \ket{\psi} \\ \nonumber
  &= \bra{\psi} \left(P^{S_z}_+ P^{S_x}_\pm P^{S_z}_+ \otimes I_\mathcal{X}  \otimes I_{\epsilon_1} \otimes I_{\epsilon_2} \right) \ket{\psi} \\ \nonumber
  &= \bra{\psi_s} P^{S_z}_+ P^{S_x}_\pm P^{S_z}_+ \ket{\psi_s}.
\end{align}
Similarly, the probabilities for measuring spin-down in the $\hat{z}$ apparatus is
\begin{align}
  \mathcal{P}(-_z) &= \bra{\psi_s} P^{S_z}_- \ket{\psi_s}.
\end{align}

Inserting the probabilities calculated into \autoref{eq: conditional consecutive probability},
\begin{align}
    \mathcal{P}(\pm_x) &= \frac{\bra{\psi_s} P^{S_z}_+ P^{S_x}_\pm P^{S_z}_+ \ket{\psi_s}}{\bra{\psi_s} P^{S_z}_+ \ket{\psi_s}} \\ \nonumber
    &= \frac{\braket{\psi_s | +_{S_z}} \braket{+_{S_z}|\pm_{S_x}} \braket{\pm_{S_x}|+_{S_z}} \braket{+_{S_z}|\psi_s}}{\braket{\psi_s | +_{S_z}} \braket{+_{S_z}|\psi_s}} \\ \nonumber
    &= \braket{+_{S_z}|\pm_{S_x}} \braket{\pm_{S_x}|+_{S_z}} \\ \nonumber
    &= \frac{1}{2},
\end{align}
and we have reproduced the standard predictions made in \autoref{eq:standard conditional probabilites}.

\section{Problem of Outcomes} \label{problem of outcomes}
Throughout this thesis, we have been careful to distinguish between \textit{formalism}, which consists of the mathematical objects used to make predictions, and \textit{interpretation}, which surrounds those objects with words to give them physical meaning \cite{baumann}. When using the word \textit{approach}, we refer to a combined formalism and interpretation. In \autoref{Chapter 3}, we detailed the standard approach to quantum mechanics by describing its postulates, which prescribe mathematical objects and give them physical meaning. In \autoref{Chapter 4}, we formalized the dynamics of a unitary measurement scheme for the SG experiment. In this chapter, we have introduced the consistent histories approach to make probabilistic predictions about SG measurement outcomes. Now that we have developed an operational understanding of consistent histories, we revisit the problem of outcomes mentioned in \autoref{vnms}.

The interpretation of the coherency present in the final state of the von Neumann measurement scheme \label{eq: general final state} is an open and debated question. If we understand each term in the coherent state to be simultaneously present, why do we observe only one of these terms in definite measurement outcomes? What chooses a particular outcome, and what becomes of the others?

The \textit{many-worlds} interpretation proposed by DeWitt \footnote{Many-worlds is often attributed to Hugh Everett III for the work in his doctoral thesis, published under the name \textit{``Relative State'' Formulation of Quantum Mechanics} \cite{everett}. However, what Everett presents is a formalism of the measurement process that does not rely on state collapse; he does not go on to interpret each outcome as belonging to separate universes. Everett disagreed with the many-worlds interpretation of his work \cite{barrett}, which was first published by Bryce DeWitt \cite{dewitt}. This case of miscrediting illustrates the confusion that follows from conflating formalism with interpretation.} asserts that each outcome occurs, but in separate non-interacting copies of the universe. The probability that a Stern-Gerlach experiment measures spin-up is really the probability that the universe in which spin-up occurs is selected. It is difficult to accept that the entire universe splits upon each measurement interaction, especially since the interpretation does not describe a mechanism for the selection of a particular universe. However, if we keep in mind that (1) we experience only one outcome, and (2) there is nothing in quantum theory that singles out the outcome we experience, then many-worlds is a plausible explanation of what becomes of the other terms in \autoref{eq: general final state}.

The consistent histories approach does not attempt to answer the problem of outcomes. Whatever mechanism may be at play for selecting an  outcome, it is ignored by making predictions about the occurrence of histories rather than the state of the system. Consistent histories generalizes standard quantum mechanics so that measurement may be described as a physical process, while being cautious to avoid speculation about processes not yet understood. Consistent histories can be seen as a way to employ the math of many-worlds (Everett's relative-state formalism \cite{everett}) without necessarily subscribing to its interpretive ideas. Looking forward, such a predictive framework may prove invaluable as researchers probe testable differences between the standard and relative-state formalism \cite{baumann, proietti}.


% This LaTeX was auto-generated from an M-file by MATLAB.
% To make changes, update the M-file and republish this document.

      \subsection{gp2d.m}

\begin{par}
\textbf{Summary:} Compute joint predictions and derivatives for multiple GPs with uncertain inputs. Does not consider the uncertainty about the underlying function (in prediction), hence, only the GP mean function is considered. Therefore, this representation is equivalent to a regularized RBF network. If gpmodel.nigp exists, individial noise contributions are added.
\end{par} \vspace{1em}
\begin{verbatim}function [M, S, V, dMdm, dSdm, dVdm, dMds, dSds, dVds, dMdi, dSdi, dVdi, ...
                   dMdt, dSdt, dVdt, dMdX, dSdX, dVdX] = gp2d(gpmodel, m, s)\end{verbatim}
\begin{par}
\textbf{Input arguments:}
\end{par} \vspace{1em}
\begin{verbatim}gpmodel    GP model struct
  hyp      log-hyper-parameters                                  [D+2 x  E ]
  inputs   training inputs                                       [ n  x  D ]
  targets  training targets                                      [ n  x  E ]
  nigp     (optional) individual noise variance terms            [ n  x  E ]
m          mean of the test distribution                         [ D  x  1 ]
s          covariance matrix of the test distribution            [ D  x  D ]\end{verbatim}
\begin{par}
\textbf{Output arguments:}
\end{par} \vspace{1em}
\begin{verbatim}M          mean of pred. distribution                            [ E  x  1 ]
S          covariance of the pred. distribution                  [ E  x  E ]
V          inv(s) times covariance between input and output      [ D  x  E ]
dMdm       output mean by input mean                             [ E  x  D ]
dSdm       output covariance by input mean                       [E*E x  D ]
dVdm       inv(s)*input-output covariance by input mean          [D*E x  D ]
dMds       ouput mean by input covariance                        [ E  x D*D]
dSds       output covariance by input covariance                 [E*E x D*D]
dVds       inv(s)*input-output covariance by input covariance    [D*E x D*D]\end{verbatim}
\begin{verbatim}dMdi      output mean by inputs                                  [ E  x n*D]
dSdi      output covariance by inputs                            [E*E x n*D]
dVdi      inv(s) times input-output covariance by inputs         [D*E x n*D]
dMdt      output mean by targets                                 [ E  x n*E]
dSdt      output covariance by targets                           [E*E x n*E]
dVdt      inv(s) times input-output covariance by targets        [D*E x n*E]
dMdX      output mean by hyperparameters                         [ E  x P*E]
dSdX      output covariance by hyperparameters                   [E*E x P*E]
dVdX      inv(s) times input-output covariance by hyper-par.     [D*E x P*E]\end{verbatim}
\begin{par}
Copyright (C) 2008-2013 by Marc Deisenroth, Andrew McHutchon, Joe Hall, and Carl Edward Rasmussen.
\end{par} \vspace{1em}
\begin{par}
Last modified: 2013-05-24
\end{par} \vspace{1em}

\subsection*{High-Level Steps}

\begin{enumerate}
\setlength{\itemsep}{-1ex}
   \item If necessary, re-compute cached variables
   \item Compute predicted mean and inv(s) times input-output covariance
   \item Compute predictive covariance matrix, non-central moments
   \item Centralize moments
   \item Vectorize derivatives
\end{enumerate}

\begin{lstlisting}
function [M, S, V, dMdm, dSdm, dVdm, dMds, dSds, dVds, dMdi, dSdi, dVdi, ...
  dMdt, dSdt, dVdt, dMdX, dSdX, dVdX] = gp2d(gpmodel, m, s)
\end{lstlisting}

\subsection*{Code}

\begin{lstlisting}
input = gpmodel.inputs;  target = gpmodel.targets; X = gpmodel.hyp;

if nargout < 4; [M, S, V] = gp2(gpmodel, m, s); return; end

persistent K iK oldX oldIn oldOut beta oldn;           % cache some variables
D = size(input,2);         % number of examples and dimension of input space
[n, E] = size(target);               % number of examples and number of outputs
X = reshape(X, D+2, E);

% 1) If necessary, re-compute cached variables
if numel(X) ~= numel(oldX) || isempty(iK) ||  n ~= oldn || ...
    sum(any(X ~= oldX)) || sum(any(oldIn ~= input)) || ...
    sum(any(oldOut ~= target))
  oldX = X; oldIn = input; oldOut = target; oldn = n;
  K = zeros(n,n,E); iK = K; beta = zeros(n,E);

  % compute K and inv(K) and beta
  for i=1:E
    inp = bsxfun(@rdivide,input,exp(X(1:D,i)'));
    K(:,:,i) = exp(2*X(D+1,i)-maha(inp,inp)/2);
    if isfield(gpmodel,'nigp')
      L = chol(K(:,:,i) + exp(2*X(D+2,i))*eye(n) + diag(gpmodel.nigp(:,i)))';
    else
      L = chol(K(:,:,i) + exp(2*X(D+2,i))*eye(n))';
    end
    iK(:,:,i) = L'\(L\eye(n));
    beta(:,i) = L'\(L\gpmodel.targets(:,i));
  end

end

% initializations
k = zeros(n,E); M = zeros(E,1); V = zeros(D,E); S = zeros(E);
dMds = zeros(E,D,D); dSdm = zeros(E,E,D); r = zeros(1,D);
dSds = zeros(E,E,D,D); dVds = zeros(D,E,D,D); T = zeros(D);
tlbdi = zeros(n,D); dMdi = zeros(E,n,D); dMdt = zeros(E,n,E);
dVdt = zeros(D,E,n,E); dVdi = zeros(D,E,n,D); dSdt = zeros(E,E,n,E);
dSdi = zeros(E,E,n,D); dMdX = zeros(E,D+2,E); dSdX = zeros(E,E,D+2,E);
dVdX = zeros(D,E,D+2,E); Z = zeros(n,D);
bdX = zeros(n,E,D); kdX = zeros(n,E,D+1);

% centralize training inputs
inp = bsxfun(@minus,input,m');

% 2) compute predicted mean and input-output covariance
for i = 1:E
  % first some useful intermediate terms
  K2 = K(:,:,i)+exp(2*X(D+2,i))*eye(n);                         % K + sigma^2*I
  inp2 = bsxfun(@rdivide,input,exp(X(1:D,i)'));
  ii = bsxfun(@rdivide,input,exp(2*X(1:D,i)'));
  R = s+diag(exp(2*X(1:D,i)));
  L = diag(exp(-X(1:D,i)));
  B = L*s*L+eye(D); iR = L/B*L;
  t = inp*iR;
  l = exp(-sum(t.*inp,2)/2); lb = l.*beta(:,i);
  tliK = t'*bsxfun(@times,l,iK(:,:,i));
  liK = K2\l;
  tlb = bsxfun(@times,t,lb);

  c = exp(2*X(D+1,i))/sqrt(det(R))*exp(sum(X(1:D,i)));
  detdX = diag(bsxfun(@times,det(R)*iR',2.*exp(2.*X(1:D,i))));    % d(det R)/dX
  cdX = -0.5*c/det(R).*detdX'+ c.*ones(1,D);       % derivs w.r.t length-scales
  dldX = bsxfun(@times,l,bsxfun(@times,t,2.*exp(2*X(1:D,i)')).*t./2);

  M(i) = sum(lb)*c;                                            % predicted mean

  iK2beta = K2\beta(:,i);
  dMds(i,:,:) = c*t'*tlb/2-iR*M(i)/2;
  dMdX(i,D+2,i) = -c*sum(l.*(2*exp(2*X(D+2,i))*iK2beta));           % OK
  dMdX(i,D+1,i) = -dMdX(i,(i-1)*(D+2)+D+2);

  dVdX(:,i,D+2,i) = -((l.*(2*exp(2*X(D+2,i))*iK2beta))'*t*c)';
  dVdX(:,i,D+1,i) = -dVdX(:,i,D+2,i);

  dsi = -bsxfun(@times,inp2,2.*inp2);                 % d(sum(inp2.*inp2,2))/dX
  dslb = zeros(1,D);

  for d = 1:D
    sqdi = K(:,:,i).*bsxfun(@minus,ii(:,d),ii(:,d)');
    sqdiBi = sqdi*beta(:,i);
    tlbdi(:,d) = sqdi*liK.*beta(:,i) + sqdiBi.*liK;
    tlbdi2 = -tliK*(-bsxfun(@times,sqdi,beta(:,i))'-diag(sqdiBi));
    dVdi(:,i,:,d) = c*(iR(:,d)*lb' - bsxfun(@times,t,tlb(:,d))' + tlbdi2);
    dsqdX = bsxfun(@plus,dsi(:,d),dsi(:,d)') + 4.*inp2(:,d)*inp2(:,d)';
    dKdX = -K(:,:,i).*dsqdX./2;                               % dK/dX(1:D)
    dKdXbeta = dKdX*beta(:,i);
    bdX(:,i,d) = -K2\dKdXbeta;                        % dbeta/dX
    dslb(d) = -liK'*dKdXbeta + beta(:,i)'*dldX(:,d);
    dlb = dldX(:,d).*beta(:,i) + l.*bdX(:,i,d);
    dtdX = inp*(-bsxfun(@times,iR(:,d),2.*exp(2*X(d,i))*iR(d,:)));
    dlbt = lb'*dtdX + dlb'*t;
    dVdX(:,i,d,i) = (dlbt'*c + cdX(d)*(lb'*t)');
  end % d

  dMdi(i,:,:) = c*(tlbdi - tlb);
  dMdt(i,:,i) = c*liK';
  dMdX(i,1:D,i) = cdX.*sum(beta(:,i).*l) + c.*dslb;
  v = bsxfun(@rdivide,inp,exp(X(1:D,i)'));
  k(:,i) = 2*X(D+1,i)-sum(v.*v,2)/2;
  V(:,i) = t'*lb*c;                                   % input-output covariance

  for d = 1:D
    dVds(d,i,:,:) = c*bsxfun(@times,t,t(:,d))'*tlb/2 - iR*V(d,i)/2 ...
      - V(:,i)*iR(d,:)/2 -iR(:,d)*V(:,i)'/2;
    kdX(:,i,d) = bsxfun(@times,v(:,d),v(:,d));
  end % d

  dVdt(:,i,:,i) = c*tliK;
  kdX(:,i,D+1) = 2*ones(1,n);                       % pre-computation for later

end % i
dMdm = V';                                                % derivatives w.r.t m
dVdm = 2*permute(dMds,[2 1 3]);

% 3) predictive covariance matrix (non-central moments)
for i = 1:E
  K2 = K(:,:,i)+exp(2*X(D+2,i))*eye(n);
  ii = bsxfun(@rdivide,inp,exp(2*X(1:D,i)'));

  for j = 1:i % if i==j: diagonal elements of S; see Marc's thesis around eq. (2.26)
    R = s*diag(exp(-2*X(1:D,i))+exp(-2*X(1:D,j)))+eye(D); t = 1./sqrt(det(R));
    if rcond(R) < 1e-15; fprintf('R-matrix in gp2d ill-conditioned'); keyboard; end
    iR = R\eye(D);
    ij = bsxfun(@rdivide,inp,exp(2*X(1:D,j)'));
    L = exp(bsxfun(@plus,k(:,i),k(:,j)')+maha(ii,-ij,R\s/2)); % called Q in thesis
    A = beta(:,i)*beta(:,j)'; A = A.*L; ssA = sum(sum(A));
    S(i,j) = t*ssA; S(j,i) = S(i,j);

    zzi = ii*(R\s);
    zzj = ij*(R\s);
    zi = ii/R; zj = ij/R;

    tdX  = -0.5*t*sum(iR'.*bsxfun(@times,s,-2*exp(-2*X(1:D,i)')-2*exp(-2*X(1:D,i)')));
    tdXi = -0.5*t*sum(iR'.*bsxfun(@times,s,-2*exp(-2*X(1:D,i)')));
    tdXj = -0.5*t*sum(iR'.*bsxfun(@times,s,-2*exp(-2*X(1:D,j)')));
    bLiKi = iK(:,:,j)*(L'*beta(:,i)); bLiKj = iK(:,:,i)*(L*beta(:,j));

    Q2 = R\s/2;
    aQ = ii*Q2; bQ = ij*Q2;

    for d = 1:D

      Z(:,d) = exp(-2*X(d,i))*(A*zzj(:,d) + sum(A,2).*(zzi(:,d) - inp(:,d)))...
        + exp(-2*X(d,j))*((zzi(:,d))'*A + sum(A,1).*(zzj(:,d) - inp(:,d))')';
      Q = bsxfun(@minus,inp(:,d),inp(:,d)');
      B = K(:,:,i).*Q;
      Z(:,d) = Z(:,d)+exp(-2*X(d,i))*(B*beta(:,i).*bLiKj+beta(:,i).*(B*bLiKj));

      if i~=j; B = K(:,:,j).*Q; end

      Z(:,d) = Z(:,d)+exp(-2*X(d,j))*(bLiKi.*(B*beta(:,j))+B*bLiKi.*beta(:,j));
      B = bsxfun(@plus,zi(:,d),zj(:,d)').*A;
      r(d) = sum(sum(B))*t;
      T(d,1:d) = sum(zi(:,1:d)'*B,2) + sum(B*zj(:,1:d))';
      T(1:d,d) = T(d,1:d)';

      if i==j
        RTi =  bsxfun(@times,s,(-2*exp(-2*X(1:D,i)')-2*exp(-2*X(1:D,j)')));
        diRi = -R\bsxfun(@times,RTi(:,d),iR(d,:));
      else
        RTi = bsxfun(@times,s,-2*exp(-2*X(1:D,i)'));
        RTj = bsxfun(@times,s,-2*exp(-2*X(1:D,j)'));
        diRi = -R\bsxfun(@times,RTi(:,d),iR(d,:));
        diRj = -R\bsxfun(@times,RTj(:,d),iR(d,:));
        QdXj = diRj*s/2; % dQ2/dXj
      end

      QdXi = diRi*s/2; % dQ2/dXj

      if i==j
        daQi = ii*QdXi + bsxfun(@times,-2*ii(:,d),Q2(d,:)); % d(ii*Q)/dXi
        dsaQi = sum(daQi.*ii,2) - 2.*aQ(:,d).*ii(:,d); dsaQj = dsaQi;
        dsbQi = dsaQi; dsbQj = dsbQi;
        dm2i = -2*daQi*ii' + 2*(bsxfun(@times,aQ(:,d),ii(:,d)')...
          +bsxfun(@times,ii(:,d),aQ(:,d)')); dm2j = dm2i; % -2*aQ*ij'/di
      else
        dbQi = ij*QdXi;  % d(ij*Q)/dXi
        dbQj = ij*QdXj + bsxfun(@times,-2*ij(:,d),Q2(d,:)); % d(ij*Q)/dXj
        daQi = ii*QdXi + bsxfun(@times,-2*ii(:,d),Q2(d,:)); % d(ii*Q)/dXi
        daQj = ii*QdXj; % d(ii*Q)/dXj

        dsaQi = sum(daQi.*ii,2) - 2.*aQ(:,d).*ii(:,d);
        dsaQj = sum(daQj.*ii,2);
        dsbQi = sum(dbQi.*ij,2);
        dsbQj = sum(dbQj.*ij,2) - 2.*bQ(:,d).*ij(:,d);
        dm2i = -2*daQi*ij'; % second part of the maha(..) function wrt Xi
        dm2j = -2*ii*(dbQj)'; % second part of the maha(..) function wrt Xj
      end

      dm1i = bsxfun(@plus,dsaQi,dsbQi'); % first part of the maha(..) function wrt Xi
      dm1j = bsxfun(@plus,dsaQj,dsbQj'); % first part of the maha(..) function wrt Xj
      dmahai = dm1i-dm2i;
      dmahaj = dm1j-dm2j;

      if i==j
        LdXi = L.*(dmahai + bsxfun(@plus,kdX(:,i,d),kdX(:,j,d)'));
        dSdX(i,i,d,i) = beta(:,i)'*LdXi*beta(:,j);
      else
        LdXi = L.*(dmahai + bsxfun(@plus,kdX(:,i,d),zeros(n,1)'));
        LdXj = L.*(dmahaj + bsxfun(@plus,zeros(n,1),kdX(:,j,d)'));
        dSdX(i,j,d,i) = beta(:,i)'*LdXi*beta(:,j);
        dSdX(i,j,d,j) = beta(:,i)'*LdXj*beta(:,j);
      end

    end % d

    if i==j
      dSdX(i,i,1:D,i) = reshape(dSdX(i,i,1:D,i),D,1) + reshape(bdX(:,i,:),n,D)'*(L+L')*beta(:,i);
      dSdX(i,i,1:D,i) = reshape(t*dSdX(i,i,1:D,i),D,1)' + tdX*ssA;
      dSdX(i,i,D+2,i) = 2*exp(2*X(D+2,i))*t*(-sum(beta(:,i).*bLiKi)-sum(beta(:,i).*bLiKi));
    else
      dSdX(i,j,1:D,i) = reshape(dSdX(i,j,1:D,i),D,1) + reshape(bdX(:,i,:),n,D)'*(L*beta(:,j));
      dSdX(i,j,1:D,j) = reshape(dSdX(i,j,1:D,j),D,1) + reshape(bdX(:,j,:),n,D)'*(L'*beta(:,i));
      dSdX(i,j,1:D,i) = reshape(t*dSdX(i,j,1:D,i),D,1)' + tdXi*ssA;
      dSdX(i,j,1:D,j) = reshape(t*dSdX(i,j,1:D,j),D,1)' + tdXj*ssA;
      dSdX(i,j,D+2,i) = 2*exp(2*X(D+2,i))*t*(-beta(:,i)'*bLiKj);
      dSdX(i,j,D+2,j) = 2*exp(2*X(D+2,j))*t*(-beta(:,j)'*bLiKi);
    end

    dSdm(i,j,:) = r - M(i)*dMdm(j,:)-M(j)*dMdm(i,:); dSdm(j,i,:) = dSdm(i,j,:);
    T = (t*T-S(i,j)*diag(exp(-2*X(1:D,i))+exp(-2*X(1:D,j)))/R)/2;
    T = T - reshape(M(i)*dMds(j,:,:) + M(j)*dMds(i,:,:),D,D);
    dSds(i,j,:,:) = T; dSds(j,i,:,:) = T;

    if i==j
      dSdt(i,i,:,i) = (beta(:,i)'*(L+L'))/(K2)*t ...
        - 2*dMdt(i,:,i)*M(i);
      dSdX(i,j,:,i) = reshape(dSdX(i,j,:,i),1,D+2) - M(i)*dMdX(j,:,j)-M(j)*dMdX(i,:,i);
    else
      dSdt(i,j,:,i) = (beta(:,j)'*L')/(K2)*t ...
        - dMdt(i,:,i)*M(j);
      dSdt(i,j,:,j) = beta(:,i)'*L/(K(:,:,j)+exp(2*X(D+2,j))*eye(n))*t ...
        - dMdt(j,:,j)*M(i);
      dSdt(j,i,:,:) = dSdt(i,j,:,:);
      dSdX(i,j,:,j) = reshape(dSdX(i,j,:,j),1,D+2) - M(i)*dMdX(j,:,j);
      dSdX(i,j,:,i) = reshape(dSdX(i,j,:,i),1,D+2) - M(j)*dMdX(i,:,i);
    end

    dSdi(i,j,:,:) = Z*t - reshape(M(i)*dMdi(j,:,:) + dMdi(i,:,:)*M(j),n,D);
    dSdi(j,i,:,:) = dSdi(i,j,:,:);
    dSdX(j,i,:,:) = dSdX(i,j,:,:);
  end % j

  S(i,i) = S(i,i) + 1e-06;    % add small diagonal jitter for numerical reasons
end % i

dSdX(:,:,D+1,:) = -dSdX(:,:,D+2,:);
dSdX(:,:,D+1,:) = -dSdX(:,:,D+2,:);

% 4) centralize moments
S = S - M*M';
%S(diag(S)<0,diag(S)<0) = 1e-6;

% 5) Vectorize derivatives
dMds=reshape(dMds,[E D*D]);
dSdm=reshape(dSdm,[E*E D]); dSds=reshape(dSds,[E*E D*D]);
dVdm=reshape(dVdm,[D*E D]); dVds=reshape(dVds,[D*E D*D]);
dMdi=reshape(dMdi,E,[]);  dMdt=reshape(dMdt,E,[]);  dMdX=reshape(dMdX,E,[]);
dSdi=reshape(dSdi,E*E,[]);dSdt=reshape(dSdt,E*E,[]);dSdX=reshape(dSdX,E*E,[]);
dVdi=reshape(dVdi,D*E,[]);dVdt=reshape(dVdt,D*E,[]);dVdX=reshape(dVdX,D*E,[]);
\end{lstlisting}


\section{Aimed Attack}\label{maneuver:aimedAttack}
\textbf{Cost:} 100 CP\\
\textbf{Requirements:} 3 Dexterity\\
\textbf{Maneuver, Active, Repeatable, Source(100 Gold)}\\
When making a weapon attack based on Dexterity, you can increase the AP cost of the attack by up to 3.
If you do, the attack roll and the damage are increased by this value.\\
If the attack is ranged, this increase is doubled.\\
\\
Level Progression:\\
\\
\rowcolors{2}{lightgray}{white}
\begin{tabular}{l | l | l | l}
	Level & Cost & Requires & Effect\\
	II & 500 & 6 Dexterity & Up to 6 points.\\
	III & 2500 & 9 Dexterity & Up to 9 points.\\
	IV & 7500 & 12 Dexterity & Up to 12 points.\\
\end{tabular}