• K-Means

    Separating data into distinct clusters, organizing diverse information and simplifying complexity with vibrant clarity

  • Random Forest for Regression

    Combining decision trees, it provides predictive accuracy that illuminates the path to regression analysis

  • Support Vector Machines for Regression

    Leveraging mathematical precision, it excels in predicting values by carving precise pathways through data complexities

Tuesday, June 17, 2025

Bra-Ket (Dirac) Notation

In quantum mechanics, we can describe pure quantum states using an n-dimensional vector (also called a rank-1 tensor). This vector is written in Dirac notation as a ket and represents the complete information of the state: $$  \vert \Psi  \rangle  =  \begin{pmatrix} \alpha_1 \\ \vdots \\ \alpha_n \end{pmatrix} $$

Each component αi\alpha_i is a complex number that encodes both amplitude and phase. Physically, the squared magnitude αi2|\alpha_i|^2 gives the probability of finding the system in the corresponding basis state when a measurement is performed.

From this ket we can construct the corresponding bra, which belongs to the dual space. It is obtained by transposing the ket and taking the complex conjugate of every component: $$  \langle \Psi  \vert  =  \begin{pmatrix} \alpha_1^* & \cdots & \alpha_n^*  \end{pmatrix} $$ At first instance we can define some products using bras and kets, the inner product, outer product and tensor product.


Inner product

The inner product (or scalar product) combines a bra with a ket and yields a single complex number:  \begin{equation*} \langle \Psi  \vert \Psi  \rangle  =  \begin{pmatrix} \alpha_1^* & \cdots & \alpha_n^* \end{pmatrix} \begin{pmatrix} \alpha_1 \\ \vdots \\ \alpha_n \end{pmatrix} =  \alpha_1^*  \alpha_1 + \cdots \alpha_n^*  \alpha_n =  \vert \alpha_1 \vert ^2 + \cdots + \vert \alpha_n \vert ^2  \end{equation*}   

This corresponds to the squared norm of the state. For physical states, this value must equal 1, reflecting the fact that the total probability across all possible outcomes is always conserved.


Outer product

The outer product combines a ket with its corresponding bra, producing a matrix instead of a number: \begin{align*} \vert  \Psi \rangle \langle  \Psi  \vert  &=   \begin{pmatrix} \alpha_1 \\ \vdots \\ \alpha_n \end{pmatrix} \begin{pmatrix} \alpha_1^* & \cdots & \alpha_n^* \end{pmatrix} =  \begin{pmatrix}  \alpha_1  \alpha_1^* &  \alpha_1  \alpha_2^*  & \cdots &  \alpha_1  \alpha_n^* \\  \alpha_2  \alpha_1^* &  \alpha_2  \alpha_2^*  & \cdots &  \alpha_2  \alpha_n^* \\ \vdots & \vdots & \ddots & \vdots \\  \alpha_n  \alpha_1^* &  \alpha_n  \alpha_2^*  & \cdots &  \alpha_n  \alpha_n^* \end{pmatrix} \\ \\  &=   \begin{pmatrix}  \vert \alpha_1 \vert ^2 &  \alpha_1  \alpha_2^*  & \cdots &  \alpha_1  \alpha_n^* \\  \alpha_2  \alpha_1^* &  \vert \alpha_2 \vert ^2  & \cdots &  \alpha_2  \alpha_n^* \\ \vdots & \vdots & \ddots & \vdots \\  \alpha_n  \alpha_1^* &  \alpha_n  \alpha_2^*  & \cdots & \vert \alpha_n \vert ^2  \end{pmatrix} \end{align*}

This operator is fundamental in quantum mechanics. For example, it is used to represent projectors onto states and to build density matrices, which describe both pure and mixed states in quantum theory.


Tensor product

Finally, the tensor product (or Kronecker product) is the operation that allows us to combine two independent quantum systems into a larger one: $ \vert \alpha \rangle \otimes \vert \beta \rangle \equiv \vert \alpha \rangle \vert \beta \rangle \equiv  \vert \alpha , \beta \rangle \equiv  \vert \alpha \beta \rangle $. 

Supposing 2-dimensional kets $ \vert \alpha \rangle = \big(\begin{smallmatrix} \alpha_1 \\ \alpha_2 \end{smallmatrix}\big) $ and $\vert \beta \rangle = \big(\begin{smallmatrix} \beta_1 \\ \beta_2 \end{smallmatrix}\big) $ we can define the tensor product as:

\begin{align*} \vert \alpha \rangle \otimes \vert \beta \rangle  &=   \begin{pmatrix} \alpha_1 \\ \alpha_2 \end{pmatrix} \otimes \begin{pmatrix} \beta_1 \\ \beta_2 \end{pmatrix} =  \begin{pmatrix} \alpha_1 \begin{pmatrix} \beta_1 \\ \beta_2  \end{pmatrix} \\ \alpha_2  \begin{pmatrix} \beta_1 \\ \beta_2  \end{pmatrix} \end{pmatrix} = \begin{pmatrix} \alpha_1 \beta_1 \\  \alpha_1 \beta_2  \\  \alpha_2 \beta_1 \\  \alpha_2 \beta_2  \end{pmatrix}  \end{align*} 

The dimension of the resulting vector is the product of the dimensions of the original ones. This operation is the mathematical foundation for describing multi-particle systems and quantum entanglement.


Share:

About Me

My photo
I am an Engineering Physicist, graduated with academic excellence as the top of my class. I have experience programming in several languages, including C++, MATLAB, and especially Python. I have worked on projects in image and signal processing, as well as in machine learning and data analysis.

Recent Post

Field Quantization. Annihilation and Creation operators

Taking up the Hamiltonian equation from Field Quantization. Hamiltonian for a single-mode field \begin{equation} H = \frac{1}{2} \left( p^2 ...

Pages