I am trying to calculate the distance between sets of vectors. To do this I can create a SwapTest circuit (described here on page 34) and encode a feature vector with a U3 gate, then apply H and CSWAP gates to calculate the overlap. When your feature vectors are length 3 this seems fairly easy, as this can be encoded entirely by one U3. Each U3 parameter will represent a feature. I've done this with vectors of length 2, and have used the overlap as a measure to decide which 2 vectors are "closest".
However, what if we add a 4th or 5th or 10th feature? I imagine we could then also use a second qubit, encode the 5 features over two U3 gates. However, I have trouble seeing how to construct the rest of the circuit.
If we take two states, A and B, each with 6 features we could split this over 2 U3 gates each. Do we perform the "normal" SwapTest on each half of each state. Ie, find the overlap of the upper half of A and the upper half of B, then do the same for the lower half? This seems reasonable, but how would I be able to combine this into 1 value I can use to compare to another set of vectors?