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.

Files for qif, version 1.1.2
Filename, size File type Python version Upload date Hashes
Filename, size qif-1.1.2-cp35-cp35m-macosx_10_13_x86_64.whl (11.0 MB) File type Wheel Python version cp35 Upload date Hashes View hashes
Filename, size qif-1.1.2-cp35-cp35m-manylinux2010_x86_64.whl (18.9 MB) File type Wheel Python version cp35 Upload date Hashes View hashes
Filename, size qif-1.1.2-cp36-cp36m-macosx_10_13_x86_64.whl (11.0 MB) File type Wheel Python version cp36 Upload date Hashes View hashes
Filename, size qif-1.1.2-cp36-cp36m-manylinux2010_x86_64.whl (18.9 MB) File type Wheel Python version cp36 Upload date Hashes View hashes
Filename, size qif-1.1.2-cp37-cp37m-macosx_10_13_x86_64.whl (11.0 MB) File type Wheel Python version cp37 Upload date Hashes View hashes
Filename, size qif-1.1.2-cp37-cp37m-manylinux2010_x86_64.whl (18.9 MB) File type Wheel Python version cp37 Upload date Hashes View hashes
Filename, size qif-1.1.2-cp38-cp38-macosx_10_13_x86_64.whl (11.0 MB) File type Wheel Python version cp38 Upload date Hashes View hashes
Filename, size qif-1.1.2-cp38-cp38-manylinux2010_x86_64.whl (18.8 MB) File type Wheel Python version cp38 Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page