  The actual gate performed on, say, a qubit in a quantum computer may depend,
not just on the actual laser pulses and voltages we programmed to implement the
gate, but on its {\em context} as well. For example, it may depend on what gate
has just been applied to the same qubit, or on how much a long series of
previous laser pulses has been heating up the qubit's environment. This paper
analyzes several tests to detect such context-dependent errors (which include
various types of non-Markovian errors). A key feature of these tests is that
they are robust against both state preparation and measurement (SPAM) errors
and gate-dependent errors. Since context-dependent errors are expected to be
small in practice, it becomes important to carefully analyze the effects of
statistical fluctuations and so we investigate the power and precision of our
tests as functions of the number of repetitions and the length of the sequences
of gates. From our tests an important quantity emerges: the logarithm of the
determinant (log-det) of a probability (relative frequency) matrix
$\mathcal{P}.$ For this reason, we derive the probability distribution of the
log-det estimates which we then use to examine the performance of our tests for
various single- and two-qubit sets of measurements and initial states. Finally,
we emphasize the connection between the log-det and the degree of reversibility
(the unitarity) of a context-independent operation.
