  This paper presents a novel way to use the algebra of unit quaternions to
express arbitrary roots or fractional powers of single-qubit gates, and to use
such fractional powers as generators for algebras that combine these fractional
input signals, behaving as a kind of nonlinear addition. The method works by
connecting several well-known equivalences. The group of all single-qubit gates
is $U(2)$, the unitary transformations of $C^2$. Using an appropriate phase
multiplier, every element of $U(2)$ can be mapped to a corresponding element of
$SU(2)$ with unit determinant, whose quantum mechanical behavior is identical.
The group $SU(2)$ is isomorphic to the group of unit quaternions. Powers and
roots of unit quaternions can be constructed by extending de Moivre's theorem
for roots of complex numbers to the quaternions by selecting a preferred square
root of -1. Using this chain of equivalences, for any single-qubit gate $A$ and
real exponent $k$, a gate $B$ can be predictably constructed so that $B^k = A$.
Different fractions generated in this way can be combined by connecting the
individually rotated qubits to a common 'sum' qubit using 2-qubit CNOT gates.
Examples of such algebras are explored including those generated by roots of
the quaternion $k$ (which corresponds to and $X$-rotation of the Bloch sphere),
the quaternion $\frac{\sqrt{2}}{2}(i + k)$ (which corresponds to the Hadamard
gate), and a mixture of these. One of the goals of this research is to develop
quantum versions of classical components such as the classifier ensembles and
activation functions used in machine learning and artificial intelligence. An
example application for text classification is presented, which uses fractional
rotation gates to represent classifier weights, and classifies new input by
using CNOT gates to collect the appropriate classifier weights in a
topic-scoring qubit.
