# Density operators and quantum tomography for optimizing a Bell parameter measurement in the graduate laboratory

Alban Leschallier de Lisle, Melissa Kleine, Nicolas Ombredane, Sébastien Massenot, Renaud Mathevet, Benoit Chalopin

► To cite this version:

Alban Leschallier de Lisle, Melissa Kleine, Nicolas Ombredane, Sébastien Massenot, Renaud Mathevet, et al.. Density operators and quantum tomography for optimizing a Bell parameter measurement in the graduate laboratory. American Journal of Physics, 2026, 94 (1), pp.33 - 39. 10.1119/5.0280007. hal-05482748

HAL Id: hal-05482748

https://hal.science/hal-05482748v1

Submitted on 5 Feb 2026

HAL is a multi-disciplinary open access
archive for the deposit and dissemination of sci-
entific research documents, whether they are pub-
lished or not. The documents may come from
teaching and research institutions in France or
abroad, or from public or private research centers.

L'archive ouverte pluridisciplinaire HAL, est
destinée au dépôt et à la diffusion de documents
scientifiques de niveau recherche, publiés ou non,
émanant des établissements d'enseignement et de
recherche français ou étrangers, des laboratoires
publics ou privés.

<figure><img src="image_1.png" /></figure>
# Density operators and quantum tomography for optimizing a Bell parameter measurement in the graduate laboratory

Alban Leschallier de Lisle,<fnref n="1" />,* Melissa Kleine,<fnref n="1" />,* Nicolas Ombredane,<fnref n="1" />,*

Sébastien Massenot,² Renaud Mathevet,<fnref n="1" /> and Benoit Chalopin<fnref n="1" />,†

¹LCAR, Université de Toulouse, CNRS (UMR 5589), France

²ISAE-SUPAERO, Université de Toulouse, France

We discuss how quantum state tomography of entangled photon pairs can be used in the lab as a natural follow-up to popular Bell inequalities experiments for graduate students and to introduce them to more advanced quantum concepts. In addition, we discuss how the measured density matrix can be used to quantitatively estimate the quantum state quality and optimize the Bell measurement to reach its maximum expected value for an arbitrary two-photon entangled state.

## I. INTRODUCTION

Bell inequalities experiments have become increasingly popular as a teaching tool to discuss quantum measurements and entanglement, a key resource in the rapidly developing field of quantum technologies. These experiments have been extensively described and discussed in Refs. [1–3]. Their classroom implementations almost always involve the generation of polarization-entangled photon pairs produced via the spontaneous parametric down-conversion process in two crossed nonlinear crystals pumped by a UV laser, usually in two-photon quantum state known as a Bell state:

$$|\psi_0\rangle = \frac{1}{\sqrt{2}} (|HH\rangle + |VV\rangle), \quad (1)$$

where the kets $|HH\rangle$ and $|VV\rangle$ describe both photons having a horizontal and vertical polarization, respectively.

Reproducing the Nobel-prize winning Bell-CHSH inequality [4] experiments can be very appealing for students, but many other experiments are also possible. These can make the difficult concepts of quantum mechanics more accessible and intuitive, illustrating operations in a Hilbert space (linear superpositions of $|HH\rangle$ and $|VV\rangle$ leading to entanglement), unitary evolution (wave-plates and phase shifts) and the projective nature of quantum measurement [5].

Additionally, these experiments can help students understand the density operator and why it is needed to explain how experimental data differ from theory. The usual quantum mechanics formalism of state vectors in a Hilbert space only considers situations of perfect coherence (pure states). It is unable to take into account imperfections in the preparation, evolution or measurement of quantum states. At this stage of their curriculum, students may or may not have studied the density operator formalism. It is well known for being both technical and abstract. That's why we propose this practical approach to help them better understand this difficult theory.

The density matrix $\hat{\rho}$ describes the statistical state of a quantum system, including both pure and non-pure states which are also known as mixed states. Assuming that multiple copies of the same quantum state are prepared, the density matrix can be measured using quantum state tomography and then used to calculate all the properties of the system. Indeed, the expected value of any operator $\hat{A}$ is: $\langle \hat{A} \rangle = \text{Tr}(\hat{\rho}\hat{A})$, where Tr() stands for trace; that is, the sum of all diagonal elements of the matrix. For example, $\hat{\rho}$ has been introduced in classroom setting to quantify the performance of a quantum key distribution experiment [6]. Here, we discuss other fundamental concepts such as the effect of unresolved degrees of freedom, partial tracing to recover the individual state of each single photon, and the Bell-CHSH as an entanglement witness.<fnref n="1" /> As an illustrative example, we show how to generalize and optimize a Bell measurement with respect to the actual photon pair quantum state. This approach is therefore a natural upgrade of existing experiments in its theoretical, numerical, and experimental aspects. It can also illustrate how to properly describe the quality of a quantum state, which is essential in the context of quantum computing and quantum communications.

