Skip to content

Commit ef927b6

Browse files
committed
Updated more of the language for the Coherent channel tools.
Added update and git installation instructions to the readme.
1 parent 55d99a0 commit ef927b6

File tree

2 files changed

+118
-39
lines changed

2 files changed

+118
-39
lines changed

ChannelModules/ChannelConstructionTools/Coherent.m

Lines changed: 50 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,23 @@
44
% optical modes. We then write coherent states across them as
55
% |vec(alpha)> := |alpha_1>|alpha_2> ... |alpha_n>. For this class, we
66
% store coherent states by extracting the column vector vec(alpha) in
7-
% C^n. Furthermore, any operator, M, that transforms mode annihilation
8-
% operators as vec(b) = M*vec(a), then M transforms coherent states as
9-
% |vec(beta)>_vec(b) = |M*vec(alpha)>_vec(a).
7+
% C^n.
8+
%
9+
% A linear optics system characterized by matrix M in C^{m x n} with
10+
% ||M||_infinity <= 1 acts as the quantum channel:
11+
%
12+
% Phi_{M,A->B}(|vec(alpha)><vec(beta)|_A) = <vec(beta)|vec(alpha)>
13+
% / (<M vec(beta)|M vec(alpha)>) * |M vec(alpha)><M vec(beta)|_B
14+
%
15+
% When M is an isometry, one can think of the transformation as a
16+
% replacement of mode creation operators vec(a^dagger) via
17+
% vec(b^dagger) = M vec(a^dagger) or equivalently
18+
% M^dagger*vec(b^dagger) = vec(a^dagger).
19+
%
20+
% Note the special case:
21+
%
22+
% Phi_{M,A->B}(|vec(alpha)><vec(alpha)|_A) =
23+
% |M*vec(alpha)><M*vec(alpha)|_A)
1024
%
1125
% See Also: Rotations Qudit
1226
methods (Static)
@@ -96,12 +110,11 @@
96110

97111
function transMat = beamSplitter(transmittance)
98112
% A function that constructs the unitary transition matrix on
99-
% coherent states/annihilation operators when a beam splitter
100-
% is applied to a two mode state (one on each input side of the
101-
% beam splitter). The outputs are organized so that a
102-
% transmittance of 1 results in the identity matrix.
103-
% Furthermore, no global or relative phase shifts are applied
104-
% to the output modes.
113+
% coherent states when a beam splitter is applied to a two mode
114+
% state (one on each input side of the beam splitter). The
115+
% outputs are organized so that a transmittance of 1 results in
116+
% the identity matrix. Furthermore, no global or relative phase
117+
% shifts are applied to the output modes.
105118
%
106119
% * transmittance: proportion of the intensity that is
107120
% transmitted through the beam splitter without being
@@ -117,13 +130,12 @@
117130

118131
function transMat = singleInputBeamSplitter(transmittance)
119132
% A function that constructs the isometry transition matrix on
120-
% a coherent state/annihilation operator when a beam splitter
121-
% is applied to a single input mode. This is useful for passive
122-
% detector schemes like in BB84 where the signal must be split
123-
% randomly into multiple detector setups. The outputs are
124-
% ordered as transmitted portion then reflected portion.
125-
% Furthermore, no global or relative phase shifts are applied
126-
% to the output modes.
133+
% a coherent state when a beam splitter is applied to a single
134+
% input mode. This is useful for passive detector schemes like
135+
% in BB84 where the signal must be split randomly into multiple
136+
% detector setups. The outputs are ordered as transmitted
137+
% portion then reflected portion. Furthermore, no global or
138+
% relative phase shifts are applied to the output modes.
127139
%
128140
% * transmittance: proportion of the intensity that is
129141
% transmitted through the beam splitter without being
@@ -136,13 +148,13 @@
136148

