Quantitative Information Flow library
Project description
libqif
Install
pip install qif
- Needs
python
>= 3.7 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
No source distribution files available for this release.
See tutorial on generating distribution archives.
Built Distributions
qif-1.2.2-cp39-cp39-win_amd64.whl
(17.7 MB
view hashes)
qif-1.2.2-cp38-cp38-win_amd64.whl
(17.7 MB
view hashes)
Close
Hashes for qif-1.2.2-cp310-cp310-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ecd13a116fceb59808648710e057ab55051b6482076726bf07d032bbcf87ea21 |
|
MD5 | 9f7a3c154fd8fa10ab26aa67da6ecbcc |
|
BLAKE2b-256 | cf1d7218baea041c579f377da4cc35246a36371018211894843ea77e6d0a8561 |
Close
Hashes for qif-1.2.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4af38562c60970c2db47ac9859b251c5d5be15687d11cd2176da940aad0bbb4e |
|
MD5 | ab49085a1c93f8f7b0b69f9eefa8629d |
|
BLAKE2b-256 | 45b31220f310a7f1004c5f8256443ebd259bfb07b28670ba97827c55bbb99a96 |
Close
Hashes for qif-1.2.2-cp310-cp310-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 87408063fbe3f45763310cb92863893de93af59fc6a7cc7304ba177b51ae2fb7 |
|
MD5 | 55207cfa07ebb54eeae18569a2dea293 |
|
BLAKE2b-256 | ca647a7f31906f17ef4a3ff7828501728def7b3c1fee32a751e3601486a164fe |
Close
Hashes for qif-1.2.2-cp39-cp39-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a8ada79a5b554b4c1ef0af04d7820b008bc3c3f1c896e82bb606a7fc9db9d25a |
|
MD5 | 13109b206eae56d4d04e4a698405a0a1 |
|
BLAKE2b-256 | 62db16ff9ff80338cd28d5f4378fb80c9136e0aa0b01b1ea5ae55145ac9bab65 |
Close
Hashes for qif-1.2.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | fa19eaba2a08209a28204e36a0ee2e0b85a82d32f7a30e3f6a4515bcdc113c64 |
|
MD5 | 932329db2e56dcee2b4f0dc3aefb7dc4 |
|
BLAKE2b-256 | fdc45e1e3ee7104529a51973c0dff202ca34b50fdd7a953cec49d50658cca465 |
Close
Hashes for qif-1.2.2-cp39-cp39-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3be88a6f28cc2ff85ec0ceae9d0de5f3aa285beecae13d8444f53320db708c0c |
|
MD5 | 3bdce3a7468e8efe255671dc409c8966 |
|
BLAKE2b-256 | b713ecfb9399a43b4598eeb582aefe467818f816c548ae6cf5881e3116d09a0e |
Close
Hashes for qif-1.2.2-cp38-cp38-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d74e7431ab847d564a938186e180cf98fd1f8a3d81b3dcb546458015237ecd95 |
|
MD5 | c6e1091eafb771fba392e14d42cb57f3 |
|
BLAKE2b-256 | 6d7328f91eaba13ca488b2aa7ea7f1fbe76f8b046f0d99586ad9a3cd9a2cbace |
Close
Hashes for qif-1.2.2-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4d231620d1b0d93d7e097b513ef0fba174b01fffcc7ed965ccf834bd587fe92e |
|
MD5 | 8e98a73426cb1c53a645462036e5f26e |
|
BLAKE2b-256 | 9da1b11bdc88d76683cc222f340b297d87b33b5b9d1386b1a690726209742f10 |
Close
Hashes for qif-1.2.2-cp38-cp38-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 38a75e4ad08d5466f25b10caba224a4786320e50d135e8dfe205eab4ddd68ed1 |
|
MD5 | baadb7c197a8e7c0c3e5e280040f4c18 |
|
BLAKE2b-256 | 1735503c94983c421bc27fe38417cf310cfe8f180ea988b8d58d433f629529a9 |
Close
Hashes for qif-1.2.2-cp37-cp37m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8c1431b9a732e211c09cad938821b547d2cd61b94bf18d82890d5535c2e203a7 |
|
MD5 | 222232d08bfc525f6a1d4857435d86b7 |
|
BLAKE2b-256 | 4edbd7f02813cd1ed9d72c3a13fc9c403811d2d796fdecc606c3836257eae670 |
Close
Hashes for qif-1.2.2-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 56faf9d33075891bfcae04da1903936df3849285b86c46c924d24d39fab253cc |
|
MD5 | a4009c9281b854b62ba3acfc85a99cea |
|
BLAKE2b-256 | b5d17f968c11f6bad5b7e020fe9091302b383e96bfb06b881f070b3514aafa2f |
Close
Hashes for qif-1.2.2-cp37-cp37m-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 65a7365ba8369ca5fd4d73950b68989f9dfeadbb5b1706c9df868db957afc9ba |
|
MD5 | f3e0381c0bce47274642b010b1fcb5fa |
|
BLAKE2b-256 | 61281665f06fee61ec60c22cf0ec00f3ec3f8f478af2ec30a4ee05544866a2c7 |