In our university, this has been taught so far to physics students at the Master level, starting with a few hours of lecture on quantum optics followed by experimental work in smaller groups (4 to 6 students) working on two identical prealigned experimental setups, with about 20 students in total every year. In the lab, students spend in total about 8 to 10 hours on the generation of Bell states, measurement of the Bell-CHSH parameter, and quantum state tomography. Additionally, several students have worked on improving the experiment and performing numerical calculations as semester-long projects or lab internships.

The article is organized as follows: Section II presents how to measure the density matrix of a two-photon po-

<footnote>* former graduate student</footnote>

<footnote>† benoit.chalopin@univ-tlse3.fr</footnote>

<footnote n="1">¹ There exist more reliable entanglement measures such as the negativity and the concurrence but for pedagogical reasons and as not to introduce too many concepts, we choose to focus solely on the Bell-CHSH parameter in this paper.</footnote>
larization state with quantum state tomography. Section III presents examples of how the density matrix can be interpreted and used for partial tracing over known and unknown degrees of freedom. Finally, in Section IV, we show how to use the density matrix to optimize the value of the Bell-CHSH parameter and demonstrate entanglement for a large class of states (beyond just Bell states).

## II. QUANTUM STATE TOMOGRAPHY

### A. Theory - one photon

The density operator $\hat{\rho}$ of a pure state $|\psi\rangle$ is the projector $\hat{\rho} = |\psi\rangle\langle\psi|$. A mixed state can be seen as a statistical mixture of pure states $|\psi_i\rangle$ with probabilities $p_i$:

$$ \hat{\rho} = \sum_i p_i |\psi_i\rangle\langle\psi_i|. \quad (2) $$

A single photon polarization state exists in a 2-dimensional complex Hilbert space, spanned by horizontal and vertical polarization states $|H\rangle$ and $|V\rangle$. In this space, $\hat{\rho}$ is written $\hat{\rho}_1$ and can be decomposed on the basis of Pauli operators $\hat{\sigma}_j$ with $j = 0$ to 3 and $\hat{\sigma}_0$ the identity operator [7]:

$$ \hat{\rho}_1 = \frac{1}{2} \sum_{j=0}^{3} S_j \hat{\sigma}_j. \quad (3) $$

In the $\{|H\rangle, |V\rangle\}$ basis, the Pauli matrices have the following form and eigenvectors with eigenvalues $\pm 1$:

$$ [\hat{\sigma}_1] = \begin{pmatrix} 0 & 1 \\ 1 & 0 \end{pmatrix} : \{|D\rangle, |A\rangle\}, \quad (4) $$

$$ [\hat{\sigma}_2] = \begin{pmatrix} 0 & -i \\ i & 0 \end{pmatrix} : \{|R\rangle, |L\rangle\}, \quad (5) $$

$$ [\hat{\sigma}_3] = \begin{pmatrix} 1 & 0 \\ 0 & -1 \end{pmatrix} : \{|H\rangle, |V\rangle\}, \quad (6) $$

where $|D\rangle = \frac{1}{\sqrt{2}}(|H\rangle + |V\rangle)$, $|A\rangle = \frac{1}{\sqrt{2}}(|H\rangle - |V\rangle)$, $|R\rangle = \frac{1}{\sqrt{2}}(|H\rangle + i|V\rangle)$ and $|L\rangle = \frac{1}{\sqrt{2}}(|H\rangle - i|V\rangle)$. This decomposition is both practical and in line with the classical representation of polarization states where the Stokes parameters $S_j$ satisfy $S_0 = 1$ and $\sum_{j=1}^3 S_j^2 \le 1$, the equality being reached only for completely polarized light.

Classically, $S_1$ is the difference in the transmission coefficients of the incoming beam through linear polarizers at 45° and -45° from the horizontal, $S_2$ through left and right handed circular polarizers, and $S_3$ through horizontal and vertical linear polarizers [8].

Meanwhile, $S_j = \langle\hat{\sigma}_j\rangle = \text{Tr}(\hat{\rho}_1\hat{\sigma}_j)$ is now interpreted as the expected value of the Pauli operator $\hat{\sigma}_j$ and can be expressed in terms of the probabilities of detecting photons in these eigenstates:

$$ S_1 = P_D - P_A, \quad S_2 = P_R - P_L, \quad S_3 = P_H - P_V. \quad (7) $$

The analogy with the classical approach is thus straightforward.

### B. Theory - two photons

The two-photon (or two-qubit) density operator $\hat{\rho}_2$ can similarly be decomposed onto the set of tensor products of Pauli matrices $\hat{\sigma}_j \otimes \hat{\sigma}_k$ with two-photon Stokes parameters $S_{j,k}$:

$$ \hat{\rho}_2 = \frac{1}{4} \sum_{j,k=0}^{3} S_{j,k} \hat{\sigma}_j \otimes \hat{\sigma}_k, \quad (8) $$

where, as in the one-photon case, $S_{j,k} = \langle\hat{\sigma}_j \otimes \hat{\sigma}_k\rangle$ and $S_{0,0} = 1$. For $j, k \ne 0$, these coefficients can be expressed in terms of probabilities of detecting the photons in eigenstates $|j_{\pm}\rangle \otimes |k_{\pm}\rangle$:

$$ S_{j,k} = P_{|j_+, k_+\rangle} - P_{|j_+, k_-\rangle} - P_{|j_-, k_+\rangle} + P_{|j_-, k_-\rangle}, \quad (9) $$

where $|j_{\pm}\rangle$ corresponds to the eigenvector of $\hat{\sigma}_j$ with eigenvalue $\pm 1$, and similarly for $|k_{\pm}\rangle$ and $\hat{\sigma}_k$. For instance, for $j = 1$ and $k = 2$:

$$ S_{1,2} = \langle\hat{\sigma}_1 \otimes \hat{\sigma}_2\rangle = P_{D,R} - P_{D,L} - P_{A,R} + P_{A,L}. \quad (10) $$

If one of the two indices is zero, say $j = 0$ associated with the first photon, then this photon can be measured in any base, for example $\{|D\rangle, |A\rangle\}$, by systematically assigning it the eigenvalue $+1$. For example:

$$ S_{0,2} = \langle\hat{\sigma}_0 \otimes \hat{\sigma}_2\rangle = P_{D,R} - P_{D,L} + P_{A,R} - P_{A,L}, \quad (11) $$

which generalizes easily to the other cases.

A typical experimental density matrix, expressed in the basis $\{|HH\rangle, |HV\rangle, |VH\rangle, |VV\rangle\}$, is depicted in Fig. 1. It is a complex-valued $4 \times 4$ Hermitian matrix, with real-valued diagonal elements and unit trace. It therefore has 15 independent real coefficients [7] that need to be determined experimentally.

### C. Experiment

Our setup for the generation of polarization-entangled photon pairs is similar to those described in other works [1, 3, 9]. The two-photon state measurements rely on coincidence countings and polarization optics. The apparatus includes independent linear polarizers oriented along arbitrary directions $\alpha$ and $\beta$, which allow the state projection onto the four linear polarization $|H\rangle, |V\rangle, |D\rangle$ and $|A\rangle$. Circular polarization analysis along $|R\rangle$ and $|L\rangle$ requires the use of additional quarter-wave plates. Since we need to measure the coincidences between the different bases for each photon, there are $6 \times 6 = 36$ possible measurements (each photon must be projected onto the $|H\rangle, |V\rangle, |D\rangle, |A\rangle, |R\rangle$ and $|L\rangle$ states). In our experiment,
<figure><img src="image_2.png" /><figcaption>FIG. 1. (Color online) Density matrix $\hat{\rho}_2$ of a typical two-photon entangled Bell state measured with students, expressed in the basis $\{|HH\rangle, |HV\rangle, |VH\rangle, |VV\rangle\}$. Bar heights represent the modulus of the matrix elements, whereas bar colors represent their phase. The figure was plotted with a custom Matplotlib function that can be found in the supplementary material.</figcaption></figure>

each measurement is performed over 10 s with an average of approximately 1000 detection events per second. These 36 count numbers $N_{jk}$ are normalized to retrieve probabilities and Stokes parameters. For instance:

$$S_{1,2} = \frac{N_{D,R} - N_{D,L} - N_{A,R} + N_{A,L}}{N_{D,R} + N_{D,L} + N_{A,R} + N_{A,L}}. \quad (12)$$

There is redundant information in the set of $N_{jk}$, and, in general, the reconstructed matrix contains residual noise and does not necessarily have the required mathematical properties of density matrices, such as unit trace. This calls for an extra numerical step. We use the program available from Paul Kwiat's group [10] which performs tomography with a maximum likelihood algorithm to get the result presented in Fig. 1. For simplicity, this step could be avoided and replaced by a normalization of the density matrix at the cost of reduced accuracy.

The density matrix can then be used to evaluate all the properties of the system. In the context of mixed states, two indicators are commonly used. First, the purity defined [11] as:

$$\mathcal{P} = \mathrm{Tr}(\hat{\rho}^2), \quad (13)$$

which is equal to 1 for a pure state $|\psi\rangle$ whose density operator is $|\psi\rangle\langle\psi|$. For mixed states in a d-dimensional Hilbert space, one has $1/d \le \mathcal{P} < 1$. Second, its fidelity with a given target state of density matrix $\hat{\tau}$ is defined [12] as

