GBS-M is a collection of scripts that demonstrates how a GBS system can be characterised through moments, procided GBS experimental data. It makes use of the strawberryfield python package: https://strawberryfields.readthedocs.io/en/stable/
A linear optical tranformation can be mathematically represented by a Symplectic matrix. For example a unitary tranformation
can be represented by the corresponding symplectic matrix
A tranformation from a combination of linear optical components is given by a direct sum of the corresponding sympecitc matrices. For example the following tranformation
can be described as a single 4x4 symplectic matrix
In this manner the interferometer of the GBS can be represented as a single matrix S.
The first and second order moments along the quatratures are then tranformed by the interferometer as follows
This leads to first and second order moments of the photon numbers in terms of the second order, tranformed, quadrature covariance matrix (V') such that
where
This allows the analytical construction of photon number covariance matrix for a well defined interferometer
which can be compared to experimental moments calculated from the GBS data using the following statistics formula
To compare the two covariance martices, the Residual Sum of Squares is considered such that
where
The closer the analytical system is characterised to the atual experimental set up, the lower the RSS value. i.e the RSS value can be thought of a function to be minimized with GBS data, interferometers and mode squeezing parameters as arguments.
Therefore, starting from ideal optical component parameters, we try to minimize the RSS value by twitching their values. The optimal parameter values are then the true values of the experimental set up.
- GBS_functions.py: This script holds every required funcion for the rest of the scripts. Make sure you
import everything. Every function has its own discription in line. In general the functions are
it separated into four labelled categories:
- Strawberryfield: functions to model a system and get probabilities
- Symplectic Matricesl: functions to model a system and get photon number covariances through the symplectic matrices formalism
- Sampling Simulation : it samples from the strawberryfield exact PDF to simulate experimental data, of finite sample size
- General: functions that extract data from files.
-
GBS_model_generator.py: Define your model here! beamsplitters, phaseshifters, squeezers. It models the system with the strawberry field package and saves the probabilities for corresponding states in a named file. Errori identification: Manually introduce an error value to one of the optical components.
-
GBS_sampling.py: Gets the exact probabilities-file that was generated from GBS_model_generator.py, and samples to simulate experimental data.
-
GBS_optimizer.py: The optimizer will sample, calculate moments from experimental data, and compare values to the symplectic theoretical ones, whith a guessed error. It will repeat the process with a different error value. It slowly converges to the true error value.
The default system that is simulated by the scripts is a 4 mode interferoemter and 8 beam splitters:
By considering statistics of outputs states between |0,0,0,0> and |12,12,12,12> the BS values where identified with ±0.5% which is almost an order of o magnitude compared to the typical provided manufacturing error bounds (±3-5%)
