Skip to main content

Quantitative Information Flow library

Project description

Build Status PyPI version

libqif

Install

pip install qif
  • Needs python >= 3.7 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.2.2-cp310-cp310-win_amd64.whl (17.7 MB view details)

Uploaded CPython 3.10 Windows x86-64

qif-1.2.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (25.0 MB view details)

Uploaded CPython 3.10 manylinux: glibc 2.17+ x86-64

qif-1.2.2-cp310-cp310-macosx_10_9_x86_64.whl (13.4 MB view details)

Uploaded CPython 3.10 macOS 10.9+ x86-64

qif-1.2.2-cp39-cp39-win_amd64.whl (17.7 MB view details)

Uploaded CPython 3.9 Windows x86-64

qif-1.2.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (25.0 MB view details)

Uploaded CPython 3.9 manylinux: glibc 2.17+ x86-64

qif-1.2.2-cp39-cp39-macosx_10_9_x86_64.whl (13.4 MB view details)

Uploaded CPython 3.9 macOS 10.9+ x86-64

qif-1.2.2-cp38-cp38-win_amd64.whl (17.7 MB view details)

Uploaded CPython 3.8 Windows x86-64

qif-1.2.2-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (25.0 MB view details)

Uploaded CPython 3.8 manylinux: glibc 2.17+ x86-64

qif-1.2.2-cp38-cp38-macosx_10_9_x86_64.whl (13.4 MB view details)

Uploaded CPython 3.8 macOS 10.9+ x86-64

qif-1.2.2-cp37-cp37m-win_amd64.whl (17.7 MB view details)

Uploaded CPython 3.7m Windows x86-64

qif-1.2.2-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (25.0 MB view details)

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

qif-1.2.2-cp37-cp37m-macosx_10_9_x86_64.whl (13.4 MB view details)

Uploaded CPython 3.7m macOS 10.9+ x86-64

File details

Details for the file qif-1.2.2-cp310-cp310-win_amd64.whl.

File metadata

  • Download URL: qif-1.2.2-cp310-cp310-win_amd64.whl
  • Upload date:
  • Size: 17.7 MB
  • Tags: CPython 3.10, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.0 CPython/3.9.12

File hashes

Hashes for qif-1.2.2-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 ecd13a116fceb59808648710e057ab55051b6482076726bf07d032bbcf87ea21
MD5 9f7a3c154fd8fa10ab26aa67da6ecbcc
BLAKE2b-256 cf1d7218baea041c579f377da4cc35246a36371018211894843ea77e6d0a8561

See more details on using hashes here.

File details

Details for the file qif-1.2.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for qif-1.2.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 4af38562c60970c2db47ac9859b251c5d5be15687d11cd2176da940aad0bbb4e
MD5 ab49085a1c93f8f7b0b69f9eefa8629d
BLAKE2b-256 45b31220f310a7f1004c5f8256443ebd259bfb07b28670ba97827c55bbb99a96

See more details on using hashes here.

File details

Details for the file qif-1.2.2-cp310-cp310-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for qif-1.2.2-cp310-cp310-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 87408063fbe3f45763310cb92863893de93af59fc6a7cc7304ba177b51ae2fb7
MD5 55207cfa07ebb54eeae18569a2dea293
BLAKE2b-256 ca647a7f31906f17ef4a3ff7828501728def7b3c1fee32a751e3601486a164fe

See more details on using hashes here.

File details

Details for the file qif-1.2.2-cp39-cp39-win_amd64.whl.

File metadata

  • Download URL: qif-1.2.2-cp39-cp39-win_amd64.whl
  • Upload date:
  • Size: 17.7 MB
  • Tags: CPython 3.9, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.0 CPython/3.9.12

File hashes

Hashes for qif-1.2.2-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 a8ada79a5b554b4c1ef0af04d7820b008bc3c3f1c896e82bb606a7fc9db9d25a
MD5 13109b206eae56d4d04e4a698405a0a1
BLAKE2b-256 62db16ff9ff80338cd28d5f4378fb80c9136e0aa0b01b1ea5ae55145ac9bab65

See more details on using hashes here.

File details

Details for the file qif-1.2.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for qif-1.2.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 fa19eaba2a08209a28204e36a0ee2e0b85a82d32f7a30e3f6a4515bcdc113c64
MD5 932329db2e56dcee2b4f0dc3aefb7dc4
BLAKE2b-256 fdc45e1e3ee7104529a51973c0dff202ca34b50fdd7a953cec49d50658cca465

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for qif-1.2.2-cp39-cp39-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 3be88a6f28cc2ff85ec0ceae9d0de5f3aa285beecae13d8444f53320db708c0c
MD5 3bdce3a7468e8efe255671dc409c8966
BLAKE2b-256 b713ecfb9399a43b4598eeb582aefe467818f816c548ae6cf5881e3116d09a0e

See more details on using hashes here.

File details

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

File metadata

  • Download URL: qif-1.2.2-cp38-cp38-win_amd64.whl
  • Upload date:
  • Size: 17.7 MB
  • Tags: CPython 3.8, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.0 CPython/3.9.12

File hashes

Hashes for qif-1.2.2-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 d74e7431ab847d564a938186e180cf98fd1f8a3d81b3dcb546458015237ecd95
MD5 c6e1091eafb771fba392e14d42cb57f3
BLAKE2b-256 6d7328f91eaba13ca488b2aa7ea7f1fbe76f8b046f0d99586ad9a3cd9a2cbace

See more details on using hashes here.

File details

Details for the file qif-1.2.2-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for qif-1.2.2-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 4d231620d1b0d93d7e097b513ef0fba174b01fffcc7ed965ccf834bd587fe92e
MD5 8e98a73426cb1c53a645462036e5f26e
BLAKE2b-256 9da1b11bdc88d76683cc222f340b297d87b33b5b9d1386b1a690726209742f10

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for qif-1.2.2-cp38-cp38-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 38a75e4ad08d5466f25b10caba224a4786320e50d135e8dfe205eab4ddd68ed1
MD5 baadb7c197a8e7c0c3e5e280040f4c18
BLAKE2b-256 1735503c94983c421bc27fe38417cf310cfe8f180ea988b8d58d433f629529a9

See more details on using hashes here.

File details

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

File metadata

  • Download URL: qif-1.2.2-cp37-cp37m-win_amd64.whl
  • Upload date:
  • Size: 17.7 MB
  • Tags: CPython 3.7m, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.0 CPython/3.9.12

File hashes

Hashes for qif-1.2.2-cp37-cp37m-win_amd64.whl
Algorithm Hash digest
SHA256 8c1431b9a732e211c09cad938821b547d2cd61b94bf18d82890d5535c2e203a7
MD5 222232d08bfc525f6a1d4857435d86b7
BLAKE2b-256 4edbd7f02813cd1ed9d72c3a13fc9c403811d2d796fdecc606c3836257eae670

See more details on using hashes here.

File details

Details for the file qif-1.2.2-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for qif-1.2.2-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 56faf9d33075891bfcae04da1903936df3849285b86c46c924d24d39fab253cc
MD5 a4009c9281b854b62ba3acfc85a99cea
BLAKE2b-256 b5d17f968c11f6bad5b7e020fe9091302b383e96bfb06b881f070b3514aafa2f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for qif-1.2.2-cp37-cp37m-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 65a7365ba8369ca5fd4d73950b68989f9dfeadbb5b1706c9df868db957afc9ba
MD5 f3e0381c0bce47274642b010b1fcb5fa
BLAKE2b-256 61281665f06fee61ec60c22cf0ec00f3ec3f8f478af2ec30a4ee05544866a2c7

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