Skip to main content

Quantitative Information Flow library

Project description

Build Status PyPI version

libqif

Install

pip install qif
  • Needs python >= 3.5 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.2-cp38-cp38-manylinux2010_x86_64.whl (18.8 MB view details)

Uploaded CPython 3.8 manylinux: glibc 2.12+ x86-64

qif-1.1.2-cp38-cp38-macosx_10_13_x86_64.whl (11.0 MB view details)

Uploaded CPython 3.8 macOS 10.13+ x86-64

qif-1.1.2-cp37-cp37m-manylinux2010_x86_64.whl (18.9 MB view details)

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

qif-1.1.2-cp37-cp37m-macosx_10_13_x86_64.whl (11.0 MB view details)

Uploaded CPython 3.7m macOS 10.13+ x86-64

qif-1.1.2-cp36-cp36m-manylinux2010_x86_64.whl (18.9 MB view details)

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

qif-1.1.2-cp36-cp36m-macosx_10_13_x86_64.whl (11.0 MB view details)

Uploaded CPython 3.6m macOS 10.13+ x86-64

qif-1.1.2-cp35-cp35m-manylinux2010_x86_64.whl (18.9 MB view details)

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

qif-1.1.2-cp35-cp35m-macosx_10_13_x86_64.whl (11.0 MB view details)

Uploaded CPython 3.5m macOS 10.13+ x86-64

File details

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

File metadata

  • Download URL: qif-1.1.2-cp38-cp38-manylinux2010_x86_64.whl
  • Upload date:
  • Size: 18.8 MB
  • Tags: CPython 3.8, manylinux: glibc 2.12+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/45.0.0 requests-toolbelt/0.9.1 tqdm/4.41.1 CPython/3.6.9

File hashes

Hashes for qif-1.1.2-cp38-cp38-manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 0d94033d1310d6a382ffd4fa78d0c3bd5570d13ea70a835c7d9535c3402b439e
MD5 298025c00fb6dda8994ef1c91492ab3d
BLAKE2b-256 5a04724bb71edbcaf8c2977239369388402b569c66aceed957f9d250e3776f79

See more details on using hashes here.

File details

Details for the file qif-1.1.2-cp38-cp38-macosx_10_13_x86_64.whl.

File metadata

  • Download URL: qif-1.1.2-cp38-cp38-macosx_10_13_x86_64.whl
  • Upload date:
  • Size: 11.0 MB
  • Tags: CPython 3.8, macOS 10.13+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/45.0.0 requests-toolbelt/0.9.1 tqdm/4.41.1 CPython/3.8.0

File hashes

Hashes for qif-1.1.2-cp38-cp38-macosx_10_13_x86_64.whl
Algorithm Hash digest
SHA256 1cae5317cac18e20dd34088222162991ec6900ebef280caf747a48bd5d113e99
MD5 fb51ae27c5964ab22b288d871e8ee661
BLAKE2b-256 fcc92f38de8486c378c722fda8d3775057cab25294953777eecf465e2a01e052

See more details on using hashes here.

File details

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

File metadata

  • Download URL: qif-1.1.2-cp37-cp37m-manylinux2010_x86_64.whl
  • Upload date:
  • Size: 18.9 MB
  • Tags: CPython 3.7m, manylinux: glibc 2.12+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/45.0.0 requests-toolbelt/0.9.1 tqdm/4.41.1 CPython/3.6.9

File hashes

Hashes for qif-1.1.2-cp37-cp37m-manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 7ee14b31828b3844d4662fe1f901cc4160fec1e35515166cc2f6a5b54a3b5b24
MD5 740c7b9b89759ec44ef4a4fc50d74d56
BLAKE2b-256 6ad4ec11c0c7d04365950edf3e2adc14aadd3f72ee8aaf7ce0ed434fcca32d85

See more details on using hashes here.

File details

Details for the file qif-1.1.2-cp37-cp37m-macosx_10_13_x86_64.whl.

