Skip to main content

Quantitative Information Flow library

Project description

Build Status PyPI version

libqif

Install

pip install qif
  • Needs sandybridge or later CPU
  • python versions supported:
    • Linux: 3.9 to 3.14
    • Windows / MacOS: 3.9 to 3.11

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
set_default_type(rat)

C = numpy.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

If you're not sure about the file name format, learn more about wheel file names.

qif-1.2.4-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (21.5 MB view details)

Uploaded CPython 3.14manylinux: glibc 2.27+ x86-64manylinux: glibc 2.28+ x86-64

qif-1.2.4-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (21.5 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.27+ x86-64manylinux: glibc 2.28+ x86-64

qif-1.2.4-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (21.5 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.27+ x86-64manylinux: glibc 2.28+ x86-64

qif-1.2.4-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (21.5 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.27+ x86-64manylinux: glibc 2.28+ x86-64

qif-1.2.4-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (21.5 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.27+ x86-64manylinux: glibc 2.28+ x86-64

qif-1.2.4-cp39-cp39-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (21.5 MB view details)

Uploaded CPython 3.9manylinux: glibc 2.27+ x86-64manylinux: glibc 2.28+ x86-64

File details

Details for the file qif-1.2.4-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for qif-1.2.4-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 15a4e0ec976834754bdad3e7390a0715231b6c12e73866d216f7f0fd42153d86
MD5 16873a2de82ceff4ecdeed12cd008959
BLAKE2b-256 a786fecf7adbfa27af98bc1a759dd29916025cd4b7389273718feefeb046fd5d

See more details on using hashes here.

File details

Details for the file qif-1.2.4-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for qif-1.2.4-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 f8b895c09e484d79e4a5b2c905dd6631fb35d010b8e14a5cb315ddf4d09fbc4f
MD5 03171bd7db46430e4a516f64c3ceb0ff
BLAKE2b-256 25c039b64ca689bc11d0e913f6270f2d38556ad00e22c964309660b9d2c61349

See more details on using hashes here.

File details

Details for the file qif-1.2.4-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for qif-1.2.4-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 3aa8e0eba4154c6c4dc89df4687066fcd14aab4ae6fc91a8a9291f2766f62a2d
MD5 bf9a400596040764a294f92b4a892ca8
BLAKE2b-256 e2364566fda1faa6aea7f180e64e806070ebe9e6da99836f332f24d4ec72e516

See more details on using hashes here.

File details

Details for the file qif-1.2.4-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for qif-1.2.4-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 4beb7dca11e2ff4ad89920f7f54614e0508dabb967befe4d5d3f1ec9e6917bfa
MD5 972e9b7d5a8c56c0d28a22cd19801a4b
BLAKE2b-256 88da5d8e79683457014080b6726f44272fb38e9e27706ec4f29c5d77d3ae24c6

See more details on using hashes here.

File details

Details for the file qif-1.2.4-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for qif-1.2.4-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 b1c2e358626109d2d7b9d1d733366376501bbd3945ee8327b151803de28406c1
MD5 3324f9cc6cecc620c9ebb9bb968da0b8
BLAKE2b-256 b92275dee159a6713ea0017a9a17763555fd8e0351a3bd568263b69630e388af

See more details on using hashes here.

File details

Details for the file qif-1.2.4-cp39-cp39-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for qif-1.2.4-cp39-cp39-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 9264c53ff3c457269e5c46deb020d473a7f87eb36b5e7d4c7d20dbafd5f6aaae
MD5 90d697258be0cf1898e55414293ec6c2
BLAKE2b-256 3f1b20eb1979490bbc1487c1c8037d4fac2581a1cc5313931923a00ae162104d

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page