2

New to quantum and ran into the block-encoding. Having a bit of trouble understanding $|0\rangle \otimes I$. $|0\rangle$ is just a vector but $I$ is an $n\times n$ matrix? Not clear how vector can be tensored with a matrix? I know I am missing something here. Any help could be appreciated.

enter image description here

Frederik vom Ende
  • 4,163
  • 3
  • 12
  • 49
John Parker
  • 1,181
  • 6
  • 15

2 Answers2

2

This is probably best done with an example. Let's consider a $4\times 4$ matrix $U$ which acts on two qubits. The $|0\rangle\otimes I$ is equivalent to $$ \left(\begin{array}{c} 1 \\ 0 \end{array}\right)\otimes\left(\begin{array}{cc} 1 & 0 \\ 0 & 1 \end{array}\right)=\left(\begin{array}{cc} 1 & 0 \\ 0 & 1 \\ 0 & 0 \\ 0 & 0 \end{array}\right) $$ (if you don't know where this comes from, go back to the definition of the tensor product). This is a $4\times 2$ matrix, meaning it's the right size for you to pre-multiply by $U$. Similarly, $$ \langle 0|\otimes I\equiv \left(\begin{array}{cccc} 1 & 0 & 0 & 0 \\ 0 & 1 & 0 & 0 \end{array}\right) $$ so that, overall your matrix $A$ comes out as $2\times 2$ (it's the action of what happens to the second qubit if the first qubit starts and ends in state $|0\rangle$).

DaftWullie
  • 62,671
  • 4
  • 55
  • 140
0

Firstly, note that if $A\in\mathbb{C}^{a,b}$ and $B\in\mathbb{C}^{c,d}$, then $A\otimes B\in\mathbb{C}^{ac,bd}$, and there are no restrictions on performing that tensor product. If $U$ is any unitary on $n+1$ qubits, we know we can write it as, $$U = \sum_{i,j\in\{0,1\}}|i\rangle\langle j| \otimes B_{ij} ~~-(*)$$ for some $B_{ij}$. Now if assume that $U$ is a block encoding of the matrix $A$, then the definition basically says that

$$U = |0\rangle\langle0| \otimes A + \dots$$ which is equvalent to the fact that $(\langle 0| \otimes I)U(|0\rangle \otimes I)) = A$ as needed. Thus, $\mathcal{P}(\cdot) := (\langle 0| \otimes I)\cdot(|0\rangle \otimes I))$ just projects onto (picks out) the $B_{00}$ element in $(*)$.