Skip to main content

Quantitative Information Flow library

Project description

Build Status PyPI version

libqif

Install

pip install qif
  • Needs python >= 3.6 and a sandybridge or later CPU
  • On linux pip >= 19 is needed (make sure to pip 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


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.1-cp39-cp39-win_amd64.whl (17.7 MB view details)

Uploaded CPython 3.9 Windows x86-64

qif-1.2.1-cp39-cp39-manylinux2010_x86_64.whl (20.9 MB view details)

Uploaded CPython 3.9 manylinux: glibc 2.12+ x86-64

qif-1.2.1-cp39-cp39-macosx_10_9_x86_64.whl (13.0 MB view details)

Uploaded CPython 3.9 macOS 10.9+ x86-64

qif-1.2.1-cp38-cp38-win_amd64.whl (17.7 MB view details)

Uploaded CPython 3.8 Windows x86-64

qif-1.2.1-cp38-cp38-manylinux2010_x86_64.whl (20.9 MB view details)

Uploaded CPython 3.8 manylinux: glibc 2.12+ x86-64

qif-1.2.1-cp38-cp38-macosx_10_9_x86_64.whl (13.0 MB view details)

Uploaded CPython 3.8 macOS 10.9+ x86-64

qif-1.2.1-cp37-cp37m-win_amd64.whl (17.6 MB view details)

Uploaded CPython 3.7m Windows x86-64

qif-1.2.1-cp37-cp37m-manylinux2010_x86_64.whl (20.9 MB view details)

Uploaded CPython 3.7m manylinux: glibc 2.12+ x86-64

qif-1.2.1-cp37-cp37m-macosx_10_9_x86_64.whl (13.0 MB view details)

Uploaded CPython 3.7m macOS 10.9+ x86-64

qif-1.2.1-cp36-cp36m-win_amd64.whl (17.6 MB view details)

Uploaded CPython 3.6m Windows x86-64

qif-1.2.1-cp36-cp36m-manylinux2010_x86_64.whl (20.9 MB view details)

Uploaded CPython 3.6m manylinux: glibc 2.12+ x86-64

qif-1.2.1-cp36-cp36m-macosx_10_9_x86_64.whl (13.0 MB view details)

Uploaded CPython 3.6m macOS 10.9+ x86-64

File details

Details for the file qif-1.2.1-cp39-cp39-win_amd64.whl.

File metadata

  • Download URL: qif-1.2.1-cp39-cp39-win_amd64.whl
  • Upload date:
  • Size: 17.7 MB
  • Tags: CPython 3.9, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/53.0.0 requests-toolbelt/0.9.1 tqdm/4.56.2 CPython/3.9.1

File hashes

Hashes for qif-1.2.1-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 3f7767bf2b47aa8e7f385b849f6273b998db5a8276855432f5e9cfe92f855733
MD5 5d0cc8a498afaf211e97c6e1a9ca048c
BLAKE2b-256 007d969e307cfacfbdf50fb12be33234b8c0437f10db81a2d5dc5a97e65dd4b7

See more details on using hashes here.

File details

Details for the file qif-1.2.1-cp39-cp39-manylinux2010_x86_64.whl.

File metadata

  • Download URL: qif-1.2.1-cp39-cp39-manylinux2010_x86_64.whl
  • Upload date:
  • Size: 20.9 MB
  • Tags: CPython 3.9, manylinux: glibc 2.12+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/53.0.0 requests-toolbelt/0.9.1 tqdm/4.56.2 CPython/3.9.1

File hashes

Hashes for qif-1.2.1-cp39-cp39-manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 527ad558e6aac25254a7461a68c5f613bb3b4ccdb258814ad9006a2e9855d13d
MD5 60005229a9755f5f362450002a46149f
BLAKE2b-256 18bd660f0e1deb38dc230fb1d436152b395e11e48bab4e325913534b93414a19

See more details on using hashes here.

File details

Details for the file qif-1.2.1-cp39-cp39-macosx_10_9_x86_64.whl.

File metadata

  • Download URL: qif-1.2.1-cp39-cp39-macosx_10_9_x86_64.whl
  • Upload date:
  • Size: 13.0 MB
  • Tags: CPython 3.9, macOS 10.9+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/53.0.0 requests-toolbelt/0.9.1 tqdm/4.56.2 CPython/3.9.1

File hashes

Hashes for qif-1.2.1-cp39-cp39-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 b6e8b7d14e6d450a6ecee636371ae543dbea9aa45f13f66f329ba6ce26a87ea3
MD5 63ec7f459e667579277d3d72fd340574
BLAKE2b-256 2cfe0cc2b4bc685c390d982dc5dc6036c7d3a4b05ab5c5b7797f11c4130dccf4

See more details on using hashes here.

File details

Details for the file qif-1.2.1-cp38-cp38-win_amd64.whl.

File metadata

  • Download URL: qif-1.2.1-cp38-cp38-win_amd64.whl
  • Upload date:
  • Size: 17.7 MB
  • Tags: CPython 3.8, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/53.0.0 requests-toolbelt/0.9.1 tqdm/4.56.2 CPython/3.9.1

File hashes

Hashes for qif-1.2.1-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 a91c01aff5f4a37ace1c1ed60328219e5a6234a2f5124d72d72e8935950ff146
MD5 b969e21edb7b70e364890d415a896f45
BLAKE2b-256 f9ef3960080df233be457bf8b9e49a696b85b75e6dbe380aaa52fcce373b64a7

See more details on using hashes here.

File details

Details for the file qif-1.2.1-cp38-cp38-manylinux2010_x86_64.whl.

File metadata

  • Download URL: qif-1.2.1-cp38-cp38-manylinux2010_x86_64.whl
  • Upload date:
  • Size: 20.9 MB
  • Tags: CPython 3.8, manylinux: glibc 2.12+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/53.0.0 requests-toolbelt/0.9.1 tqdm/4.56.2 CPython/3.9.1

File hashes

Hashes for qif-1.2.1-cp38-cp38-manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 db8e9a0e5c29272052b34ea621b3dd02eec653d3fe4b8bc8067857c808b63019
MD5 2e0391d9bafd12c57d64a7d43c338647
BLAKE2b-256 eaac039582e52c0bb1d6eb09432f6ced73ddf09eac07178dcbb75f7effeb7825

See more details on using hashes here.

File details

Details for the file qif-1.2.1-cp38-cp38-macosx_10_9_x86_64.whl.

File metadata

  • Download URL: qif-1.2.1-cp38-cp38-macosx_10_9_x86_64.whl
  • Upload date:
  • Size: 13.0 MB
  • Tags: CPython 3.8, macOS 10.9+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/53.0.0 requests-toolbelt/0.9.1 tqdm/4.56.2 CPython/3.9.1

File hashes

Hashes for qif-1.2.1-cp38-cp38-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 d051fdf326b59a5a7fb135d6d0b470a527858d6a41f6b96ab8b3c592e750f7ff
MD5 291d290dd5c7735c4b6f71d562194bd5
BLAKE2b-256 96d2695c23a98f583cd7122233b0c6840630cf078a8fa06a73d73d7b80e737fa

See more details on using hashes here.

File details

Details for the file qif-1.2.1-cp37-cp37m-win_amd64.whl.

File metadata

  • Download URL: qif-1.2.1-cp37-cp37m-win_amd64.whl
  • Upload date:
  • Size: 17.6 MB
  • Tags: CPython 3.7m, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/53.0.0 requests-toolbelt/0.9.1 tqdm/4.56.2 CPython/3.9.1

File hashes

Hashes for qif-1.2.1-cp37-cp37m-win_amd64.whl
Algorithm Hash digest
SHA256 50439376b72341f636501ac060d210bd134f4314c23d42e87e9183fbd253e2c8
MD5 e163a05ff1446a69e7fb9fb1f410940c
BLAKE2b-256 d72e327962acf2dc19090ab91dff051fd67097d5018671e61cfbb63059bdf158

See more details on using hashes here.

File details

Details for the file qif-1.2.1-cp37-cp37m-manylinux2010_x86_64.whl.

File metadata

  • Download URL: qif-1.2.1-cp37-cp37m-manylinux2010_x86_64.whl
  • Upload date:
  • Size: 20.9 MB
  • Tags: CPython 3.7m, manylinux: glibc 2.12+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/53.0.0 requests-toolbelt/0.9.1 tqdm/4.56.2 CPython/3.9.1

File hashes

Hashes for qif-1.2.1-cp37-cp37m-manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 0e59c5ea30ac35820ef94a32fa0f94ca2c0596ba4be8d2b5c268b6b9e72c449d
MD5 f64cb3995616f56cc11b1a609e7bde80
BLAKE2b-256 8f1fdc893d59c71689d173e0f432914b3ad87a9965f4ff38270aac204b7cb0c1

See more details on using hashes here.

File details

Details for the file qif-1.2.1-cp37-cp37m-macosx_10_9_x86_64.whl.

File metadata

  • Download URL: qif-1.2.1-cp37-cp37m-macosx_10_9_x86_64.whl
  • Upload date:
  • Size: 13.0 MB
  • Tags: CPython 3.7m, macOS 10.9+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/53.0.0 requests-toolbelt/0.9.1 tqdm/4.56.2 CPython/3.9.1

File hashes

Hashes for qif-1.2.1-cp37-cp37m-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 9c62701e3e7bbe59f841968416ffa89633898b52287e5cd37332ba36b81b01e1
MD5 ba93ad9063f2c298c340a52ad7aea438
BLAKE2b-256 f6e8e3c7f5954865336d1aeee4e9f3f64de3935b169f44a934b62d541332f4df

See more details on using hashes here.

File details

Details for the file qif-1.2.1-cp36-cp36m-win_amd64.whl.

File metadata

  • Download URL: qif-1.2.1-cp36-cp36m-win_amd64.whl
  • Upload date:
  • Size: 17.6 MB
  • Tags: CPython 3.6m, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/53.0.0 requests-toolbelt/0.9.1 tqdm/4.56.2 CPython/3.9.1

File hashes

Hashes for qif-1.2.1-cp36-cp36m-win_amd64.whl
Algorithm Hash digest
SHA256 53a68ed1aca93b1ad6e06cbc781837029fc8ff6bfb4dace0d336410448da35c4
MD5 6e8fe75a4645d1517d7f2fba8206add3
BLAKE2b-256 3bf9da64891962eb3c832285ddf19da79fd98e4df8e0c648c952a4947603e7ef

See more details on using hashes here.

File details

Details for the file qif-1.2.1-cp36-cp36m-manylinux2010_x86_64.whl.

File metadata

  • Download URL: qif-1.2.1-cp36-cp36m-manylinux2010_x86_64.whl
  • Upload date:
  • Size: 20.9 MB
  • Tags: CPython 3.6m, manylinux: glibc 2.12+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/53.0.0 requests-toolbelt/0.9.1 tqdm/4.56.2 CPython/3.9.1

File hashes

Hashes for qif-1.2.1-cp36-cp36m-manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 46053b7e5c7d49f3e26fa4096b8095907e5b270ddf7666101e01e45b90e409bc
MD5 7a5401fe6fca61fc2ae6a93957405878
BLAKE2b-256 afc1600f6d1a325f3e33bec6ad8a509a1bd454664cc6457eb2dc43f80d7baf83

See more details on using hashes here.

File details

Details for the file qif-1.2.1-cp36-cp36m-macosx_10_9_x86_64.whl.

File metadata

  • Download URL: qif-1.2.1-cp36-cp36m-macosx_10_9_x86_64.whl
  • Upload date:
  • Size: 13.0 MB
  • Tags: CPython 3.6m, macOS 10.9+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/53.0.0 requests-toolbelt/0.9.1 tqdm/4.56.2 CPython/3.9.1

File hashes

Hashes for qif-1.2.1-cp36-cp36m-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 67c34cad1ee23036717098ba3299a2f12e93a32016b958930e80a5fa01da52b2
MD5 221dfd10ab9cad80fb364be148a355e3
BLAKE2b-256 d0521200b40cb4445260c97335de76f87aa31e8f6239d16e4c5d8038e0d5d35a

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page