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

Uploaded CPython 3.9 Windows x86-64

qif-1.1.9-cp39-cp39-manylinux2010_x86_64.whl (20.8 MB view details)

Uploaded CPython 3.9 manylinux: glibc 2.12+ x86-64

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

Uploaded CPython 3.9 macOS 10.9+ x86-64

qif-1.1.9-cp38-cp38-win_amd64.whl (17.6 MB view details)

Uploaded CPython 3.8 Windows x86-64

qif-1.1.9-cp38-cp38-manylinux2010_x86_64.whl (20.8 MB view details)

Uploaded CPython 3.8 manylinux: glibc 2.12+ x86-64

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

Uploaded CPython 3.8 macOS 10.9+ x86-64

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

Uploaded CPython 3.7m Windows x86-64

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

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

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

Uploaded CPython 3.7m macOS 10.9+ x86-64

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

Uploaded CPython 3.6m Windows x86-64

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

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

qif-1.1.9-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.1.9-cp39-cp39-win_amd64.whl.

File metadata

  • Download URL: qif-1.1.9-cp39-cp39-win_amd64.whl
  • Upload date:
  • Size: 17.6 MB
  • Tags: CPython 3.9, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.25.1 setuptools/51.0.0 requests-toolbelt/0.9.1 tqdm/4.54.1 CPython/3.8.6

File hashes

Hashes for qif-1.1.9-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 4f9da106a23fd4226da72f702ee29886a071ee110947bd530d7fe1ac19bd7dc8
MD5 02af5b70131e70544ff41703f7019943
BLAKE2b-256 fe4ecf3967f83b24f8f73a94357e80e6485a5efdf9debe28c0c0fdf99ee1ba4f

See more details on using hashes here.

File details

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

File metadata

  • Download URL: qif-1.1.9-cp39-cp39-manylinux2010_x86_64.whl
  • Upload date:
  • Size: 20.8 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.1 setuptools/51.0.0 requests-toolbelt/0.9.1 tqdm/4.54.1 CPython/3.8.6

File hashes

Hashes for qif-1.1.9-cp39-cp39-manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 e7a4e192564354a24dfec3eceff8d8daeb581cfae027e351745f2651df060c5f
MD5 26a5ac58b45fe30d257c5727ac02eec3
BLAKE2b-256 86900f0b0c22923c371b842eb0069ffee2e3c6be2b9521d65f317b784fc73950

See more details on using hashes here.

File details

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

File metadata

  • Download URL: qif-1.1.9-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.2.0 pkginfo/1.6.1 requests/2.25.1 setuptools/51.0.0 requests-toolbelt/0.9.1 tqdm/4.54.1 CPython/3.8.6

File hashes

Hashes for qif-1.1.9-cp39-cp39-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 db4be9a57b2f28f71161384d3a5a62a5e9d2e0abd1a7c6e8d96c7b484e7de760
MD5 5790de1c1bbde5aaa2335aab25eef734
BLAKE2b-256 aa4e91f7473a235f71a41af8be0d9df1f725836f74be69dc6a4ece09a242d3eb

See more details on using hashes here.

File details

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

File metadata

  • Download URL: qif-1.1.9-cp38-cp38-win_amd64.whl
  • Upload date:
  • Size: 17.6 MB
  • Tags: CPython 3.8, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.25.1 setuptools/51.0.0 requests-toolbelt/0.9.1 tqdm/4.54.1 CPython/3.8.6

File hashes

Hashes for qif-1.1.9-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 7a9fe745a7ca2baba233b457f434d2a021ae9dd7ba3c8eae477310ac4cba44c5
MD5 3305f8857424fdc97f31df8bf8b12d2f
BLAKE2b-256 ee19b4a30f997655152ba9138a072b85edd3cd5b0b249a0b2eb53de4119c52cc

See more details on using hashes here.

File details

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

File metadata

  • Download URL: qif-1.1.9-cp38-cp38-manylinux2010_x86_64.whl
  • Upload date:
  • Size: 20.8 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.1 setuptools/51.0.0 requests-toolbelt/0.9.1 tqdm/4.54.1 CPython/3.8.6

File hashes

Hashes for qif-1.1.9-cp38-cp38-manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 32a83b2b9b50c536ab3dfb6391d5aed9b633cb032ef56ef4776dbcfb5fba3716
MD5 0cf5d9579abfe12664e91777e6ea06e1
BLAKE2b-256 11038cbbfc0a934e671cd97e7a5d5a34d5b2ce52cabb2026489f4c74c40b2df7

See more details on using hashes here.

File details

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

