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.0-cp38-cp38-manylinux2010_x86_64.whl (18.8 MB view details)

Uploaded CPython 3.8 manylinux: glibc 2.12+ x86-64

qif-1.1.0-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.0-cp37-cp37m-manylinux2010_x86_64.whl (18.8 MB view details)

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

qif-1.1.0-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.0-cp36-cp36m-manylinux2010_x86_64.whl (18.8 MB view details)

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

qif-1.1.0-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.0-cp35-cp35m-manylinux2010_x86_64.whl (18.8 MB view details)

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

qif-1.1.0-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.0-cp38-cp38-manylinux2010_x86_64.whl.

File metadata

  • Download URL: qif-1.1.0-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/42.0.2 requests-toolbelt/0.9.1 tqdm/4.41.0 CPython/3.6.9

File hashes

Hashes for qif-1.1.0-cp38-cp38-manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 9ce58115b274e129d46a1ce790377cf9f789ed87e591914bb4be73137cbe9524
MD5 7b8a683ed12093952b4754cb7b2e682c
BLAKE2b-256 d4cb7518cb57cc7398eb10449be37a54e510e9c210b0c3aa9aaca7d748f07ea5

See more details on using hashes here.

File details

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

File metadata

  • Download URL: qif-1.1.0-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/42.0.2 requests-toolbelt/0.9.1 tqdm/4.41.0 CPython/3.8.0

File hashes

Hashes for qif-1.1.0-cp38-cp38-macosx_10_13_x86_64.whl
Algorithm Hash digest
SHA256 4672ab11f2c42de47be78c06e02dd2e8f262b0f2204a4ff0da316798c71971af
MD5 a27a62aa2aa051fdda11a8bb4a6c780d
BLAKE2b-256 46ba53d3c2341d288aa1300be7c5272c3b578c9a90823925e6eafa815779a442

See more details on using hashes here.

File details

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

File metadata

  • Download URL: qif-1.1.0-cp37-cp37m-manylinux2010_x86_64.whl
  • Upload date:
  • Size: 18.8 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/42.0.2 requests-toolbelt/0.9.1 tqdm/4.41.0 CPython/3.6.9

File hashes

Hashes for qif-1.1.0-cp37-cp37m-manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 fc7587b1b32ec2fa8c2617b42ab5fbe28483452dd71e10dec81d6936734bc78a
MD5 7f8b4678ccc012db37817c180a0638a3
BLAKE2b-256 ab418bd39c9baf297b49667294ff47f47f5d5416dabce13a6891cf27000d976b

See more details on using hashes here.

File details

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

File metadata

  • Download URL: qif-1.1.0-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/42.0.2 requests-toolbelt/0.9.1 tqdm/4.41.0 CPython/3.8.0

File hashes

Hashes for qif-1.1.0-cp37-cp37m-macosx_10_13_x86_64.whl
Algorithm Hash digest
SHA256 0db5bb42f138544034762ca5fd651159c86c3e0c9a5d85781e15b1b63e3ab0eb
MD5 18aca376e4101d468451b1d8ef9d5fdd
BLAKE2b-256 fef8546450a45c0b978630aecd6a095dc05e8ef5756d6f7ce295cdf9544bbd2b

See more details on using hashes here.

File details

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

File metadata

  • Download URL: qif-1.1.0-cp36-cp36m-manylinux2010_x86_64.whl
  • Upload date:
  • Size: 18.8 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/42.0.2 requests-toolbelt/0.9.1 tqdm/4.41.0 CPython/3.6.9

File hashes

Hashes for qif-1.1.0-cp36-cp36m-manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 9c09d20921fc0c6140f579761dfb3c1e11f40e2dae2c12a5babebd493dc3ec9d
MD5 fb5ede9ae5d42e881b213e2581926986
BLAKE2b-256 20fbbc493dd93cfc8b6fd5419e23b80fd0f132f79daf39a7523c68eb933bb24e

See more details on using hashes here.

File details

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

File metadata

  • Download URL: qif-1.1.0-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/42.0.2 requests-toolbelt/0.9.1 tqdm/4.41.0 CPython/3.8.0

File hashes

Hashes for qif-1.1.0-cp36-cp36m-macosx_10_13_x86_64.whl
Algorithm Hash digest
SHA256 d64ca16eabc96480f66ba6d1e58c6e80f90ef3df30e1fb721efb555904b62efc
MD5 1d8c90c585f20ae64e06a5d5a69892b0
BLAKE2b-256 644d4b7bcbd7c415f6a8626a144feeb537758a08c077ebadc2578719ad27892e

See more details on using hashes here.

File details

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

File metadata

  • Download URL: qif-1.1.0-cp35-cp35m-manylinux2010_x86_64.whl
  • Upload date:
  • Size: 18.8 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/42.0.2 requests-toolbelt/0.9.1 tqdm/4.41.0 CPython/3.6.9

File hashes

Hashes for qif-1.1.0-cp35-cp35m-manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 ccb5ecb5d97befcaa845793081f643b4de750fac260a6b5d8de566f29d92e1e0
MD5 24a5a006bcfe59ab7f2509f73d6eef48
BLAKE2b-256 6abdd868a4842242e499b2fd1df1bb5cf3032cfd43fa92e0ca73dc4b286c8155

See more details on using hashes here.

File details

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

File metadata

  • Download URL: qif-1.1.0-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/42.0.2 requests-toolbelt/0.9.1 tqdm/4.41.0 CPython/3.8.0

File hashes

Hashes for qif-1.1.0-cp35-cp35m-macosx_10_13_x86_64.whl
Algorithm Hash digest
SHA256 ad4728bf0764e05210efeb5c0461c2c49b299adcc29a444158a728b41f89344e
MD5 c17b135e9489d2c20d88c6b2543d2073
BLAKE2b-256 1cd9880714a86c8d22374630ac2d99e9ffc422850af523e2f5a4befd471b8ff3

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