Hey, I’m trying to perform a swap test on two quantum states that I’ve stored in two registers/ devices. I’ve initialized the devices as follows:

```
import pennylane as qml
from pennylane import numpy as np
from pennylane.templates import AmplitudeEmbedding
# define two random input vectors
inp1 = np.array([1,2])
inp2 = np.array([0,1])
qubit_number = int(np.ceil(np.log2(len(inp1))))
reg1 = qml.device('default.qubit', wires=qubit_number)
reg2 = qml.device('default.qubit', wires=qubit_number)
anc = qml.device('default.qubit', wires=1)
@qml.qnode(reg1)
def prepare_reg1(inp):
AmplitudeEmbedding(features=inp, wires=range(qubit_number), normalize=True, pad_with=0.)
return qml.expval(qml.PauliZ(0))
@qml.qnode(reg2)
def prepare_reg2(inp):
AmplitudeEmbedding(features=inp, wires=range(qubit_number), normalize=True, pad_with=0.)
return qml.expval(qml.PauliZ(0))
prepare_reg1(inp1)
prepare_reg2(inp2)
```

Now my question is, how do I perform the necessary CSWAP operations between my different registers/devices. Is there a way of concatenating the devices such that a swap test could be implemented, i.e generating a device in the state “|anc> @ |inp1> @ |inp2>”?

Thank you!