Skip to content

Merging quantum noise

finesse importer requested to merge merging_quantum_noise into master

The basics of quantum noise are in and working, and now merged with the changes from !49 (merged).

In summary, detectors can now be NoiseDetectors, and components can be NoiseGenerators. Each specifies a type of noise that they detect/produce (for now, just NoiseType.QUANTUM). If a detector & generator for a noise type are both present, a noise matrix for that type is created and stored in MatrixSystemSolver._noise_matrices. This is then filled during a run similarly to the normal matrix, by functions set by calls to set_fill_noise_function.

NoiseDetectors can request an arbitrary number of selection vectors, which get created as extra rhs' in the signal matrix. After the signal simulation has been run, KLUMatrixSystemSolver.solve_noises() is called, which does actual computation as described in Dan's thesis:

  1. For the quantum noise, modulators re-fill their matrix elements with the necessary modified couplings
  2. NoiseDetectors are asked to fill their selection vectors
  3. These selection vectors are all solved simultaneously, to give the noise input weightings
  4. The results are multiplied by the relevant noise matrix, to give the correctly weighted noise inputs
  5. These are then solved again, to propagate these inputs to the detectors
  6. The NoiseDetectors are given the results, which they then use as normal in their output functions
  7. Finally, for the quantum noise, the modulators re-fill their matrix elements with the normal couplings

This should be fairly straightforward to extend to other noise types in the future if required.

The quantum components are currently just squeezers, qnoised[S] & qshot[S]. The detectors are slightly different from Finesse 2, in that they always assume the presence of a final demodulation at the signal frequency, so this no longer needs to be specified by the user. The [S] variants also only work with 0 or 1 RF demodulation currently, as there is no PowerDetectorDemod3 or higher yet.

There are two FIXMEs left in CarrierSignalMatrixSimulation, where I'm unsure of the best course of action. Firstly, quantum noise is a bit weird in that all open optical ports generate it, so the simulation has to fill in some values rather than leaving it all to the components. Ideally, this code would be part of MatrixSystemSolver.fill_noise_inputs, however that class doesn't know about some necessary parts (the model_data struct and list of open ports), so it is currently left in run_signal. This ties the two classes together somewhat, which is a bit ugly.

Similarly, solve_noises needs to know about the noise detector workspaces, but has no access to them, so a list of these is passed as a parameter (this is probably fine, but people may object).

Edited by finesse importer

Merge request reports