$$\mathcal{F} = \left( \mathrm{Tr}(\sqrt{\hat{\rho}} \hat{\tau} \sqrt{\hat{\rho}}) \right)^2. \quad (14)$$

This definition generalizes the commonly used definition for a pure state, $\mathcal{F} = |\langle\psi_0|\psi\rangle|^2$ [12] with $0 \le \mathcal{F} \le 1$. For the typical matrix $\hat{\rho}_2$ in Fig. 1, we compute a purity $\mathcal{P} = 0.81$ and a fidelity $\mathcal{F} = 0.88$ with the Bell state

$\hat{\tau}_0 = |\psi_0\rangle\langle\psi_0|$, which means the actual state is relatively close to $|\psi_0\rangle$. As for the direct measurement of the Bell-CHSH parameter, a Monte-Carlo simulation can be used in order to evaluate the uncertainty on the numerical values retrieved from the experimental data (in the spirit of [3] for the uncertainty on the Bell-CHSH parameter). It basically consists of evaluating the density matrix multiple times where experimental counts are individually replaced with random samplings using a Poisson distribution whose mean value equals the measured count for each of the 36 measurements. For our count rates, the uncertainties on the Bell-CHSH, fidelity and purity parameters are on the order or better than 1 %.

### III. INTERPRETING THE DENSITY MATRIX

The density operator is a powerful tool for quantum mechanics as it can be used to describe systems at different scales. One can embed a quantum system in a larger one, usually taking the role of the environment. Moreover, properties of a subsystem can be extracted from the density operator. We will now discuss these two aspects in the context of our two-photon polarization state.

#### A. Spectral phase

The purity $\mathcal{P}$ of the quantum state measured by students in our experiment never exceeded 0.85. This measurement can explain why the maximum value of $2\sqrt{2}$ for the Bell-CHSH parameter was never obtained in the experiment, reassuring students that the failure to achieve this theoretical value was not due to their own errors. In order to obtain a pure state, one would need the $|HH\rangle$ and $|VV\rangle$ components of the state superposition to be exactly indistinguishable and perfectly coherent with respect to their spatial and spectral mode. This requires that their relative phase is uniquely defined, which is difficult to achieve. As an example, since our single-photon detection is not wavelength-resolved, we model the two-photon density matrix by tracing over the photon wavelength $\lambda$. Namely,

$$\hat{\rho}_2 = \int \frac{d\lambda}{\Delta\lambda} f(\lambda) |\psi(\lambda)\rangle\langle\psi(\lambda)|, \quad (15)$$

with $f(\lambda)$ the normalized spectral intensity of the detected photons, and

$$|\psi(\lambda)\rangle = \frac{1}{\sqrt{2}} (|HH\rangle + e^{i\phi(\lambda)}|VV\rangle). \quad (16)$$

The spectral phase $\phi(\lambda)$ takes into account the optical dispersion and birefringence in the crystals as well as the spectral purity of the pump laser over the $\Delta\lambda = 10$ nm
spectral bandwidth of the detection. It leads to:

$$ \hat{\rho}_2 = \frac{1}{2} \begin{pmatrix} 1 & 0 & 0 & \eta^* \\ 0 & 0 & 0 & 0 \\ 0 & 0 & 0 & 0 \\ \eta & 0 & 0 & 1 \end{pmatrix} \quad \text{with } \eta = \int \frac{d\lambda}{\Delta\lambda} f(\lambda) e^{i\phi(\lambda)}. \quad (17) $$

This toy model deliberately simplifies experimental conditions, for instance it leaves out the spatial contribution of different wave-vectors $\vec{k}$ in the calculation of $\hat{\rho}_2$ as discussed for instance in [13]. However, we think it captures the essential idea that enable students understand the origin of non-pure states.

In Eq. 17, $\hat{\rho}_2$ is a pure state if and only if $|\eta| = 1$ or equivalently if the spectral phase $\phi(\lambda)$ is constant. From Eq. (13), one can easily calculate $\mathcal{P} = 1/2(1 + |\eta|)$. In practice, it's impossible to compensate exactly for spectral phase, so, as a matter of principle, one cannot generate a pure state and achieve $S = 2\sqrt{2}$. Direct calculation leads to $S = \sqrt{2}[1 + \text{Re}(\eta)]$. See (Eq. 20) below. Fidelity and purity could thus be increased by reducing the spectral width of the filters at the expense of reduced count rate. Alternatively, because of spatial and spectral coupling in the parametric generation process, the same goal can be achieved with spatial filtering with pinholes placed in front of the detectors. This purity/count rate compromise is interesting to discuss with students.

## B. Single photon state

The density matrix $\hat{\rho}_2$ also allows us to calculate the individual properties of each photon by computing its partial trace over the degrees of freedom of the other photon:

$$ \hat{\rho}_{1A} = \text{Tr}_B(\hat{\rho}_2). \quad (18) $$

