# Calculating the product between two bra vectors

Let |Y> and |S> be two unitary (quantum gates) such that

|Y> = [0  -i;  i  0]
|S> = [1  0;  0  i]

• Does there exist a product or operation <YS|?
• If yes, what is this operation called and how to calculate this?

• Welcom to QC! I'm interested in this question not so much because of the content, but more because of the notation. What notes are you using for studying the topic?
– R.W
Jul 25 at 8:21
• I am using Introduction to Classical and Quantum Computing by Thomas Wong. Jul 25 at 8:23
• As in your table, you can define tensor product of two bras. Jul 25 at 8:25

It seems that you misunderstood the table. The notation you are asking about, i.e. $$|S\rangle$$ and $$|Y\rangle$$, is called Dirac bra-ket notation and it is used for row and column vectors with generally $$n$$ complex inputs. Symbol $$|S\rangle$$ is a column vector (ket), wheras $$\langle S|$$ is a row vector (bra). An expression $$\langle Y|S\rangle$$ means an inner product of the both vectors and the result is a number (scalar value). On the other hand expression $$|S\rangle\langle Y|$$ result in matrix of type $$n \times n$$. Of course, you can define tensor product between the vectors, e.g. $$|Y\rangle \otimes |S\rangle$$, resulting in column vector with $$n^2$$ complex numbers. Note that in tensor product number of the vector members can differ between the vectors, i.e. $$|Y\rangle$$ has $$n$$ members and $$|S\rangle$$ has $$m$$ members, the final tensor product $$|Y\rangle \otimes |S\rangle$$ will have $$mn$$ members. The tensor product works similarly for $$\langle Y| \otimes \langle S|$$, but in this case we work with row vectors. Finally note that tensor product is not comutative operation, i.e. $$|Y\rangle \otimes |S\rangle \ne |S\rangle \otimes |Y\rangle$$
To use upper case letters for vector is rather unfortunate as these letters are used for quantum gates. Vectors are denoted with lower case letters of Latin or Greek alphabet. This probably confuses you. So in your case $$|S\rangle$$ is a vector, not the $$S$$ (phase) gate. The same holds for $$|Y\rangle$$ - again vector not the Pauli $$Y$$ gate.