Add-on implementation of frequency compensation for qcrypto.
Project description
fpfind
An add-on implementation of frequency compensation for qcrypto.
Installation
pip3 install fpfind
Requirements:
- Python 3.8 and above, running in Linux
gcc(if runningfreqcd, preferably in PATH for auto-compilation)
The stable releases are tagged and listed here.
Usage
Binaries and scripts are defined in pyproject.toml and will be exposed to the path; commonly used scripts are listed below.
# For general timestamp viewing
parse-timestamps {TIMESTAMPS}
show-timestamps {TIMESTAMPS}
# For frequency compensation (and in context of coincidence finding)
fpfind -t {TIMESTAMPS1} -T {TIMESTAMPS2}
freqcd -X -udF fpipe -f 568 < {TIMESTAMPS}
[costream -V5 ... |] freqservo -V5 -udF fpipe -f 568
See Hints for usage hints.
Upgrading
See Migration for moving between major versions, e.g. v2 to v3.
Motivation
Quantum key distribution requires some form of clock synchronization to retain high signal-noise ratio when pairing photon detection/generation events. This is usually achieved by having a stable clock (e.g. Rb clock, GPS receiver) or a separate clock transfer channel.
Timing correlated photons used in the QKD itself can also be used as a resource for clock synchronization, by identifying and tracking the timing delay $\tau$ using the second-order coherence $g^{(2)}(\tau)$. The timing drift in the signal indicates a frequency offset/drift between the two parties, which can be corrected with a feedback loop. This opens up the use of clock references with weaker frequency stability like quartz clocks.
This library implements the frequency compensation modules supplementing the core qcrypto QKD software stack, and a reference usage can be found in QKDServer.
Schematic
Components for frequency compensation (implemented in this library) are highlighted in yellow below.
In particular:
freqcd.cperforms frequency correctionfpfind.pyreplacespfind.cfor initial frequency estimationfreqservo.pyperforms frequency drift estimation
Limitations
- The FFT buffer size is limited to 2**31 bins due to the implicit casting to
int32performed internally bynp.bincounton older versions ofnumpy. This corresponds to a buffer order value upper bounded toq = 31forfpfind. To bypass this limitation, supply an alternative implementation fornp.bincount.
Troubleshooting
Certain issues may appear when attempting an install on RaspbianOS:
- Importing
numpyyields the error message statinglibopenblas.socould not be found (this is the underlying linear algebra library for Numpy); installing thelibopenblas-devlibrary fixes this, e.g.apt install libopenblas-dev
Contributing
Version tags (as of v2) follow romantic versioning (a variation on semantic versioning). In the SemVer language: PATCH is incremented for non-breaking changes, MINOR for breaking changes that are easy to patch downstream, and MAJOR is reserved for large breaking changes that require careful syntax adjustments.
Dynamic versioning is handled by poetry, so bumping the version simply involves adding a lightweight git tag (with "v" prepended, e.g. git tag {VERSION} [COMMIT]). Local version modifiers (e.g. dates) are removed for compatibility with PyPI rules.
Commit messages to roughly follow Angular commit message guidelines (which aligns with the Conventional Commits specification). The type should be one of the following: feat, fix, chore, test, docs, build, ci. If a scope is provided, it should be one of:
- fpfind
- fpplot
- freqcd
- freqservo
- parser (for both timestamp and epoch)
Commit messages can be automatically checked using pre-commit, after installing:
pre-commit install
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file fpfind-3.3.6.tar.gz.
File metadata
- Download URL: fpfind-3.3.6.tar.gz
- Upload date:
- Size: 73.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f4a38986c2fa71895b328c88fd7735327f3996b47b77c8a65f43418ac424e737
|
|
| MD5 |
bb087659a0c4845661da09834accda67
|
|
| BLAKE2b-256 |
7c03dc4752fe75085e13dc94d7abbefd825d576fa7413df457538a9315d92228
|
Provenance
The following attestation bundles were made for fpfind-3.3.6.tar.gz:
Publisher:
release.yaml on s-fifteen-instruments/fpfind
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
fpfind-3.3.6.tar.gz -
Subject digest:
f4a38986c2fa71895b328c88fd7735327f3996b47b77c8a65f43418ac424e737 - Sigstore transparency entry: 844832735
- Sigstore integration time:
-
Permalink:
s-fifteen-instruments/fpfind@8483b26003b35f986f8a17ef426270da42efebe2 -
Branch / Tag:
refs/tags/v3.3.6 - Owner: https://github.com/s-fifteen-instruments
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yaml@8483b26003b35f986f8a17ef426270da42efebe2 -
Trigger Event:
push
-
Statement type:
File details
Details for the file fpfind-3.3.6-py3-none-any.whl.
File metadata
- Download URL: fpfind-3.3.6-py3-none-any.whl
- Upload date:
- Size: 83.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
284134db71ebad46a99ebecbb590942ec5b6a745743c899d85899ab1887c6374
|
|
| MD5 |
d8fe4000a779a7eb09690e8041140399
|
|
| BLAKE2b-256 |
cf443003b2ff8bb1a5365c56afa67db3b69b3ec973e6ba22d9ddce586423bc72
|
Provenance
The following attestation bundles were made for fpfind-3.3.6-py3-none-any.whl:
Publisher:
release.yaml on s-fifteen-instruments/fpfind
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
fpfind-3.3.6-py3-none-any.whl -
Subject digest:
284134db71ebad46a99ebecbb590942ec5b6a745743c899d85899ab1887c6374 - Sigstore transparency entry: 844832739
- Sigstore integration time:
-
Permalink:
s-fifteen-instruments/fpfind@8483b26003b35f986f8a17ef426270da42efebe2 -
Branch / Tag:
refs/tags/v3.3.6 - Owner: https://github.com/s-fifteen-instruments
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yaml@8483b26003b35f986f8a17ef426270da42efebe2 -
Trigger Event:
push
-
Statement type: