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

Uploaded CPython 3.9 Windows x86-64

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

Uploaded CPython 3.9 manylinux: glibc 2.12+ x86-64

qif-1.2.0-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.0-cp38-cp38-win_amd64.whl (17.7 MB view details)

Uploaded CPython 3.8 Windows x86-64

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

Uploaded CPython 3.8 manylinux: glibc 2.12+ x86-64

qif-1.2.0-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.0-cp37-cp37m-win_amd64.whl (17.6 MB view details)

Uploaded CPython 3.7m Windows x86-64

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

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

qif-1.2.0-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.0-cp36-cp36m-win_amd64.whl (17.6 MB view details)

Uploaded CPython 3.6m Windows x86-64

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

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

qif-1.2.0-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.0-cp39-cp39-win_amd64.whl.

File metadata

  • Download URL: qif-1.2.0-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.6.1 requests/2.25.1 setuptools/51.1.0 requests-toolbelt/0.9.1 tqdm/4.55.0 CPython/3.8.7

File hashes

Hashes for qif-1.2.0-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 36f9636db46142c4f2222e292a0eef49d80be74bc47aed00bb08cb9b5622ae54
MD5 d807bafb4cdf793a5a443b9ea197077a
BLAKE2b-256 8387b7030a6d3cf223190b7fc82ab9d47d378dd736096223a6ca3c0877574498

See more details on using hashes here.

File details

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

File metadata

  • Download URL: qif-1.2.0-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.6.1 requests/2.25.1 setuptools/51.1.0 requests-toolbelt/0.9.1 tqdm/4.55.0 CPython/3.8.7

File hashes

Hashes for qif-1.2.0-cp39-cp39-manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 df8f95f97efc0a0e7eeda71c94983a50a5f5417290136539a5574aad8aadf100
MD5 80400078286e6d812b4c39ce93a8ffb5
BLAKE2b-256 56708d770fe7f155ea3c30bc9f114bec457b306d8188c96336c629ed33555403

See more details on using hashes here.

File details

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

File metadata

  • Download URL: qif-1.2.0-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.6.1 requests/2.25.1 setuptools/51.1.0 requests-toolbelt/0.9.1 tqdm/4.55.0 CPython/3.8.7

File hashes

Hashes for qif-1.2.0-cp39-cp39-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 3f8e6d7f1ba839cd816e83a934ae02f5e76d5f8e2f04c5e39a9ade996c574a61
MD5 73a14e04816f455632f7fd4e63a369cf
BLAKE2b-256 2c1579fe57d285376454766b3fc9d64770c5fbe61713bcd301d664f5eefb88e0

See more details on using hashes here.

File details

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

File metadata

  • Download URL: qif-1.2.0-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.6.1 requests/2.25.1 setuptools/51.1.0 requests-toolbelt/0.9.1 tqdm/4.55.0 CPython/3.8.7

File hashes

Hashes for qif-1.2.0-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 32f66907148f13764f49562ddfca7bcb11bf922f7b61b75bd6e15a8d2b3918e7
MD5 c728011545a013ff443b39ba97d95037
BLAKE2b-256 0dd136b5abd673cc8e4a9662ef036c9bc283c63f7c99bd34a9a39e146ee99ede

See more details on using hashes here.

File details

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

File metadata

  • Download URL: qif-1.2.0-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.6.1 requests/2.25.1 setuptools/51.1.0 requests-toolbelt/0.9.1 tqdm/4.55.0 CPython/3.8.7

File hashes

Hashes for qif-1.2.0-cp38-cp38-manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 11d322ecf04f7381922368fa5f39e957210dae2e5a051472d1f71ce541c7d68c
MD5 cabf03f6e2fd1968b600bf9eff59dfb7
BLAKE2b-256 87742d95177618550f96e3ec3b854f7370699af8470ad0c2bdce7435319c7d32

See more details on using hashes here.

File details

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

File metadata

  • Download URL: qif-1.2.0-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.6.1 requests/2.25.1 setuptools/51.1.0 requests-toolbelt/0.9.1 tqdm/4.55.0 CPython/3.8.7

File hashes