Performing this operation on the two-photon density matrix $\hat{\rho}_2$ leads to single-photon density matrices $\hat{\rho}_{1A}$ and $\hat{\rho}_{1B}$ depicted in Fig. 2. As an example for the first photon, one of the off-diagonal components reads:

$$ \begin{aligned} (\hat{\rho}_{1A})_{HV} &= \sum_{p \in H, V} \langle Hp | \hat{\rho}_2 | Vp \rangle \\ &= (\hat{\rho}_2)_{HH,VH} + (\hat{\rho}_2)_{HV,VV}. \end{aligned} \quad (19) $$

These matrices are easy to interpret and correspond to almost completely unpolarized photon states with purities 0.51 each, as expected from the initial Bell state.

The density operator formalism has therefore enabled us to model the experimental situation, as well as demonstrate that the individual photon polarization states are near-maximally mixed, whereas the two-photon polarization state is (almost) pure. This validates the entangled nature of the two-photon state. As we shall see, this not only allows us to do Bell's experiment differently, but also to generalize it to any two-photon quantum states.

<table><caption>TABLE I. Relevant angles for a Bell-CHSH measurement on the state $|\text{HH}\rangle + |\text{VV}\rangle|\sqrt{2}$, giving the maximum possible value $S = 2\sqrt{2}$. $\alpha$ represent the linear polarizer's angle of the first photon, and $\beta$ for the second photon.</caption><thead><tr><th>Operator</th><th>+1 eigenvalue</th><th>-1 eigenvalue</th></tr></thead><tbody><tr><td>A&#770;</td><td>&alpha; = 0</td><td>&alpha; = &pi;/2</td></tr><tr><td>A&#770;'</td><td>&alpha; = &pi;/4</td><td>&alpha; = 3&pi;/4</td></tr><tr><td>B&#770;</td><td>&beta; = &pi;/8</td><td>&beta; = 5&pi;/8</td></tr><tr><td>B&#770;'</td><td>&beta; = 3&pi;/8</td><td>&beta; = 7&pi;/8</td></tr></tbody></table>

# IV. OPTIMIZING BELL MEASUREMENTS

## A. Bell parameter definition

The Bell-CHSH parameter $S$ can be defined as [4]

$$ S = \langle \hat{A} \otimes \hat{B} \rangle - \langle \hat{A} \otimes \hat{B}' \rangle + \langle \hat{A}' \otimes \hat{B} \rangle + \langle \hat{A}' \otimes \hat{B}' \rangle, \quad (20) $$

with polarization observables $\hat{A}$, $\hat{A}'$, $\hat{B}$ and $\hat{B}'$ with eigenvalues +1 and -1 associated to linear polarization states. This matches the usual definition of the Bell-CHSH parameter using polarization correlation coefficients $E(\alpha, \beta)$ ([1] for instance) as $\langle \hat{A} \otimes \hat{B} \rangle = E(\alpha, \beta)$.

As an example, consider $|H_\gamma\rangle = \cos \gamma|H\rangle + \sin \gamma|V\rangle$ the linearly polarized state at an angle $\gamma$ from the horizontal. The action of a linear polarizer oriented in such a way is represented by the operator $|H_\gamma\rangle\langle H_\gamma|$. Hence, for example, $\hat{A}'$ reads:

$$ \hat{A}' = |H_{\pi/4}\rangle\langle H_{\pi/4}| - |V_{\pi/4}\rangle\langle V_{\pi/4}| \quad (21) $$

$$ = |H_{\pi/4}\rangle\langle H_{\pi/4}| - |H_{3\pi/4}\rangle\langle H_{3\pi/4}|. \quad (22) $$

For the pure Bell state $|\psi_0\rangle$ of Eq. 1, the angles given in Table I maximize $S$, and give $S = 2\sqrt{2}$ which surpasses the value of 2 imposed by local realism. Figure 3 (left) shows the eigenstates associated with the +1 eigenvalue for these four observables on the Bloch sphere.

From Eq. 20, Table I, and $\hat{\rho}_2$, we find $S = 2.45$. We have experimentally verified that this is comparable to the value of $S$ computed from the direct measurement of polarization correlations [1] within experimental uncertainties. This parameter being larger than 2 is an indicator of the entanglement of the two-photon polarization state. The angles in Table I and the definition of $S$ (Eq. 20) have been chosen on the assumption that the incident state is $|\psi_0\rangle$. But we have shown that this is not exactly the case as $F < 1$. This calls to modify the definition of $S$ with respect to the actual quantum state of the experiment. More generally, how can we demonstrate entanglement for an arbitrary incident state?

## B. Bell parameter generalization

Several entanglement indicators exist, and in the case of a two-photon or two-qubit state, are easy to compute
<figure><img src="image_3.png" /><figcaption>FIG. 2. (Color online) Single photon density matrices for the polarization state of the individual photons, obtained by partial tracing the density matrix of Fig. 1. Left is $\hat{\rho}_{1A}$ and right is $\hat{\rho}_{1B}$.</figcaption></figure>

