  We construct a correspondence between quantum states and the observable
input-output correlations they are compatible with. The problem is framed as a
game involving an experimenter, claiming to be able to prepare some family of
states, and a theoretician, whose aim is to falsify such a claim based on
observed correlations only. For any such a claim, the optimal strategy consists
of providing: i) to the experimenter, all the measurements that generate
extremal input-output correlations, and ii) to the theoretician, the full
characterization of such correlations. Comparing the correlations observed in
i) with those predicted by ii) corresponds to device-independently testing the
states. While no assumption is made about the actual states and measurements,
we derive the optimal strategy in closed-form for the case when the claim
consists of qubit states and the performed measurements are tests, and as
applications we specify our results to the case of any pair of pure states and
to the case of pure states uniformly distributed on the Bloch equatorial plane.