Hashes for qif-1.2.0-cp38-cp38-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 2542c3434c28c07702d2bde764fba75d391b5847743eb3027e6ec689dadd1f96
MD5 6765f81d0f54e075cc005d0c1f5b0b46
BLAKE2b-256 3cd704df493c7a7777aec559d76a7c96c1ba363fbd991c5015a2bff588717769

See more details on using hashes here.

File details

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

File metadata

  • Download URL: qif-1.2.0-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.6.1 requests/2.25.1 setuptools/51.1.0 requests-toolbelt/0.9.1 tqdm/4.55.0 CPython/3.8.7

File hashes

Hashes for qif-1.2.0-cp37-cp37m-win_amd64.whl
Algorithm Hash digest
SHA256 f97bdd0ad05e9a7a94a7ac463cc7966b2bfc579f546d57d0bd75f36adf895b3f
MD5 e65568816865a5ebbe96636a095c0b16
BLAKE2b-256 365f4e6f1a7f7c4c64a3e5fe3aeab5a376e4c27989853d7105322150704b0c52

See more details on using hashes here.

File details

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

File metadata

  • Download URL: qif-1.2.0-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.6.1 requests/2.25.1 setuptools/51.1.0 requests-toolbelt/0.9.1 tqdm/4.55.0 CPython/3.8.7

File hashes

Hashes for qif-1.2.0-cp37-cp37m-manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 36c10e6bc742c4e38b9168ee1e697db99cfbbb80153880ea2681e0d39067f17b
MD5 d19f20afdf5e15b5a66e6f418db0147d
BLAKE2b-256 a896ecbfc97a3c82fae0b51450d0fdfd853f485063bf5e9e0b17cc75db949cff

See more details on using hashes here.

File details

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

File metadata

  • Download URL: qif-1.2.0-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.6.1 requests/2.25.1 setuptools/51.1.0 requests-toolbelt/0.9.1 tqdm/4.55.0 CPython/3.8.7

File hashes

Hashes for qif-1.2.0-cp37-cp37m-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 471f6503c6996135d7877ec83df5703d8ec2972632109bd11f0c564ad6ae46ea
MD5 926d274afd93310c367068d8a887d1af
BLAKE2b-256 61b0c62ba00ec4e2bd489c12111602705b0876d1ed8d20d9424a42ba81daa2fe

See more details on using hashes here.

File details

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

File metadata

  • Download URL: qif-1.2.0-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.6.1 requests/2.25.1 setuptools/51.1.0 requests-toolbelt/0.9.1 tqdm/4.55.0 CPython/3.8.7

File hashes

Hashes for qif-1.2.0-cp36-cp36m-win_amd64.whl
Algorithm Hash digest
SHA256 13c318486ccd989d4a3c75d0621008496c4ccf297e65dafe9534107d6831bba7
MD5 c0987b49bdfaf56375514f2561079b5a
BLAKE2b-256 36f981ce5e967040d7333744d18c3ff85a680ae617d75a29af74cd745375575d

See more details on using hashes here.

File details

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

File metadata

  • Download URL: qif-1.2.0-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.6.1 requests/2.25.1 setuptools/51.1.0 requests-toolbelt/0.9.1 tqdm/4.55.0 CPython/3.8.7

File hashes

Hashes for qif-1.2.0-cp36-cp36m-manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 e7f2d0f52ff2182902a3c634b90f89e872fb651461ea5125b20c736367c0cf0e
MD5 aeafb6046e4cc8b0d90ffb4cc6e2dac7
BLAKE2b-256 a0254f980d7bf73aa0ae90f6a0d8fcb0fbfc1ee170918502fe44d0e2be9f8dae

See more details on using hashes here.

File details

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

File metadata

  • Download URL: qif-1.2.0-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.6.1 requests/2.25.1 setuptools/51.1.0 requests-toolbelt/0.9.1 tqdm/4.55.0 CPython/3.8.7

File hashes

Hashes for qif-1.2.0-cp36-cp36m-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 d5583bef3bec0ff4f85034c1acd9fc450a8b3aaab8c5ed256b63d0d6acca04b1
MD5 08547c65c12f7301292cc004bbb3d1fe
BLAKE2b-256 db5bc32cd593bad724a2c3f92a153e728374ec439c51ba1bd3f02dac40de4648

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