Quantitative Information Flow library
Project description
libqif
Install
pip install qif
- Needs
sandybridgeor later CPU pythonversions supported:- Linux: 3.9 to 3.14
- Windows / MacOS: 3.9 to 3.11
A sample program
from qif import *
def compute_bayes(C):
pi = probab.uniform(C.shape[0])
print("Channel:\n", C)
print("Prior:\n", pi)
print("Bayes vulnerability", measure.bayes_vuln.posterior(pi, C))
print("Bayes mult-capacity", measure.bayes_vuln.mult_capacity(C))
compute_bayes(channel.randu(5))
# same, but using rational arithmetic
set_default_type(rat)
C = numpy.array([
[rat(1,2), rat(1,4), rat(1,4)],
[rat(1,6), rat(3,6), rat(2,6)],
[rat(1,2), rat(1,2), rat(0)],
])
compute_bayes(C)
Documentation
A list of methods provided by qif is available here.
Use libqif with C++
See the installation instructions.
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 Distributions
Built Distributions
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 qif-1.2.4-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.
File metadata
- Download URL: qif-1.2.4-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
- Upload date:
- Size: 21.5 MB
- Tags: CPython 3.14, manylinux: glibc 2.27+ x86-64, manylinux: glibc 2.28+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.9.23
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
15a4e0ec976834754bdad3e7390a0715231b6c12e73866d216f7f0fd42153d86
|
|
| MD5 |
16873a2de82ceff4ecdeed12cd008959
|
|
| BLAKE2b-256 |
a786fecf7adbfa27af98bc1a759dd29916025cd4b7389273718feefeb046fd5d
|
File details
Details for the file qif-1.2.4-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.
File metadata
- Download URL: qif-1.2.4-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
- Upload date:
- Size: 21.5 MB
- Tags: CPython 3.13, manylinux: glibc 2.27+ x86-64, manylinux: glibc 2.28+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.9.23
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f8b895c09e484d79e4a5b2c905dd6631fb35d010b8e14a5cb315ddf4d09fbc4f
|
|
| MD5 |
03171bd7db46430e4a516f64c3ceb0ff
|
|
| BLAKE2b-256 |
25c039b64ca689bc11d0e913f6270f2d38556ad00e22c964309660b9d2c61349
|
File details
Details for the file qif-1.2.4-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.
File metadata
- Download URL: qif-1.2.4-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
- Upload date:
- Size: 21.5 MB
- Tags: CPython 3.12, manylinux: glibc 2.27+ x86-64, manylinux: glibc 2.28+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.9.23
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3aa8e0eba4154c6c4dc89df4687066fcd14aab4ae6fc91a8a9291f2766f62a2d
|
|
| MD5 |
bf9a400596040764a294f92b4a892ca8
|
|
| BLAKE2b-256 |
e2364566fda1faa6aea7f180e64e806070ebe9e6da99836f332f24d4ec72e516
|
File details
Details for the file qif-1.2.4-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.
File metadata
- Download URL: qif-1.2.4-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
- Upload date:
- Size: 21.5 MB
- Tags: CPython 3.11, manylinux: glibc 2.27+ x86-64, manylinux: glibc 2.28+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.9.23
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4beb7dca11e2ff4ad89920f7f54614e0508dabb967befe4d5d3f1ec9e6917bfa
|
|
| MD5 |
972e9b7d5a8c56c0d28a22cd19801a4b
|
|
| BLAKE2b-256 |
88da5d8e79683457014080b6726f44272fb38e9e27706ec4f29c5d77d3ae24c6
|
File details
Details for the file qif-1.2.4-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.
File metadata
- Download URL: qif-1.2.4-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
- Upload date:
- Size: 21.5 MB
- Tags: CPython 3.10, manylinux: glibc 2.27+ x86-64, manylinux: glibc 2.28+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.9.23
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b1c2e358626109d2d7b9d1d733366376501bbd3945ee8327b151803de28406c1
|
|
| MD5 |
3324f9cc6cecc620c9ebb9bb968da0b8
|
|
| BLAKE2b-256 |
b92275dee159a6713ea0017a9a17763555fd8e0351a3bd568263b69630e388af
|
File details
Details for the file qif-1.2.4-cp39-cp39-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.
File metadata
- Download URL: qif-1.2.4-cp39-cp39-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
- Upload date:
- Size: 21.5 MB
- Tags: CPython 3.9, manylinux: glibc 2.27+ x86-64, manylinux: glibc 2.28+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.9.23
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9264c53ff3c457269e5c46deb020d473a7f87eb36b5e7d4c7d20dbafd5f6aaae
|
|
| MD5 |
90d697258be0cf1898e55414293ec6c2
|
|
| BLAKE2b-256 |
3f1b20eb1979490bbc1487c1c8037d4fac2581a1cc5313931923a00ae162104d
|