 | \textit{The quantum circuits.} (\textbf{a}) Data encoding circuit $U(x)$, for a data point $x$, that implements the feature map of the unsupervised kernel machine and is used to define the quantum kernel $k(x_i,x_j) = \left|{\braket{0|U^\dagger(x_i) U(x_j)|0}}\right|^2$, where $G(\theta,\phi,\lambda)\in\text{SU(2)}$ is a universal 1-qubit gate, and $x_i$, for $i=0,1,\dots, n$, denotes the elements of the input feature vector $x$. The entanglement gates correspond to CNOT gates. (\textbf{b}) Quantum distance calculation circuit used to compute the similarity between an input sample and a cluster center in the QK-means algorithm. The prepared $\ket{\psi}$ and $\ket{\phi}$ states depend on the input feature vectors (Methods). |