  Certifying that quantum devices behave as intended is crucial for quantum
information science. Here, methods are developed for certification of both
state preparation devices and measurement devices based on prepare-and-measure
experiments with independent devices. The experimenter assumes the independence
of the devices and knowledge of the Hilbert space dimension. Thus no precise
characterisation of any part of the experiment is required. The certification
is based on a randomised version of unambiguous state discrimination and
targets the class of state ensembles corresponding to quantum $t$-designs of
any size and any dimension. These quantum designs are sets of states over which
the average of any $t$-degree polynomial equals its average over all pure
states, and they accommodate many of the most useful discrete structures in
quantum information processing. Furthermore, it is shown that the same
experiments also certify the detection efficiency of the measurement devices,
as well as their non-projective nature. The presented methods can readily be
implemented in experiments.
