Skip to main content

Quantitative Information Flow library

Project description

Build Status PyPI version

libqif

Install

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

Uploaded CPython 3.11 Windows x86-64

qif-1.2.3-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (25.0 MB view details)

Uploaded CPython 3.11 manylinux: glibc 2.17+ x86-64

qif-1.2.3-cp311-cp311-macosx_10_9_x86_64.whl (13.5 MB view details)

Uploaded CPython 3.11 macOS 10.9+ x86-64

qif-1.2.3-cp310-cp310-win_amd64.whl (17.7 MB view details)

Uploaded CPython 3.10 Windows x86-64

qif-1.2.3-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.3-cp310-cp310-macosx_10_9_x86_64.whl (13.5 MB view details)

Uploaded CPython 3.10 macOS 10.9+ x86-64

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

Uploaded CPython 3.9 Windows x86-64

qif-1.2.3-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.3-cp39-cp39-macosx_10_9_x86_64.whl (13.5 MB view details)

Uploaded CPython 3.9 macOS 10.9+ x86-64

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

Uploaded CPython 3.8 Windows x86-64

qif-1.2.3-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.3-cp38-cp38-macosx_10_9_x86_64.whl (13.5 MB view details)

Uploaded CPython 3.8 macOS 10.9+ x86-64

File details

Details for the file qif-1.2.3-cp311-cp311-win_amd64.whl.

File metadata

  • Download URL: qif-1.2.3-cp311-cp311-win_amd64.whl
  • Upload date:
  • Size: 17.7 MB
  • Tags: CPython 3.11, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.16

File hashes

Hashes for qif-1.2.3-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 5a08b41baa134d76f2b8496cd399187dd2a1aa60c7b68d8e73ccff0553386faa
MD5 4100114e210ce85b268146281a9c6082
BLAKE2b-256 239d3b0eb970ff694fd4ee7dde097fdb747accccea1a5b9e34ecf68c4f5a0a51

See more details on using hashes here.

File details

Details for the file qif-1.2.3-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for qif-1.2.3-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 7f759cc006125f845842761e182c4945592e22b230c75830204a0b8670856548
MD5 3bb2ebd58e8ad7efe93e7dbf6b2c331e
BLAKE2b-256 a0a4718e6bb25b08361d6e62409560bd62d8aa1f5c96a6b86eef107ff93e4706

See more details on using hashes here.

File details

Details for the file qif-1.2.3-cp311-cp311-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for qif-1.2.3-cp311-cp311-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 b79724ec665ed89a9d611c48fabb2b4103f987ed4c7b0f0a3fb0ec0aa1628d47
MD5 abee4f02c2ccf1c50f698bb98a01ad6f
BLAKE2b-256 0bc5d47d23160b15c0f56b1c81ca4ee3f32f102f010b331893954ece6d59e0ab

See more details on using hashes here.

File details

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

File metadata

  • Download URL: qif-1.2.3-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.2 CPython/3.9.16

File hashes

Hashes for qif-1.2.3-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 50fd10e641186c491cc60336f7be5b62b5037315e71c51180a496f5e89a4d93e
MD5 e1faf66640fb65a464b3eb74c8b7392a
BLAKE2b-256 f19bcef19b3aaaad39fbfeb10ad840ac9e817550836b9fb738fc33d0b2faf9e0

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for qif-1.2.3-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 249d6d34ef21104a9c8529374a181945bb2116ba4330f46664d10a25183e43a0
MD5 ca14137402b8af6e4d6e73ee2126c192
BLAKE2b-256 470c13be7ac3fbb7bd8a5476774b3bdba639e20d4fc10443a8408000347a0184

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for qif-1.2.3-cp310-cp310-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 e7ad24c1eebcf4de2f87059e86bd41b8880a5307fffedd9290f08533da234090
MD5 f4a6a42bfda408f935b07c1ad2ab8227
BLAKE2b-256 2cafdeadd5cc43043f07e9f780f28bd718956acefc7c8fcf8b39ffa06cfd03bd

See more details on using hashes here.

File details

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

File metadata

  • Download URL: qif-1.2.3-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.2 CPython/3.9.16

File hashes

Hashes for qif-1.2.3-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 54517fddf9872d036c7e0cf338a9df2546204f7465697d10f70a8eb01008e1db
MD5 0dfa9b57e69a4091f00a549306e582dc
BLAKE2b-256 a44fb4f9e798e2a8bd28ad66f1d00adf32c220592bb7ac51211f198ad3bb9c2b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for qif-1.2.3-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 f9b4b1c7a19f04af6952005f4046fae9fb039f7f3fc872f200c955ebb9d3031e
MD5 d4f82246238aa504f2030711e45fb449
BLAKE2b-256 fa79750577158d93cf94838ce4a809c1367aba27c02d9986bb7b3611248c09bf

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for qif-1.2.3-cp39-cp39-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 17a1437d900e2f2a2e5357de16189f9d2d5ccf0d7244bb0eaecf059c404074b0
MD5 4e6339c7b10afb843cff34b21261d914
BLAKE2b-256 9b548925795381627154930b85b2c4d500d33b79e410220dd40c2a16fcfa1c97

See more details on using hashes here.

File details

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

File metadata

  • Download URL: qif-1.2.3-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.2 CPython/3.9.16

File hashes

Hashes for qif-1.2.3-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 cb7d73bc5863d08b35632c07eab059954faf6004a8f906e398e9083b59b19a3b
MD5 270fa57c0777be9a5c22ead81ebf0ca2
BLAKE2b-256 f7cd91bc8c3b81f884379d3153e5fc09ed9bad19e28df96100fc7cb1411ec035

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for qif-1.2.3-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 9ee7d53c9d3711e09644c34691991f645e16d30ba646de271214b39d9b1204de
MD5 d5fa9d6d14de773a8efc688d302479d2
BLAKE2b-256 a234b2273f28d327267047ebdd25a41a8269a9d44c11e8962be4bddddb4f4162

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for qif-1.2.3-cp38-cp38-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 bab85ba12d43bad09e285e5e48c2baee5ce99374c0237d7000e4407e5615efec
MD5 c1891b9d3eacf6f99dc1501c6c5e7735
BLAKE2b-256 d0037b4b43d2147cd173bae1906c3e4ea3a4475e4232668bdff7a364ad211869

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