  This thesis consists of two parts. The first part is about how quantum theory
can be recovered from first principles, while the second part is about the
application of diagrammatic reasoning, specifically the ZX-calculus, to
practical problems in quantum computing. The main results of the first part
include a reconstruction of quantum theory from principles related to
properties of sequential measurement and a reconstruction based on properties
of pure maps and the mathematics of effectus theory. It also includes a
detailed study of JBW-algebras, a type of infinite-dimensional Jordan algebra
motivated by von Neumann algebras. In the second part we find a new model for
measurement-based quantum computing, study how measurement patterns in the
one-way model can be simplified and find a new algorithm for extracting a
unitary circuit from such patterns. We use these results to develop a circuit
optimisation strategy that leads to a new normal form for Clifford circuits and
reductions in the T-count of Clifford+T circuits.