<figure><img src="image_4.png" /><figcaption>FIG. 3. (Color online) Bloch sphere representation of the polarization states measured for the Bell-CHSH inequality made with built-in function from QuTiP [16]. Red and magenta arrows correspond to the +1 eigenvalues of $\hat{A}$ and $\hat{A}'$ for the first photon, while blue and cyan arrows correspond to the +1 eigenvalue of $\hat{B}$ and $\hat{B}'$ for the second photon. The left panel corresponds to the usual measurements for the pure Bell state $|\psi_0\rangle$, and the right panel to the optimized polarizations maximizing the Bell parameter for the measured density matrix of Fig. 1.</figcaption></figure>

from the density matrix. This includes, for instance, the tangle or von Neumann entropy [7]. However, these concepts are abstract and rarely introduced in the classroom at this stage of the students' curriculum. We propose to stay within the Bell-CHSH paradigm, using a modified definition of S adapted to the actual two-photon quantum state. The question is: can we find better $\alpha$ and $\beta$ angles, or even more generally, better polarization observables $\hat{A}$, $\hat{A}'$, $\hat{B}$ and $\hat{B}'$ that maximize S given $\hat{\rho}_2$? This question has been answered partially in the literature [14] for the case of linear polarization measurements. The general case, including elliptical polarization, was addressed theoretically [15] and a necessary and sufficient condition on the density operator $\hat{\rho}$ for violating Bell-CHSH inequality has been expressed analytically, as well as the optimal value of the Bell-CHSH parameter (see Appendix A). With our students, we think it's best to use a simple and concrete numerical solution close to the experimental approach, as detailed below.

Any pure single-photon polarization state is uniquely defined by its coordinates $\theta, \varphi$ on the Bloch sphere. We can define orthogonal eigenstates corresponding to $\pm 1$ eigenvalues as:

$$|\psi_+(\theta, \varphi)\rangle = \cos \frac{\theta}{2} |\mathbf{H}\rangle + \sin \frac{\theta}{2} e^{i\varphi} |\mathbf{V}\rangle, \quad (23)$$

$$|\psi_-(\theta, \varphi)\rangle = \sin \frac{\theta}{2} |\mathbf{H}\rangle - \cos \frac{\theta}{2} e^{i\varphi} |\mathbf{V}\rangle. \quad (24)$$

The associated polarization observable is simply given by analogy with Eq. 22:

$$\hat{A} = |\psi_+(\theta_A, \varphi_A)\rangle\langle\psi_+(\theta_A, \varphi_A)| \\ - |\psi_-(\theta_A, \varphi_A)\rangle\langle\psi_-(\theta_A, \varphi_A)|. \quad (25)$$

A general Bell-CHSH measurement is therefore defined by four states of the form $|\psi_+(\theta, \varphi)\rangle$. For any set of 8 angles, the value of S can be computed given a known density operator such as $\hat{\rho}_2$. We can then numerically search for a set<fnref n="2" /> that maximizes S and compare it to both the $S=2$ limit for Bell-CHSH inequality violation and $S_{max} = 2\sqrt{2}$. We thus maximize the violation of the Bell-CHSH inequality with the quantum state at our disposal. We made sure that this numerical method gives the same maximum violation of the Bell-CHSH inequality as the one obtained analytically from the formal method in Ref. [15] (described in Appendix A).

### C. Numerical implementation

Numerically finding a set of optimal angles is a fruitful exercise for students, as a hands-on complement to the theory. Indeed, it requires numerical manipulation of the various linear algebra concepts involved in the measurements, such as unitary transformations of quantum states, expected values of quantum operators and, more importantly, tensor products, which very few are

<footnote n="2">² These angles are not uniquely defined.</footnote>
familiar with. We use the packages **QuTiP** [16] to describe pure and mixed quantum states and the **SciPy** [17] `scipy.optimize.basinhopping` method for optimization. We provide such a Python code as an example in the supplementary online material. **QuTiP** is particularly well suited, as it allows tensors to be defined and manipulated as such. For example, the partial trace on the second photon (Eq. 18) is conceptually simple in terms of tensors (we sum over all its states) but can be tricky to express in terms of matrix calculus as it depends on the chosen basis and the order of the basis vectors. With a few lines of code, given the angles $\theta_{A,B}$ and $\phi_{A,B}$, the polarization observables can be expressed directly as tensor products of the rotated $\hat{\delta}_3$ Pauli operator. Then, given a density matrix $\hat{\rho}_2$, the expected values $\langle \hat{A} \otimes \hat{B} \rangle$ are easily computed as well as the value of the Bell-CHSH parameter $S$. Finally a **SciPy** maximize function allows finding the maximum value for $S$, named $S_{opt}$ hereafter. We believe that a practical exercise of this kind can help students to overcome the additional degree of complexity brought about by the density operator formalism.

The numerical optimization of $S$ for $\hat{\rho}_2$ gives a modest improvement $S_{opt} = 2.53$ with a possible set of polarization eigenvectors depicted on the Bloch sphere in Fig. 3 (right). This is not surprising as we started with a state very close to the Bell state $|\psi_0\rangle$. But what if we produce an arbitrary two-photon state where entanglement is suspected? The Bell-CHSH measurement designed for $|\psi_0\rangle$ is no longer suitable and will most often give $S < 2$.

As an example, we measured the density matrix for two other quantum states that are easy to produce in our experiment by modifying the polarization state of the pump. The results are shown in Fig. 4. The first case is close to the original state, with almost equal weights for $|HH\rangle$ and $|VV\rangle$ but a different relative phase close to $-\pi/2$ as seen in the color-coded coherences. For this state, we find $S = 1.23$ for the Bell-CHSH parameter with the original Bell protocol, but we recover $S_{opt} = 2.55$. The second case corresponds to an *a priori* even worse state, with both different weights and phases for the two major components. This state is generated with an arbitrary elliptical polarization for the pump. The resulting two-photon state is quite far from $|\psi_0\rangle$. Unsurprisingly, the usual protocol gives $S = 1.29$, while optimization gives a maximum value of the Bell-CHSH parameter of $S_{opt} = 2.39$. In both cases, the optimal protocol demonstrates entanglement that cannot be revealed by the usual Bell-CHSH measurement. These results are of interest; however, at this point, they remain only numerical and an experimental validation is necessary to make sense of this optimized Bell-CHSH parameter.

## D. Experimental validation

As the tomographic measurement involves both half- and quarter-waveplates, practical implementation of the optimal protocol first requires numerically finding the

waveplate orientations in order to effectively realize the proper eigenstates defined on the Bloch sphere. For this procedure, care should be taken to properly reference the waveplates' slow and fast axis, as well as the orientation of the angles in their respective optical mounts. We performed this optimized Bell-CHSH parameter estimation for this last state, and found an experimental value of $S = 2.28 \pm 0.05$. Although marginally compatible with the expected $S_{opt} = 2.39$, it clearly violates the Bell-CHSH inequality, experimentally proving the entangled nature of the state and the utility of the whole procedure.

## V. CONCLUSION

We have described the implementation of quantum state tomography as a natural improvement of a teaching experiment initially designed to demonstrate the violation of Bell inequalities. The resulting measured density matrices are used to discuss important properties of the quantum state, such as purity and fidelity, which illustrate the difference between theory and experiments and explain the non-ideal values obtained when measuring directly the Bell-CHSH parameter.

The introduction of this more advanced formalism not only allows us to describe the experiment more accurately, but also to design and experimentally test a generalized protocol that can be used to demonstrate and, to some extent quantify, entanglement in an arbitrary state that would not be revealed by the usual protocol.

We believe that this combined theoretical/numerical/practical approach is very useful for students. Introducing the density operator of a quantum system complements the conventional state vector description of such an experiment, taking into account the relevant experimental details of the two-photon source and showing how actual quantum experiments can differ from the simple models used to describe them. Moreover, as entanglement is today the key resource of modern quantum communication and computation protocols, such as quantum key distribution using the Ekert91 protocol [18], quantum state tomography and generalized Bell-CHSH tests may become critical to the broad development of quantum technologies.

## SUPPLEMENTARY MATERIAL

Please click on this link to access the supplementary material, which includes a Python code written with the **QuTiP** package. For a given density matrix, the program calculates the optimized Bell-CHSH parameter, as well as numerical values for the quarter-wave plate and polarizer angles to experimentally measure this value directly. It also contains a Matplotlib-based function to display density matrices in the style of this article. Print readers can see the supplementary material at [DOI to be inserted by AIPP].
<figure><img src="image_5.png" /><figcaption>FIG. 4. (Color online) Left: Density matrices measured for two different two-photon entangled states created by altering the pump photon polarization. Right: Corresponding polarization measurements leading to a maximum value of the generalized Bell-CHSH parameter, $S = 2.54$ for the top state, and $S = 2.38$ for the bottom state.</figcaption></figure>

## ACKNOWLEDGMENTS

This project was funded by Programme Investissements d'Avenir under Program No. ANR-11-IDEX-0002-02, Reference No. ANR-10-LABX-0037-NEXT, as well as the QuanTEdu-France program No. ANR-22-CMAS-0001.

## AUTHORS DECLARATION

ALL, MK and NO were students and carried out the experiments, aided by SM, RM and BC who designed the experiments. ALL and BC conducted numerical calculations. The paper was written by BC, RM and SM and approved by all authors. The authors have no conflict to disclose.

