| Version 8 (modified by , 5 days ago) ( diff ) |
|---|
# Documentation for the density mode of MadGraph Work In Progress
Density mode
Authors
- Durupt
Short description
Automatic computation of density matrices and quantum information observables. This page contains the technical description of the Python library Density_functions.py used for analysis.
How to compute density matrices
This module of MadGraph5 allows to compute density matrices automatically in a user-friendly way. After having generated your process
generate YOUR_PROCESS output launch
you will be able to chose the type of run. To compute density matrices one must chose
reweight = density
The user is then asked to edit the different cards needed for the run. The information for the density matrices computation is given in the reweight_card. Examples for different benchmark processes are given in https://arxiv.org/abs/2510.17730. At the end of the run, the density matrix for each event is written in the Les Houches Event (LHE) file.
How to read the density matrices in the LHE file
The LHE file can be read with the parser lhe_parser.py available in MadGraph. An example of code that would parse the density matrix value for each event is:
import sys sys.path.append('PATH TO MADGRAPH') import madgraph.various.Density_functions as dens import madgraph.various.lhe_parser as lhe_parser lhe_path = os.path.join('PATH TO MADGRAPH', Data_Path) for event in lhe_parser.EventFile(lhe_path): density = event.density square_density = dens.square_matrix(density)
With this code, for each event of the file, you read the value density which contains the independent coefficients of the density matrix. The utility function square_matrix allows to write it in the usual matrix form needed for further analysis.
Implementation of the quantum information obseravbles
Now that we have the density matrices for each event, we can compute any quantum information observable that we want. The library Density_functions.py contains a non-exaustive list of them that will be listed here and that can be called (example of the concurrence here) via.
dens.Get_Concurrence(density)
We will now give a list of the different quantum information observables currently available in the library. For more physical and more detailed descriptions of the observables, read https://arxiv.org/abs/2510.17730.
