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.1.4-cp39-cp39-manylinux2010_x86_64.whl (20.7 MB view details)

Uploaded CPython 3.9 manylinux: glibc 2.12+ x86-64

qif-1.1.4-cp39-cp39-macosx_10_9_x86_64.whl (12.9 MB view details)

Uploaded CPython 3.9 macOS 10.9+ x86-64

qif-1.1.4-cp38-cp38-manylinux2010_x86_64.whl (20.7 MB view details)

Uploaded CPython 3.8 manylinux: glibc 2.12+ x86-64

qif-1.1.4-cp38-cp38-macosx_10_9_x86_64.whl (12.9 MB view details)

Uploaded CPython 3.8 macOS 10.9+ x86-64

qif-1.1.4-cp37-cp37m-manylinux2010_x86_64.whl (20.7 MB view details)

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

qif-1.1.4-cp37-cp37m-macosx_10_9_x86_64.whl (12.9 MB view details)

Uploaded CPython 3.7m macOS 10.9+ x86-64

qif-1.1.4-cp36-cp36m-manylinux2010_x86_64.whl (20.7 MB view details)

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

qif-1.1.4-cp36-cp36m-macosx_10_9_x86_64.whl (12.9 MB view details)

Uploaded CPython 3.6m macOS 10.9+ x86-64

qif-1.1.4-cp35-cp35m-manylinux2010_x86_64.whl (20.7 MB view details)

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

qif-1.1.4-cp35-cp35m-macosx_10_9_x86_64.whl (12.9 MB view details)

Uploaded CPython 3.5m macOS 10.9+ x86-64

File details

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

File metadata

  • Download URL: qif-1.1.4-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.8.6

File hashes

Hashes for qif-1.1.4-cp39-cp39-manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 c6597478be9760048c34571c00d9a1d54eca3fd41fab08ce00f211b15f1bc7b4
MD5 5de4394e8eb62581b88bf3373e78655e
BLAKE2b-256 6d4c6cffa30b08789a21f014d0722f13b94fc65ca7a5b51482fe6b61fc71f7c2

See more details on using hashes here.

File details

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

File metadata

  • Download URL: qif-1.1.4-cp39-cp39-macosx_10_9_x86_64.whl
  • Upload date:
  • Size: 12.9 MB
  • Tags: CPython 3.9, macOS 10.9+ 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.8.6

File hashes

Hashes for qif-1.1.4-cp39-cp39-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 49d4cbcf97085a2104d70eca02373c39493d3bf9970cba2a87a1ac3e649e86e2
MD5 bad195dac50cd8d00a2bf00bf7137a67
BLAKE2b-256 65e7b1bbd6ad32186f7fd392dcee67ac3a1ceb96e73b497d20e700a9b2f385f4

See more details on using hashes here.

File details

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

File metadata

  • Download URL: qif-1.1.4-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.8.6

File hashes

Hashes for qif-1.1.4-cp38-cp38-manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 29b2c0892526a8fd877708a2e55fa32dbe7e3441de1afc0c23d3bec64bcd104a
MD5 ff54d8ad40b32734b492fd49c19741ba
BLAKE2b-256 08dbd7b74caa598f293cb63e9599bac5d3cc8051a9452694d6665f2fd8ee2d63

See more details on using hashes here.

File details

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

File metadata

  • Download URL: qif-1.1.4-cp38-cp38-macosx_10_9_x86_64.whl
  • Upload date:
  • Size: 12.9 MB
  • Tags: CPython 3.8, macOS 10.9+ 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.8.6

File hashes

Hashes for qif-1.1.4-cp38-cp38-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 bc9669eab58dcb73a4ae103efca8684edef137fe87c0e6903fb176689e511e52
MD5 f56dbd4fe1faa4ce64deff2f6d66e37c
BLAKE2b-256 4b099b1ecacc2c59121d0014670924af24237453e89c0a1ff990b7ce65febdac

See more details on using hashes here.

File details

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

File metadata

  • Download URL: qif-1.1.4-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.8.6

File hashes

Hashes for qif-1.1.4-cp37-cp37m-manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 644b645d6e48b95835f332f7ab8e733e87d3e3158f972933b01ee81f3c168035
MD5 6efa51033e163c13a2c3a838855411e7
BLAKE2b-256 ec362464582e6a85ab0a4d4cae917927b629fc974545a430d2c984d39a3bda44

See more details on using hashes here.

File details

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

File metadata

  • Download URL: qif-1.1.4-cp37-cp37m-macosx_10_9_x86_64.whl
  • Upload date:
  • Size: 12.9 MB
  • Tags: CPython 3.7m, macOS 10.9+ 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.8.6

File hashes

Hashes for qif-1.1.4-cp37-cp37m-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 2910f1f689a268decc965a36554d2cb7e8879a81cfa7f501d24ccd70d9a152a3
MD5 46d12066262ff20583cffbb32a527da3
BLAKE2b-256 43be46021c7dc687912b5ed6102c46177da4cc96d60802ab60b6d8159879fa6c

See more details on using hashes here.

File details

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

File metadata

  • Download URL: qif-1.1.4-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.8.6

File hashes

Hashes for qif-1.1.4-cp36-cp36m-manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 a4db9693742e6269669394c9e9c57d5d1b9acdc3d9682b106ed13851e8a93664
MD5 c47a99baeed18d7cbaa952c74e3d9346
BLAKE2b-256 65da6fe85d97a93b9308eedbbacd80c0df716eaf4e8120bf6acde47cd5254371

See more details on using hashes here.

File details

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

File metadata

  • Download URL: qif-1.1.4-cp36-cp36m-macosx_10_9_x86_64.whl
  • Upload date:
  • Size: 12.9 MB
  • Tags: CPython 3.6m, macOS 10.9+ 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.8.6

File hashes

Hashes for qif-1.1.4-cp36-cp36m-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 d513509e47f9f7142dc4998bb12c35ebd09662f65ddcf43f2876a2390b7a0179
MD5 358c3115b5aba087b731b3f7ebe244bb
BLAKE2b-256 42fa2603dbc31eb60baf06c714f2bd2a4371000cad0416fc290714ae16af6f9f

See more details on using hashes here.

File details

Details for the file qif-1.1.4-cp35-cp35m-manylinux2010_x86_64.whl.

File metadata

  • Download URL: qif-1.1.4-cp35-cp35m-manylinux2010_x86_64.whl
  • Upload date:
  • Size: 20.7 MB
  • Tags: CPython 3.5m, 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.8.6

File hashes

Hashes for qif-1.1.4-cp35-cp35m-manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 916b6a97810abbdb305c3ca9b64e93a997ace5327d3a4677c300d18e5274b3a5
MD5 e29ba31b2ce77a932056a22333aa6464
BLAKE2b-256 2870aa872fb1eaa0a1dfd57a9ced770165dc6bfa39a44a500352371514cec142

See more details on using hashes here.

File details

Details for the file qif-1.1.4-cp35-cp35m-macosx_10_9_x86_64.whl.

File metadata

  • Download URL: qif-1.1.4-cp35-cp35m-macosx_10_9_x86_64.whl
  • Upload date:
  • Size: 12.9 MB
  • Tags: CPython 3.5m, macOS 10.9+ 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.8.6

File hashes

Hashes for qif-1.1.4-cp35-cp35m-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 5fe513df73e14c6b01405fdb4c5bda14fabf0f3a898a254709691e08af0876c5
MD5 6d12396c65dc1dd1a49a64eb5d0c10a1
BLAKE2b-256 f5bb2fac0f1aeb25ea1f9faf7e7379d51a3c2f56f450fe0a230568d195af8aa3

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