Quantitative Information Flow library
Project description
libqif
Install
pip install qif
- Needs
python
>= 3.6 and asandybridge
or later CPU - On linux
pip
>= 19 is needed (make sure topip install -U pip
)
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
qif.set_default_type(qif.rat)
C = np.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
File details
Details for the file qif-1.1.3-cp39-cp39-manylinux2010_x86_64.whl
.
File metadata
- Download URL: qif-1.1.3-cp39-cp39-manylinux2010_x86_64.whl
- Upload date:
- Size: 20.7 MB
- Tags: CPython 3.9, manylinux: glibc 2.12+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/51.0.0 requests-toolbelt/0.9.1 tqdm/4.54.1 CPython/3.6.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8d41f2f8f28f18017bfeb9a61841a1701a60119045924524556a5e13c957b161 |
|
MD5 | deb73bb15cbaac1c5e76989e2e24c070 |
|
BLAKE2b-256 | d0cc3ea54d19bcd521a01965ef225a62df3d0a2322eb7e5b3953c25b056d85fd |
File details
Details for the file qif-1.1.3-cp39-cp39-macosx_10_15_x86_64.whl
.
File metadata
- Download URL: qif-1.1.3-cp39-cp39-macosx_10_15_x86_64.whl
- Upload date:
- Size: 12.9 MB
- Tags: CPython 3.9, macOS 10.15+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/51.0.0 requests-toolbelt/0.9.1 tqdm/4.54.1 CPython/3.9.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 26ab996a1247490bba97c025cf92c25eecdf86770658e2bea9b87fe52d5ba781 |
|
MD5 | 1c15769a5bfa449df1fe95ddd8e6282c |
|
BLAKE2b-256 | 839f758912fdb5bfedefc0c36ee34155381f512b72de60164b57bee4c4501396 |
File details
Details for the file qif-1.1.3-cp38-cp38-manylinux2010_x86_64.whl
.
File metadata
- Download URL: qif-1.1.3-cp38-cp38-manylinux2010_x86_64.whl
- Upload date:
- Size: 20.7 MB
- Tags: CPython 3.8, manylinux: glibc 2.12+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/51.0.0 requests-toolbelt/0.9.1 tqdm/4.54.1 CPython/3.6.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0ff3458dc0abb52dbd197f87ce220578c1530ed92c8016eff2123a33d6e0e187 |
|
MD5 | 6e2e80de49a10d3b86505c73d321b820 |
|
BLAKE2b-256 | 6c39fe2c6618663bc0b6720230cf1c833c2d1127e1f81382ac775129a3893444 |
File details
Details for the file qif-1.1.3-cp38-cp38-macosx_10_15_x86_64.whl
.
File metadata
- Download URL: qif-1.1.3-cp38-cp38-macosx_10_15_x86_64.whl
- Upload date:
- Size: 12.9 MB
- Tags: CPython 3.8, macOS 10.15+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/51.0.0 requests-toolbelt/0.9.1 tqdm/4.54.1 CPython/3.9.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c951ae6225aff73d5612ee857f2740013a415c2ccc6d34ac6779cfb02da2da1a |
|
MD5 | fcec65a4feee11a8dc19bcdfa34858a0 |
|
BLAKE2b-256 | db1942f497a51c89d22b95055e343b879347cd29655b13bab7e429ff4a17007d |
File details
Details for the file qif-1.1.3-cp37-cp37m-manylinux2010_x86_64.whl
.
File metadata
- Download URL: qif-1.1.3-cp37-cp37m-manylinux2010_x86_64.whl
- Upload date:
- Size: 20.7 MB
- Tags: CPython 3.7m, manylinux: glibc 2.12+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/51.0.0 requests-toolbelt/0.9.1 tqdm/4.54.1 CPython/3.6.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8a5099feb79a88fed243b1beb8e79a6e4ac494ebab08092af8571788847be519 |
|
MD5 | 9624375b0bfdc824d10082e098a77855 |
|
BLAKE2b-256 | f0be4c7df9b09da257bd2a5ae67e074f70ba255d02b6c04e83a8a178b9d3c4d2 |
File details
Details for the file qif-1.1.3-cp37-cp37m-macosx_10_15_x86_64.whl
.
File metadata
- Download URL: qif-1.1.3-cp37-cp37m-macosx_10_15_x86_64.whl
- Upload date:
- Size: 12.9 MB
- Tags: CPython 3.7m, macOS 10.15+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/51.0.0 requests-toolbelt/0.9.1 tqdm/4.54.1 CPython/3.9.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3592e2efd0eaf0256d6272824e77e3ff51728090e094c1b51734901ff6a80ff3 |
|
MD5 | c44539ba92f5bb3943b14c2d4c39790c |
|
BLAKE2b-256 | ec4d278a4f72bae6b073b2514c487232cab7051c733e9f43ebc803484cfe6c45 |
File details
Details for the file qif-1.1.3-cp36-cp36m-manylinux2010_x86_64.whl
.
File metadata
- Download URL: qif-1.1.3-cp36-cp36m-manylinux2010_x86_64.whl
- Upload date:
- Size: 20.7 MB
- Tags: CPython 3.6m, manylinux: glibc 2.12+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/51.0.0 requests-toolbelt/0.9.1 tqdm/4.54.1 CPython/3.6.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e298b23a7decbd2ade99cd61b5274806b25b63c4d48a5999b49a2f403168ed63 |
|
MD5 | 196e6b22af4c54613782fd6a38c644cc |
|
BLAKE2b-256 | 4cb0e30dae3bacd94624f45b982e2980ec811d523182370cb9e9870afefef72f |
File details
Details for the file qif-1.1.3-cp36-cp36m-macosx_10_15_x86_64.whl
.
File metadata
- Download URL: qif-1.1.3-cp36-cp36m-macosx_10_15_x86_64.whl
- Upload date:
- Size: 12.9 MB
- Tags: CPython 3.6m, macOS 10.15+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/51.0.0 requests-toolbelt/0.9.1 tqdm/4.54.1 CPython/3.9.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 87181e66f090ee7e453548983b410799a5b83f35d7710c0dc63c7f150edc2315 |
|
MD5 | b2aa0da379d1969f51b7beaaec90ef5e |
|
BLAKE2b-256 | 36b09304c0e5bff05289db5b9fcf39465b6b42b3ad50c6420fecab84e1697ea4 |