File metadata

  • Download URL: qif-1.1.9-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.2.0 pkginfo/1.6.1 requests/2.25.1 setuptools/51.0.0 requests-toolbelt/0.9.1 tqdm/4.54.1 CPython/3.8.6

File hashes

Hashes for qif-1.1.9-cp38-cp38-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 6c1c6e263c23e92534c812df8d64eb377830fa11ae36f454815c809205df3313
MD5 bd187a9e2497cae7cc03df0eb71a2913
BLAKE2b-256 3cae1ccd2b70c5ec034d299e537bb7880a1c467bae826cbb2009e3b0964f7105

See more details on using hashes here.

File details

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

File metadata

  • Download URL: qif-1.1.9-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.2.0 pkginfo/1.6.1 requests/2.25.1 setuptools/51.0.0 requests-toolbelt/0.9.1 tqdm/4.54.1 CPython/3.8.6

File hashes

Hashes for qif-1.1.9-cp37-cp37m-win_amd64.whl
Algorithm Hash digest
SHA256 0a40952621b54b554ebec1b27fb4bf88303e828354afd69e89a3d8cb2c031865
MD5 3a3414ec7b9e681a94900ecf09681005
BLAKE2b-256 840dfe7ef7a541a177447fd57e2586fc259d8480894b1233db320a5015c62048

See more details on using hashes here.

File details

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

File metadata

  • Download URL: qif-1.1.9-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.2.0 pkginfo/1.6.1 requests/2.25.1 setuptools/51.0.0 requests-toolbelt/0.9.1 tqdm/4.54.1 CPython/3.8.6

File hashes

Hashes for qif-1.1.9-cp37-cp37m-manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 c8e98ee95d5410e7bceef6da03da19f05eecec36e538e5a0e592167fa2b4426c
MD5 fac9bf207c7763140a061132502845ef
BLAKE2b-256 83028cbdb5b6e15d3497fb3db45b3b97f1803117c851c4a7766594b25ade5f13

See more details on using hashes here.

File details

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

File metadata

  • Download URL: qif-1.1.9-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.2.0 pkginfo/1.6.1 requests/2.25.1 setuptools/51.0.0 requests-toolbelt/0.9.1 tqdm/4.54.1 CPython/3.8.6

File hashes

Hashes for qif-1.1.9-cp37-cp37m-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 bbd9a697c2e2b294c88a368220fa7272d2bece9b33ce5881072e46823948c7bd
MD5 9383f3d76640ee1e2de152f19f04ab98
BLAKE2b-256 9aef8a539365448f72d8dea7e42d4bdf454a6e4ea18c833b2f7c556084df9b7f

See more details on using hashes here.

File details

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

File metadata

  • Download URL: qif-1.1.9-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.2.0 pkginfo/1.6.1 requests/2.25.1 setuptools/51.0.0 requests-toolbelt/0.9.1 tqdm/4.54.1 CPython/3.8.6

File hashes

Hashes for qif-1.1.9-cp36-cp36m-win_amd64.whl
Algorithm Hash digest
SHA256 f382f2d47fd582cefcb0cefc87c3ef971f77fd685fd319899316050f26d05c08
MD5 cc8356fa56b23759b82754e9beebdac6
BLAKE2b-256 0a0eea1deb0685480cf83939fa452ce4a3bcb8e3270e8e1718ec5c166b592c26

See more details on using hashes here.

File details

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

File metadata

  • Download URL: qif-1.1.9-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.2.0 pkginfo/1.6.1 requests/2.25.1 setuptools/51.0.0 requests-toolbelt/0.9.1 tqdm/4.54.1 CPython/3.8.6

File hashes

Hashes for qif-1.1.9-cp36-cp36m-manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 7210755fc1fcf161bbe015993b1792b4a491613b8b9e088783ccb185b27b5997
MD5 07f5db5348f15a04128a8381a0562b65
BLAKE2b-256 85e835fdbf48e649e6126d8ae6c479b4ce9e4885a7cf20226c39adc9a2e1b618

See more details on using hashes here.

File details

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

File metadata

  • Download URL: qif-1.1.9-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.2.0 pkginfo/1.6.1 requests/2.25.1 setuptools/51.0.0 requests-toolbelt/0.9.1 tqdm/4.54.1 CPython/3.8.6

File hashes

Hashes for qif-1.1.9-cp36-cp36m-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 7aeb69a7ca6f926b8ab0ed45f2888d7e902ca543565a6216a9d10edb1509a482
MD5 b95f4f3ee58b8124d322dfa8359a71f9
BLAKE2b-256 72d7e0b36e29c14e81fde0af0fbd623ee6ef94054a2e19456f6f44e95f4eb60e

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