Skip to main content

A fast Clifford circuit simulator

Project description

pysimplex

This is a fast Clifford circuit simulator based on BH21.

Known issues:

  • Not yet optimized for sparsity.
  • Measurements in the Y basis, while correct, are less efficient than they should be because the method described in the paper was not quite working.

Work is in progress on both these issues and the package will be updated in due course.

Wheels are currently available for Linux only, for Python versions 3.8, 3.9 and 3.10. I will be adding wheels for MacOS and Windows soon.

Example usage:

from pysimplex import Simplex
S = Simplex(2) # a 2-qubit system
S.H(0)
S.CX(0, 1)
b0 = S.MeasZ(0, coin=0) # 'coin' is an optional argument that fixes the result
assert b0 == 0 # without 'coin' it would be 0 or 1 with equal probability
b1 = S.MeasZ(1)
assert b0 == b1
assert not S.is_deterministic() # 'coin' is irrelevant here

The available operations are: X, Y, Z, H, S, Sdg, CX, CZ, MeasX, MeasY and MeasZ.

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

pysimplex-0.0.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (115.5 kB view hashes)

Uploaded CPython 3.10 manylinux: glibc 2.17+ x86-64

pysimplex-0.0.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (115.4 kB view hashes)

Uploaded CPython 3.9 manylinux: glibc 2.17+ x86-64

pysimplex-0.0.2-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (115.5 kB view hashes)

Uploaded CPython 3.8 manylinux: glibc 2.17+ x86-64

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