137149
function transMat = singleInputMultiBeamSpliter(probDist)
138150
% A function that constructs the isometry transition matrix on
139-
% a coherent state/annihilation operator when that splits the
140-
% input across multiple output modes based on fractions of the
141-
% intensity. This is useful for passive detector schemes like
142-
% six-state where the signal must be split randomly into
143-
% multiple detector setups. The outputs are ordered the same as
144-
% the probability distribution. No global or relative phase
145-
% shifts are applied to the output modes.
151+
% a coherent state when that splits the input across multiple
152+
% output modes based on fractions of the intensity. This is
153+
% useful for passive detector schemes like six-state where the
154+
% signal must be split randomly into multiple detector setups.
155+
% The outputs are ordered the same as the probability
156+
% distribution. No global or relative phase shifts are applied
157+
% to the output modes.
146158
%
147159
% * probDist: probability distribtion to distribute the beam
148160
% into fractions of the orgininal intensity.
@@ -190,10 +202,10 @@
190202
% Computes the inner product between two sets of coherent
191203
% states. <coherentStatesA|coherentStatesB>.
192204
%
193-
% * coherentStatesA: nd array of complex coherent state
205+
% * coherentStatesA: An nd array of complex coherent state
194206
% amplitudes. Takes the complex conjugate for the
195207
% inner product.
196-
% * coherentStatesB: nd array of complex coherent state
208+
% * coherentStatesB: An nd array of complex coherent state
197209
% amplitudes. Must be the same size as coherentStatesA.
198210
% Name-value arguments
199211
% * combineModes(true): When true, each individual
@@ -223,9 +235,9 @@
223235
% coherentInnerProduct(coherentStatesA,coherentStatesB)...
224236
% ).^2).
225237
%
226-
% * coherentStatesA: nd array of complex coherent state
238+
% * coherentStatesA: An nd array of complex coherent state
227239
% amplitudes.
228-
% * coherentStatesB: nd array of complex coherent state
240+
% * coherentStatesB: An nd array of complex coherent state
229241
% amplitudes. Must be the same size as coherentStatesA.
230242
% Name-value arguments
231243
% * combineModes (true): When true, each individual
@@ -250,10 +262,10 @@
250262
% coherent states. The Fock states recieve the complex
251263
% conjugate. <fockStates|coherentStates>.
252264
%
253-
% * fockStates: nd array of non-negative integers that
265+
% * fockStates: An nd array of non-negative integers that
254266
% represent the number of photons in each mode. Takes the
255267
% complex conjugate for the inner product.
256-
% * coherentStates: nd array of complex coherent state
268+
% * coherentStates: An nd array of complex coherent state
257269
% amplitudes. Must be the same size as fockStates.
258270
% Name-value arguments
259271
% * combineModes (true): When true, each individual inner
@@ -280,9 +292,9 @@
280292
% tolerance, the result should be the same as
281293
% abs(fockCoherentInnerProduct(fockStates,coherentStates)).^2
282294
%
283-
% * fockStates: nd array of non-negative integers that
295+
% * fockStates: An nd array of non-negative integers that
284296
% represent the number of photons in each mode.
285-
% * coherentStates: nd array of complex coherent state
297+
% * coherentStates: An nd array of complex coherent state
286298
% amplitudes. Must be the same size as fockStates.
287299
% Name-value arguments
288300
% * combineModes (true): When true, each individual probability
@@ -309,12 +321,12 @@
309321
% given an input coherent state and dark count rate.
310322
%
311323
% Inputs:
312-
% * coherentState: nd array of complex coherent state
324+
% * coherentState: An nd array of complex coherent state
313325
% amplitudes.
314-
% * darkCountRate (0): nd array that represents the probability
315-
% that a no click event is transformed into a click event.
316-
% The darkCountRate must have a compatible size for element
317-
% wise operations with coherentState.
326+
% * darkCountRate (0): An nd array that represents the
327+
% probability that a no click event is transformed into a
328+
% click event. The darkCountRate must have a compatible size
329+
% for element wise operations with coherentState.
318330
%
319331
% see also mustBeCompatibleSizes
320332
arguments
@@ -351,11 +363,11 @@
351363
% example, [0.25;0.1] is mapped to [0.675;0.225;0.075;0.025].
352364
%
353365
% Inputs:
354-
% * probDetectorsClick: nd array of click probabilities for
366+
% * probDetectorsClick: An nd array of click probabilities for
355367
% threshold detectors.
356368
%
357369
% Outputs:
358-
% * probDetectorsClickPatterns: nd array with the same size
370+
% * probDetectorsClickPatterns: An nd array with the same size
359371
% except 2^n columns where n was the previous number of
360372
% columns.
361373
arguments

README.md

