# Can the SWAP test only compare registers with the same number of qubits?

I'm using the SWAP test circuit for implementing a qubit registers comparison

From the documentation I could find I've understood it can be applied to input qubits |$$\alpha\rangle$$ and |$$\beta\rangle$$ of the same size.

Is that really a constraint? Or it can be also applied to general cases of qubits of different size?

For $$|\alpha \rangle,|\beta\rangle$$ here, for the SWAP gate to make sense, they must be of the same dimensionality (in the operating Hilbert space), then only there is a meaningful correspondence for the SWAP to work.