  Whereas in standard quantum state tomography one estimates an unknown state
by performing various measurements with known devices, and whereas in detector
tomography one estimates the POVM elements of a measurement device by
subjecting to it various known states, we consider here the case of SPAM (state
preparation and measurement) tomography where neither the states nor the
measurement device are assumed known. For $d$-dimensional systems measured by
$d$-outcome detectors, we find there are at most $d^2(d^2-1)$ "gauge"
parameters that can never be determined by any such experiment, irrespective of
the number of unknown states and unknown devices. For the case $d=2$ we find
new gauge-invariant quantities that can be accessed directly experimentally and
that can be used to detect and describe SPAM errors. In particular, we identify
conditions whose violations detect the presence of correlations between SPAM
errors. From the perspective of SPAM tomography, standard quantum state
tomography and detector tomography are protocols that fix the gauge parameters
through the assumption that some set of fiducial measurements is known or that
some set of fiducial states is known, respectively.
