Glossary
- accidental
A coincidence that does not come from one physical event - typically a dark count landing inside the window. Only window mode can report one.
- annihilation operator
\(a\), which removes a photon from a mode with a \(\sqrt{n}\) factor.
- AnuQarana
The project. The importable Python package is QNS.
- basis
A pair of orthogonal polarisation states used for measurement. The package defines three in
QNS.components.photon_enc: HV (rectilinear, Z), DA (diagonal, X) and RL (circular, Y).- coherent state
An eigenstate of the annihilation operator, with a Poissonian photon-number distribution. Represented by
CoherentStatewhen constructed withalphas.- coincidence
Two detectors firing on what a counter would call the same event. In pulse mode that means the same
photon_id; in window mode, two clicks withincoincidence_windowseconds. See Timeline.- creation operator
\(a^\dagger\), which adds a photon to a mode with a \(\sqrt{n+1}\) factor. Implemented as
MultiPhotonPolarizationState.create.- dark count
A detector click with no photon behind it, generated as a Poisson process at
dark_count_rate. Logged withphoton_id = None, so pulse-mode coincidence counting excludes it.- dead time
The interval after a detector click during which the detector registers nothing. Combined here with
mean_response_timeand jitter to setnext_detection_time.- dim
The per-mode Hilbert space dimension. For a polarised mode holding up to \(n\) photons, \(d = (n{+}1)(n{+}2)/2\). The full state vector has length \(d^M\) for \(M\) modes.
- Fock state
A state of definite photon number, \(\lvert n \rangle\). The polarisation backend uses per-mode polarised Fock states \(\lvert H{:}h, V{:}v \rangle\).
- follow-up function
The
follow_up_functioncallback aDetectorinvokes on a successful photon click. The hook protocols use to turn clicks into (basis, bit) records.- jitter
The standard deviation of a detector’s response time. Feeds the recovery deadline; the click log records the arrival time.
- mode
A position in a state’s mode list, physically one arm of the circuit at one instant. Also called a path. The index of a photon object in
StateManager.allphotons[photon_id]is its mode index in the state vector.- mu / μ
mu_photons, the mean photon number per laser pulse. Low values (0.1 is typical) keep multi-photon pulses rare, which is both physically realistic for QKD and much cheaper to simulate.- null state
The all-zero vector - an accumulator used while building a result term by term. Distinct from vacuum, which has amplitude 1 on \(\lvert 0,\dots,0 \rangle\).
- passive basis choice
Using a 50:50 beam splitter to pick the measurement basis at random - which output arm the photon takes decides the basis. Avoids needing a fast switch and a random number generator.
- photon object
An instance of the internal
photonclass - a handle to an optical mode, not a quantum of light. A two-photon pulse is represented by one photon object carrying a state with occupation 2.- photon_id
The integer key assigned by the state manager at emission. Every optical mode descended from one pulse shares it, which is what lets the arms of an interferometer recombine coherently.
- pol_fidelity
The probability a photon’s polarisation survives a fibre unchanged. Below it, the photon is depolarised.
- pulse
One firing of the laser that contained at least one photon. Identified by a
photon_idand owning exactly one quantum state for its whole life.- QBER
Quantum bit error rate - the fraction of sifted bits on which the two parties disagree. Not computed by the shipped protocol code.
- QNS
The Python package name.
import QNS, with subpackagesQNS.components,QNS.channels,QNS.StateEvoluationandQNS.protocol.- second quantisation
The formalism this simulator uses: states are occupation numbers over modes, and optical elements are rewrites of the creation operators. It is what makes multi-photon behaviour emerge rather than being coded by hand.
- sifting
The classical post-processing step where two parties discard the results whose measurement bases did not match, keeping the rest as the raw key.
- state manager
StateManager- the registry mapping each pulse to its quantum state and its ordered mode list. One per experiment.- timeline
Timeline- the wrapper around the SimPy environment. Starts sources and detectors, advances the clock, collects counts.- transmittance
The fraction of light passing through. In a fibre channel, \(10^{-\alpha L/10}\). On a
BeamSplitter, the splitting ratio in per cent.