# How to use tensors and operators

I have some problem understanding how to use tensors. Let's say in Quantum Optics if I have the state in mode $$b$$ (where I can have two possible modes $$a$$ and $$b$$) $$|1_b\rangle = |0_a\rangle \otimes|1_b\rangle$$

And I want to obtain $$\langle1_b|\hat{a}^\dagger \hat{b}|1_b\rangle$$ do I proceed as follows?

$$\langle1_b|\hat{a}^\dagger \hat{b}|1_b\rangle = \langle1_b|\hat{b} \hat{a}^\dagger |1_b\rangle = \langle 0_a|\langle1_b|\hat{a}^\dagger \hat{b} |0_a\rangle |1_b\rangle = \sqrt{2} \langle0_a| \langle2_b| \hat{a}^\dagger |1_a\rangle |0_b \rangle$$

$$= 2 \langle 0_a| \langle 2_b|2_a \rangle | 0_b \rangle$$

And then what? Do I just do

$$= 2 \langle0_a|2_a\rangle \langle2_b|0_b\rangle = 2 \cdot 0 \cdot 0 = 0$$

A tensor product of two operators acting on a tensor product of two vectors will give you tensor product of two transformed vectors, this is one of the first things developed in axiomatic treatment of tensor product.

So if you have vector space $$A$$ a vector from that space $$|\psi\rangle_A \in A$$ and an operator $$\hat{a}^\dagger: A\to A$$

And you also have a vector space $$B$$ with a vector $$|\phi\rangle_B \in B$$ with operator $$\hat{b}: B\to B$$

The you can define a new tensor space $$A\otimes B$$ and a vector $$|\psi\rangle_A\otimes|\phi\rangle_B \in A \otimes B$$. You can also define a new operator $$\hat{a}^\dagger\otimes\hat{b}: A\otimes B\to A\otimes B$$.

The standard treatment of tensor product (https://en.wikipedia.org/wiki/Tensor_product) then gives:

$$\left(\hat{a}^\dagger\otimes\hat{b}\right)\left(|\psi\rangle_A\otimes|\phi\rangle_B\right)=\left(\hat{a}^\dagger|\psi\rangle_A\right)\otimes\left(\hat{b}|\phi\rangle_B\right)$$

Finally, if we drop all the $$\otimes$$ signs we get: $${}_{B}\langle \phi |{}_A\langle\psi|\hat{a}^\dagger\hat{b}|\psi\rangle_A|\phi\rangle_B=\langle \psi|\hat{a}^\dagger|\psi\rangle \langle \phi|\hat{b}|\phi\rangle$$

So the answer to your question would be $$\dots=\langle 0|\hat{a}^\dagger|0\rangle \langle 1|\hat{b}|1\rangle=0$$, I am not sure where you get all the $$2$$s from