File metadata

  • Download URL: qif-1.1.2-cp37-cp37m-macosx_10_13_x86_64.whl
  • Upload date:
  • Size: 11.0 MB
  • Tags: CPython 3.7m, macOS 10.13+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/45.0.0 requests-toolbelt/0.9.1 tqdm/4.41.1 CPython/3.8.0

File hashes

Hashes for qif-1.1.2-cp37-cp37m-macosx_10_13_x86_64.whl
Algorithm Hash digest
SHA256 9af842e6a9945f08c09aa5650a646a646450c1147e413fdc3f13dd93a4501621
MD5 685be736220fb81dd776fd71e887abc3
BLAKE2b-256 6d0fdb1508d6eb09e977a19a9b182953a8553951c51f2050a40256ec143297e1

See more details on using hashes here.

File details

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

File metadata

  • Download URL: qif-1.1.2-cp36-cp36m-manylinux2010_x86_64.whl
  • Upload date:
  • Size: 18.9 MB
  • Tags: CPython 3.6m, manylinux: glibc 2.12+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/45.0.0 requests-toolbelt/0.9.1 tqdm/4.41.1 CPython/3.6.9

File hashes

Hashes for qif-1.1.2-cp36-cp36m-manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 86857bf4837441c8a36981d5da244e04f9bc6e54ff052c131b5219e7ddd76628
MD5 009bebe135d684ba116517cd4be8329c
BLAKE2b-256 a7d208c0c7e861c3df62316c7456b521f41d20234ccd9264f06aff1b2bf13a3e

See more details on using hashes here.

File details

Details for the file qif-1.1.2-cp36-cp36m-macosx_10_13_x86_64.whl.

File metadata

  • Download URL: qif-1.1.2-cp36-cp36m-macosx_10_13_x86_64.whl
  • Upload date:
  • Size: 11.0 MB
  • Tags: CPython 3.6m, macOS 10.13+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/45.0.0 requests-toolbelt/0.9.1 tqdm/4.41.1 CPython/3.8.0

File hashes

Hashes for qif-1.1.2-cp36-cp36m-macosx_10_13_x86_64.whl
Algorithm Hash digest
SHA256 7aa09fbf80878b04bd40e30afa105c4de3969c5eb20efeca2412822d11ec6255
MD5 96f6262d25f96486f50de2ee0b45d655
BLAKE2b-256 2f4c48f3e0edee2d66edc2aeb599187343c0968f3d921ce446810ce82c0e42bf

See more details on using hashes here.

File details

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

File metadata

  • Download URL: qif-1.1.2-cp35-cp35m-manylinux2010_x86_64.whl
  • Upload date:
  • Size: 18.9 MB
  • Tags: CPython 3.5m, manylinux: glibc 2.12+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/45.0.0 requests-toolbelt/0.9.1 tqdm/4.41.1 CPython/3.6.9

File hashes

Hashes for qif-1.1.2-cp35-cp35m-manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 52dd3239a216ecf5407dea77ab339da2ffed5acfccef4b9c60b869224cf2b50b
MD5 c2017f043149579832066e72c92d81c8
BLAKE2b-256 32c5c1652dd44ded95dfe9a6d8fbeb5631629a62a17e03c4f7f0b9f963257969

See more details on using hashes here.

File details

Details for the file qif-1.1.2-cp35-cp35m-macosx_10_13_x86_64.whl.

File metadata

  • Download URL: qif-1.1.2-cp35-cp35m-macosx_10_13_x86_64.whl
  • Upload date:
  • Size: 11.0 MB
  • Tags: CPython 3.5m, macOS 10.13+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/45.0.0 requests-toolbelt/0.9.1 tqdm/4.41.1 CPython/3.8.0

File hashes

Hashes for qif-1.1.2-cp35-cp35m-macosx_10_13_x86_64.whl
Algorithm Hash digest
SHA256 ee3f050700cdabfe73f1587c0ae991efbdb3c5ac58d5b233ba5b49eb3217a811
MD5 baab17c8b6a7804be286ab69f7563163
BLAKE2b-256 0d268fe4eb949e719b9aedded107fd3984bb5e1b6f1cd1fb71a869069af3eab5

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