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

Uploaded CPython 3.8 manylinux: glibc 2.12+ x86-64

qif-1.1.1-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.1-cp37-cp37m-manylinux2010_x86_64.whl (18.9 MB view details)

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

qif-1.1.1-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.1-cp36-cp36m-manylinux2010_x86_64.whl (18.9 MB view details)

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

qif-1.1.1-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.1-cp35-cp35m-manylinux2010_x86_64.whl (18.9 MB view details)

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

qif-1.1.1-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.1-cp38-cp38-manylinux2010_x86_64.whl.

File metadata

  • Download URL: qif-1.1.1-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.1-cp38-cp38-manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 da09a8c235d887bd1342d33b10bae5f9524bab2c3de2dee651ce4f8bdacde375
MD5 a6397f4bc55d1b5d3291ecf2b3c5816f
BLAKE2b-256 0747aa275d25c201ec2b155c50887cb1928994e8db36f5eb92af7fc5a807570a

See more details on using hashes here.

File details

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

File metadata

  • Download URL: qif-1.1.1-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.1-cp38-cp38-macosx_10_13_x86_64.whl
Algorithm Hash digest
SHA256 2a8587950c2fe06940069f17491cd0b5d2c757c1e8774153cac6b2cfd8aabe12
MD5 0dac13b7a5b933e1374885a7a18d5d9c
BLAKE2b-256 118c2532ed21ed721c815b9b9dc0060afff0efa0c06aaff28b9f3e4eb6dfd541

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for qif-1.1.1-cp37-cp37m-manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 ffed67233ffb8b001506818eff7521295a2df3273a80b724fb308785a30908e0
MD5 3b4526ad8311e8fc0515a7aa109f2c9f
BLAKE2b-256 5dee769e5d7aa5bd99c966df69bc5953d951cb9f9df68f71f24b0056a610c417

See more details on using hashes here.

File details

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

File metadata

  • Download URL: qif-1.1.1-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.1-cp37-cp37m-macosx_10_13_x86_64.whl
Algorithm Hash digest
SHA256 689e752ff9dc96bf068a483a5d6dc944bb7ec786d531b1cfaaa0282e7befab99
MD5 57d9f73e74e71b38775e45568af5fced
BLAKE2b-256 3a0ebcbb044d68ffb81a96a0199173dbbb88156781d9e6dc9d0e0d0113e0eb3f

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for qif-1.1.1-cp36-cp36m-manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 c05e11b7a23492c2a42c0a50dbed47c9197678eb5ffbea91dfcdbbd0ce78b8f2
MD5 b01dbd43b19c608b5f6145071dbbc8bf
BLAKE2b-256 85ed8bc44ac427fe4e0662652a15e3b5b5032a01012e4ca463efef0ad2fd7bc4

See more details on using hashes here.

File details

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

File metadata

  • Download URL: qif-1.1.1-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.1-cp36-cp36m-macosx_10_13_x86_64.whl
Algorithm Hash digest
SHA256 a6a4fd7f684f6c0bb421dd279047370fc596e7aca46861f009f4a3f319a23f9e
MD5 46b0ec9f8e65bc961c278614e00bc691
BLAKE2b-256 b27a4d8a40560f475fb6bca17f2f2d397ac575f8ff345473e6032de864d184c3

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for qif-1.1.1-cp35-cp35m-manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 9915db5616e7791d3a450259a3c4540aab61e997588488e2231cabebefea28b4
MD5 8d89ca47f67d039b0221085e34bd4979
BLAKE2b-256 2e87d164836fb280ebdd33e905da92d8d097e04effa5541320d491d35f5350d2

See more details on using hashes here.

File details

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

File metadata

  • Download URL: qif-1.1.1-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.1-cp35-cp35m-macosx_10_13_x86_64.whl
Algorithm Hash digest
SHA256 e131c783bd699e8a3fd3c02fac1dfb3f8e57e6d887c2c25399bb77a5c75bfe6a
MD5 f05b3730219d03d803c1c263e4c6f60d
BLAKE2b-256 f3521deb02253ebed9e4119bb2cd75409fe0fdb6ae224c70068c3a33c23629f6

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