Does anyone know how you can obtain a new state |z>
from two pre-existing states |x>
and |y>
using the Tensor product in Q#
? i.e. |z> = |x> ⊗|y>
?
Thanks in advance for the help!
Edit: for clarity, the states that I am working with are
$|x\rangle = \frac{1}{\sqrt{2}} \sum^{3}_{j=0} \sin \frac{\pi (j + 0.5)}{4} |j\rangle$
$|y\rangle = \sum^{1}_{i=0} b_i |i\rangle$
where the $b_i$'s are just real numbers.
Qubit
objects, not states. So if you have twoQubit
objects and they are not entangled, then essentially they are already in a tensor product state. $\endgroup$Qubit
objects :Qubit[2]
andQubit[1]
and used thePrepareArbitraryState
operation in order to map those qubits to the states|x>
and|y>
(I edited the question so you can see how my states look like). Now I want to encode in a new variable of typeQubit[]
the result of the tensor product between|x>
and|y>
. $\endgroup$Qubit[3]
array and put all three qubits in there. Just putting them in an array is enough, you don't need to do anything special. $\endgroup$