2

I'm having an issue with some outer & Kronecker products where I am doing two different processes which should result in the same answer, but I'm getting a different answer for each. Can anyone tell me where I'm going wrong?

I have the following:

$A = \begin{bmatrix}1\\0\end{bmatrix}$
$B = \begin{bmatrix}1\\0\end{bmatrix}$
$H = \begin{bmatrix}1&1\\1&-1\end{bmatrix}*\frac{1}{\sqrt{2}}$


The first process is: $Vec((H*A)\otimes B)$

$H*A = \begin{bmatrix}\frac{1}{\sqrt{2}}\\\frac{1}{\sqrt{2}}\end{bmatrix}$

Taking the outer product with the $B$ vector:

$\begin{bmatrix}\frac{1}{\sqrt{2}}\\\frac{1}{\sqrt{2}}\end{bmatrix} * \begin{bmatrix}1&0\end{bmatrix} = \begin{bmatrix}\frac{1}{\sqrt{2}}&0\\\frac{1}{\sqrt{2}}&0\end{bmatrix}$

Vectorizing that, we get:

$\begin{bmatrix}\frac{1}{\sqrt{2}}\\\frac{1}{\sqrt{2}}\\0\\0\end{bmatrix}$


The second process is: $(H\otimes I)*Vec(A\otimes B)$

$H\otimes I = \begin{bmatrix}1&0&1&0\\0&1&0&1\\1&0&-1&0\\0&1&0&-1\end{bmatrix}*\frac{1}{\sqrt{2}}$

$Vec(A\otimes B) = \begin{bmatrix}1\\0\\0\\0\end{bmatrix}$

Multiplying them together we get:

$\begin{bmatrix}\frac{1}{\sqrt{2}}\\0\\\frac{1}{\sqrt{2}}\\0\end{bmatrix}$

Can anyone see where I've mis-stepped? I'm pretty sure the second process comes up with the correct answer and that the first process is somehow incorrect.

I'm trying to do the first step to making a Bell state to give some context. The next step would be the CNOT gate.

Thanks!!

EDIT: It turns out that I'm having the same problem as this person was: Kronecker product and outer product confusion

Alan Wolfe
  • 1,299

1 Answers1

1

You said:

Taking the outer product with the B vector: $\begin{bmatrix}\frac{1}{\sqrt{2}}\\\frac{1}{\sqrt{2}}\end{bmatrix} \otimes \begin{bmatrix}1&0\end{bmatrix} = \begin{bmatrix}\frac{1}{\sqrt{2}}&0\\\frac{1}{\sqrt{2}}&0\end{bmatrix}$

But in your case $B=\begin{bmatrix}1\\ 0\end{bmatrix},$ so it should have been

$$\begin{bmatrix}\frac{1}{\sqrt{2}}\\\frac{1}{\sqrt{2}}\end{bmatrix} \otimes \begin{bmatrix}1\\ 0\end{bmatrix} = \begin{bmatrix}\frac{1}{\sqrt{2}}\\0\\\frac{1}{\sqrt{2}}\\0\end{bmatrix}.$$

Vectorization converts matrix to colum vector, but in your case $(H*A)\otimes B$ is already a vector, hence $Vec((H*A)\otimes B)=(H*A)\otimes B.$

Fallen Apart
  • 3,995
  • 2
  • 28
  • 42
  • For the first part, isn't outer (tensor) product of vectors $A*B^T$? If so, it seems like What I have is correct, that A is vertical and B is horizontal. Is that understanding wrong?

    For the second part, $(H*A)$ is a vector, and $B$ is a vector. Doesn't taking the outer product of vectors give a matrix, so i WOULD need to vectorize it?

    Thank you so much for your help!

    – Alan Wolfe Nov 02 '15 at 19:02
  • Updated my $\otimes$ to a * in the first section. Oops, thanks for pointing that out! With the operator fixed, i believe that is still the correct answer for the operation, although the value you get is the one I want! Wikipedia seems to agree w/ me, is that incorrect? https://en.wikipedia.org/wiki/Outer_product#Definition_.28matrix_multiplication.29 – Alan Wolfe Nov 02 '15 at 19:12
  • 1
    @AlanWolfe I see there is problem in notation. In wikipedia we have two definitions https://en.wikipedia.org/wiki/Outer_product and https://en.wikipedia.org/wiki/Kronecker_product . They are denoted the same, but act differently on column vectors (just compute). Everything would work out if we would treat $\otimes$ as kronecker product. But if we treat $\otimes$ as outer product in vector case and $\otimes$ as tensor product in $H\otimes I$ something do not seems to work. – Fallen Apart Nov 02 '15 at 19:14
  • Wow... I'm glad I'm not dumb / crazy. Thank you so much!! – Alan Wolfe Nov 02 '15 at 19:14