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.

Files for qif, version 1.2.1
Filename, size File type Python version Upload date Hashes
Filename, size qif-1.2.1-cp39-cp39-win_amd64.whl (17.7 MB) File type Wheel Python version cp39 Upload date Hashes View
Filename, size qif-1.2.1-cp39-cp39-manylinux2010_x86_64.whl (20.9 MB) File type Wheel Python version cp39 Upload date Hashes View
Filename, size qif-1.2.1-cp39-cp39-macosx_10_9_x86_64.whl (13.0 MB) File type Wheel Python version cp39 Upload date Hashes View
Filename, size qif-1.2.1-cp38-cp38-win_amd64.whl (17.7 MB) File type Wheel Python version cp38 Upload date Hashes View
Filename, size qif-1.2.1-cp38-cp38-manylinux2010_x86_64.whl (20.9 MB) File type Wheel Python version cp38 Upload date Hashes View
Filename, size qif-1.2.1-cp38-cp38-macosx_10_9_x86_64.whl (13.0 MB) File type Wheel Python version cp38 Upload date Hashes View
Filename, size qif-1.2.1-cp37-cp37m-win_amd64.whl (17.6 MB) File type Wheel Python version cp37 Upload date Hashes View
Filename, size qif-1.2.1-cp37-cp37m-manylinux2010_x86_64.whl (20.9 MB) File type Wheel Python version cp37 Upload date Hashes View
Filename, size qif-1.2.1-cp37-cp37m-macosx_10_9_x86_64.whl (13.0 MB) File type Wheel Python version cp37 Upload date Hashes View
Filename, size qif-1.2.1-cp36-cp36m-win_amd64.whl (17.6 MB) File type Wheel Python version cp36 Upload date Hashes View
Filename, size qif-1.2.1-cp36-cp36m-manylinux2010_x86_64.whl (20.9 MB) File type Wheel Python version cp36 Upload date Hashes View
Filename, size qif-1.2.1-cp36-cp36m-macosx_10_9_x86_64.whl (13.0 MB) File type Wheel Python version cp36 Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page