## Appendix A: Analytical derivation of the maximum value for the Bell-CHSH parameter

Following Horodecki et al. [15], we can derive analytically the maximum value of the Bell-CHSH parameter for any quantum state, including mixed states. Starting with the knowledge of the density operator $\hat{\rho}_2$, we can compute the two-photon Stokes parameters $S_{jk}$, as:

$$S_{j,k} = \mathrm{Tr}[\hat{\rho}_2(\hat{\sigma}_j \otimes \hat{\sigma}_k)]. \quad (A1)$$

Let us call $T_\rho$ the 3-by-3 matrix formed by these coefficients, and define the 3-by-3 matrix $U_\rho$ by

$$U_\rho = T_\rho^T T_\rho, \quad (A2)$$

where $T_\rho^T$ stands for transposition of $T_\rho$. $U_\rho$ is a positive semi-definite symmetric matrix and can therefore be diagonalized with positive eigenvalues. Let us call $\lambda_1$ and $\lambda_2$ its 2 largest eigenvalues. The theorem from Horodecki et al. [15] states that the maximum value for the Bell-CHSH parameter is:

$$S_{\mathrm{opt}} = 2\sqrt{\lambda_1 + \lambda_2}. \quad (A3)$$

The implementation of this method is numerically easy with the knowledge of the density matrix $\hat{\rho}_2$ of an arbitrary quantum state. From the eigenvectors of the $U_\rho$ matrix, the polarization basis used for the optimized measurement can be retrieved. We checked that our numerical optimization gives the same results, but we believe our approach is more appropriate for students, as the optimization takes the form of directly searching for the measurement basis, rather than a somewhat abstract linear algebra reasoning. Even though maximizing an 8-parameter function is more demanding than diagonalizing a few 3-by-3 matrices, the numerical implementation is quite fast and only takes a few seconds on a modern laptop computer.
[1] D. Dehlinger & M. Mitchell, Entangled photons, nonlocality, and Bell inequalities in the undergraduate laboratory, Am. J. Phys. 70(9), 903-910 (2002)

[2] E. Galvez, Resource Letter SPE-1: Single-Photon Experiments in the Undergraduate Laboratory, Am. J. Phys 82(11), 1018-1028 (2014)

[3] A. Negre, R. Mathevet, B. Chalopin, & S. Massenot, Unexpected optimal measurement protocols in Bell's inequality violation experiments. Am. J. Phys 91, 64-73 (2023)

[4] J.F. Clauser, M.A. Horne, A. Shimony, R.A. Holt, Proposed experiment to test local hidden-variable theories, Phys. Rev. Lett., 23(15), 880 (1969)

[5] G. Rey, R. Mathevet, S. Massenot & B. Chalopin, Introducing quantum mechanics with a two-mode Mach-Zehnder interferometer, Am. J. Phys. 93(1), 28-33 (2025)

[6] A. Bista, B. Sharma, & E. J. Galvez, A demonstration of quantum key distribution with entangled photons for the undergraduate laboratory, Am. J. Phys 89(1), 111-120 (2021)

[7] J. B. Altepeter, E. R. Jeffrey, & P. G. Kwiat, Photonic state tomography, Advances in atomic, molecular, and optical physics. 52, 105-159 (2005)

[8] M. Born & E. Wolf, Principles of optics 7th Edition,

Cambridge U.P., Cambridge, UK), Chap. 1, p31

[9] E. J. Galvez, C. H. Holbrow, M. J. Pysher, J. W. Martin, N. Courtemanche, L. Heilig, & J. Spencer, Interference with correlated photons: Five quantum mechanics experiments for undergraduates, Am. J. Phys. 73, 127-140 (2005)

[10] https://research.physics.illinois.edu/QI/Photonics/tomography/

[11] M. Nielsen & I. Chuang, Quantum computation and quantum information, (Cambridge university press Cambridge,2001), Chap 2.

[12] R. Jozsa, Fidelity for mixed quantum states, J. Modern Opt. 41, 12 (1994).

[13] J. B. Altepeter, E. R. Jeffrey & P. G. Kwiat, Phase-compensated ultra-bright source of entangled photons, Opt. Expr. 13(22) 8951(2005)

[14] D. Fan, W. Guo & L. Wei, Experimentally testing the Bell inequality violation by optimizing the measurement settings, J. Opt. Soc. Am. B 29(12) 3429 (2012)

[15] R. Horodecki, P. Horodecki & M. Horodecki, Violating Bell inequality by mixed spin-1/2 states: necessary and sufficient condition, Phys. Lett. 200(5) 340(1995)

[16] https://qutip.org/

[17] https://scipy.org/

[18] A. K. Ekert, Quantum cryptography based on Bell's theorem, Phys. Rev. Lett. 67(6) 661-663 (1991)