  We study the problem of testing identity of a collection of unknown quantum
states given sample access to this collection, each state appearing with some
known probability. We show that for a collection of $d$-dimensional quantum
states of cardinality $N$, the sample complexity is $O(\sqrt{N}d/\epsilon^2)$,
which is optimal up to a constant. The test is obtained by estimating the mean
squared Hilbert-Schmidt distance between the states, thanks to a suitable
generalization of the estimator of the Hilbert-Schmidt distance between two
unknown states by B\u{a}descu, O'Donnell, and Wright
(https://dl.acm.org/doi/10.1145/3313276.3316344).