Lines changed: 68 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
[![DOI](https://zenodo.org/badge/402256220.svg)](https://doi.org/10.5281/zenodo.14262568)
2+
13
# OpenQKDSecurity Version 2.0
24

35
OpenQKDSecurity is a software package based in MATLAB that allows users to calculate key rates for quantum key distribution (QKD) protocols using the [Winick et al. framework](https://quantum-journal.org/papers/q-2018-07-26-77/) ([arXiv](https://arxiv.org/abs/1710.05511)). It is extensible, allowing for user-defined protocols to be implemented, and modular, allowing for users to change specific aspects of a protocol. Our software can be used to interface with experimental data, demonstrate the theoretical scalability of protocols in various conditions, and optimize parameters to maximize key rate. Its modular structure helps break down the colossal task of calculating key rates into small areas that require only domain specific knowledge. Therefore, no single person must be an expect in all areas.
@@ -45,7 +47,10 @@ Our software has the following dependencies for its default settings:
4547

4648
Please refer to the documentation of each of these software packages for installation instructions.
4749

48-
To install the openQKDSecurity package, download the repository on GitHub as a zip file and unzip to a preferred directory. This can be done on the main page of the repository by pressing the green “Code” button at the top of the page and then selecting "Download ZIP".
50+
To install the openQKDSecurity package, download the repository on GitHub as a zip file and unzip to a preferred directory. This can be done on the main page of the repository by pressing the green “Code” button at the top of the page and then selecting "Download ZIP". Alternatively, you can clone the reposity using git with
51+
```
52+
git clone https://github.com/Optical-Quantum-Communication-Theory/openQKDsecurity
53+
```
4954

5055
Next, ensure that our software and the above dependencies are on your MATLAB path.To place a folder on your path, navigate to it in MATLAB, then right-click and select "Add to Path\textgreater Selected folder and Subfolders". Make sure you do this for OpenQKDSecurity, QETLAB and CVX. We also recommend you run "cvx_setup" to check if CVX is properly configured and which solvers are available.
5156

@@ -54,6 +59,16 @@ Before you close MATLAB, go to "Home\>Environment\>Set Path" and click "save" at
5459
> [!IMPORTANT]
5560
> We strongly encourage you to run "testInstall.m" at this point to check for basic installation issues.
5661
62+
63+
## Updating
64+
65+
- If you cloned the repository, fetch and pull changes to your local copy. Next, remove OpenQKDSecurity and all subfolders from your path, then add OpenQKDSecurity and all subfolder back to your path.
66+
67+
- If you downloaded the repository as a zip file, back up any local files you added. Next, remove OpenQKDSecurity and all subfolders from your path, then delete the folder. Unzip the new version and add OpenQKDSecurity and all subfolder back to your path.
68+
69+
Once again, we recommend you run "testInstall.m" to check for basic installation issues.
70+
71+
5772
## Current Status
5873
Currently in this version of the software, we provide the following example protocols:
5974
* Qubit BB84 with no loss, where Alice is 4-dimensional
@@ -68,6 +83,58 @@ We also provide two math solver modules:
6883

6984
In the future, we plan to add more protocols. We also welcome custom-defined protocols and solver modules.
7085

86+
## Citing
87+
88+
If you use Open QKD Security in research, please cite our software and write in your document something like
89+
```
90+
To calculate the key rate for protocol "X" we used the Open QKD Security package[#].
91+
```
92+
93+
Here is a bibtex entry you can use:
94+
```bib
95+
@software{burniston_2024_14262569,
96+
author = {Burniston, John and
97+
Wang, Wenyuan and
98+
Kamin, Lars and
99+
Lin, Jie and
100+
Coles, Patrick and
101+
Metodiev, Eric and
102+
George, Ian and
103+
Li, Nicky Kai Hong and
104+
Fang, Kun and
105+
Chemtov, Max and
106+
Zhang, Yanbao and
107+
Böhm, Christopher and
108+
Winick, Adam and
109+
van Himbeeck, Thomas and
110+
Johnstun, Scott and
111+
Nahar, Shlok and
112+
Tupkary, Devashish and
113+
Pan, Shihong and
114+
Wang, Zhiyao and
115+
Corrigan, Aodhan and
116+
Kanitschar, Florian and
117+
Gracie, Laura and
118+
Gu, Shouzhen and
119+
Mathur, Natansh and
120+
Upadhyaya, Twesh and
121+
Lutkenhaus, Norbert},
122+
title = {Open {QKD} {S}ecurity: {V}ersion 2.0.2},
123+
month = dec,
124+
year = 2024,
125+
publisher = {Zenodo},
126+
version = {v2.0.2},
127+
doi = {10.5281/zenodo.14262569},
128+
url = {https://doi.org/10.5281/zenodo.14262569}
129+
swhid = {swh:1:dir:ce63165f716a15a425fbadc208e27934cc66be10
130+
;origin=https://doi.org/10.5281/zenodo.14262568;vi
131+
sit=swh:1:snp:ea6ece4519d009abf5ae6b7c084f97ba9d3f
132+
14c2;anchor=swh:1:rel:54e7860c1d1e613f2e7a075653d1
133+
2fa44f1226fa;path=/
134+
},
135+
}
136+
```
137+
71138
## Contributing
72139

73140

0 commit comments

Comments
 (0)