Skip to main content

ExtraFerm

pip install extraferm

Overview

This library can be used to estimate Born rule probabilities of measurement outcomes from particle-number conserving extended matchgate circuits:

  • Extended matchgate: the universal gate set consisting of matchgates + controlled‑phase gates
  • Particle-number conserving: the Hamming weight of initial state is preserved at all points by the circuit

Circuit Extent

Our simulator runs most efficiently when the circuit’s extent is close to one. The extent is defined as:

$$ \xi^* = \prod_{j=1}^k \bigl(\cos(\theta_j/4) + \sin(\theta_j/4)\bigr)^2 $$

where $\theta_j$ is the angle of the $j$-th controlled-phase gate.

Use

Users should interact with the simulator through the outcome_probabilities function in interface.py.

Example

import numpy as np
from qiskit import QuantumCircuit
from qiskit.circuit.library import XXPlusYYGate

from extraferm import outcome_probabilities

# Create a small circuit
seed = 123
rng = np.random.default_rng(seed=seed)
angles = rng.uniform(0, 2 * np.pi, size=12)
qc = QuantumCircuit(4)
qc.x([0, 2])
qc.append(XXPlusYYGate(theta=angles[0], beta=angles[1]), [0, 1])
qc.cp(theta=angles[3], control_qubit=1, target_qubit=2)
qc.append(XXPlusYYGate(theta=angles[4], beta=angles[5]), [1, 2])
qc.cp(theta=angles[6], control_qubit=0, target_qubit=1)
qc.p(theta=angles[7], qubit=0)
qc.append(XXPlusYYGate(theta=angles[8], beta=angles[9]), [2, 3])
qc.append(XXPlusYYGate(theta=angles[10], beta=angles[11]), [0, 1])

# Estimate a few bitstring probabilitites
bitstrings = [0b0101, 0b1100, 0b0011]
probs = outcome_probabilities(
    circuit=qc, outcome_states=bitstrings, trajectory_count=100_000, seed=seed
)

# Show results
print(probs)
qc.draw("mpl", scale=0.8, fold=-1)

[5.09355260e-01 1.56195696e-33 8.07714813e-02]

Quantum Circuit

Release files for ExtraFerm 0.0.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for ExtraFerm 0.0.2
File Size Uploaded
ExtraFerm-0.0.2.tar.gz 404.8 kB Details

Built distributions (wheels)

Table of built distributions (wheels) for ExtraFerm 0.0.2
File
ExtraFerm-0.0.2-cp314-cp314t-musllinux_1_2_x86_64.whl CPython 3.14 CPython 3.14 free-threading Linux musl 1.2+ x86-64 Details
ExtraFerm-0.0.2-cp314-cp314t-manylinux_2_28_x86_64.whl CPython 3.14 CPython 3.14 free-threading Linux glibc 2.28+ x86-64 Details
ExtraFerm-0.0.2-cp314-cp314t-macosx_11_0_arm64.whl CPython 3.14 CPython 3.14 free-threading macOS 11.0+ ARM64 Details
ExtraFerm-0.0.2-cp314-cp314-musllinux_1_2_x86_64.whl CPython 3.14 CPython 3.14 Linux musl 1.2+ x86-64 Details
ExtraFerm-0.0.2-cp314-cp314-manylinux_2_28_x86_64.whl CPython 3.14 CPython 3.14 Linux glibc 2.28+ x86-64 Details
ExtraFerm-0.0.2-cp314-cp314-macosx_11_0_arm64.whl CPython 3.14 CPython 3.14 macOS 11.0+ ARM64 Details
ExtraFerm-0.0.2-cp313-cp313-musllinux_1_2_x86_64.whl CPython 3.13 CPython 3.13 Linux musl 1.2+ x86-64 Details
ExtraFerm-0.0.2-cp313-cp313-manylinux_2_28_x86_64.whl CPython 3.13 CPython 3.13 Linux glibc 2.28+ x86-64 Details
ExtraFerm-0.0.2-cp313-cp313-macosx_11_0_arm64.whl CPython 3.13 CPython 3.13 macOS 11.0+ ARM64 Details
ExtraFerm-0.0.2-cp312-cp312-musllinux_1_2_x86_64.whl CPython 3.12 CPython 3.12 Linux musl 1.2+ x86-64 Details
ExtraFerm-0.0.2-cp312-cp312-manylinux_2_28_x86_64.whl CPython 3.12 CPython 3.12 Linux glibc 2.28+ x86-64 Details
ExtraFerm-0.0.2-cp312-cp312-macosx_11_0_arm64.whl CPython 3.12 CPython 3.12 macOS 11.0+ ARM64 Details
ExtraFerm-0.0.2-cp311-cp311-musllinux_1_2_x86_64.whl CPython 3.11 CPython 3.11 Linux musl 1.2+ x86-64 Details
ExtraFerm-0.0.2-cp311-cp311-manylinux_2_28_x86_64.whl CPython 3.11 CPython 3.11 Linux glibc 2.28+ x86-64 Details
ExtraFerm-0.0.2-cp311-cp311-macosx_11_0_arm64.whl CPython 3.11 CPython 3.11 macOS 11.0+ ARM64 Details

Total release size: 35.6 MB

Release files / ExtraFerm-0.0.2.tar.gz

Download URL ExtraFerm-0.0.2.tar.gz
Size 404.8 kB
Tags Source
SHA-256 checksum
How to use checksums
b37330f29724c1b97bbd748a48ffd7d0ca330154157063aedb73c0f6fd7c7444
BLAKE2b-256 checksum
How to use checksums
f3f99480025bdc514d9f655468f8e70605e6a389c0c1568d792ee48c9cbf8729
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 21, 2025.

Transparency log

Release files / ExtraFerm-0.0.2-cp314-cp314t-musllinux_1_2_x86_64.whl

Download URL ExtraFerm-0.0.2-cp314-cp314t-musllinux_1_2_x86_64.whl
Size 3.4 MB
Tags CPython 3.14 CPython 3.14 free-threading Linux musl 1.2+ x86-64
SHA-256 checksum
How to use checksums
f00042be9ef2186204d33dd6b7a28842f02b8f5c2e50b7ae13cdcee95978b3ae
BLAKE2b-256 checksum
How to use checksums
de1d74d600c527b499d6767594fe19ec7bbf3cf9dc0c641d8b5dfcb4e8aa330e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 21, 2025.

Transparency log

Release files / ExtraFerm-0.0.2-cp314-cp314t-manylinux_2_28_x86_64.whl

Download URL ExtraFerm-0.0.2-cp314-cp314t-manylinux_2_28_x86_64.whl
Size 3.4 MB
Tags CPython 3.14 CPython 3.14 free-threading Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
2d1e0b07798261faba29bf313e2621701ec3c9b821925d5062b53af0d7e445ed
BLAKE2b-256 checksum
How to use checksums
898f1820f0b37a51ad57950287311d9f61ade708ef1946ad49c0a3ce096d8615
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 21, 2025.

Transparency log

Release files / ExtraFerm-0.0.2-cp314-cp314t-macosx_11_0_arm64.whl

Download URL ExtraFerm-0.0.2-cp314-cp314t-macosx_11_0_arm64.whl
Size 286.7 kB
Tags CPython 3.14 CPython 3.14 free-threading macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
9ac329d49dbe19e20e519e2f44193dac348d57e875870cd4eccd8154a13ddf5c
BLAKE2b-256 checksum
How to use checksums
d4372fcc1937f3d7bc0e33a1caa2f1096ca39ade59e6372f9e726770d8d580cf
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 21, 2025.

Transparency log

Release files / ExtraFerm-0.0.2-cp314-cp314-musllinux_1_2_x86_64.whl

Download URL ExtraFerm-0.0.2-cp314-cp314-musllinux_1_2_x86_64.whl
Size 3.4 MB
Tags CPython 3.14 Linux musl 1.2+ x86-64
SHA-256 checksum
How to use checksums
77475d2cc01b0798562fdd6a34247b196aa238f88049020e86be5edb0ae24a5f
BLAKE2b-256 checksum
How to use checksums
d5c17e2e476228452388e7d9e1694f9e6172e4e6932dab2c62b5bff13d37acbf
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 21, 2025.

Transparency log

Release files / ExtraFerm-0.0.2-cp314-cp314-manylinux_2_28_x86_64.whl

Download URL ExtraFerm-0.0.2-cp314-cp314-manylinux_2_28_x86_64.whl
Size 3.4 MB
Tags CPython 3.14 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
8288fe6e08a8f377ba3eabbb66b24c17d1c841dbfa92e339575c4383c8f841f6
BLAKE2b-256 checksum
How to use checksums
cae3dc47aa3f820ef66b606a42e81c96913d16196a1beb9ae35429a91091228f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 21, 2025.

Transparency log

Release files / ExtraFerm-0.0.2-cp314-cp314-macosx_11_0_arm64.whl

Download URL ExtraFerm-0.0.2-cp314-cp314-macosx_11_0_arm64.whl
Size 287.7 kB
Tags CPython 3.14 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
abdce54f60d9dadf7ea6ccaf1d0a3abecfb6c3bf6b9f87ba96c37096835ee881
BLAKE2b-256 checksum
How to use checksums
014d4ac6327d2dfc220aa423b932a47f5945eca30bd306a21cd59828a66405ec
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 21, 2025.

Transparency log

Release files / ExtraFerm-0.0.2-cp313-cp313-musllinux_1_2_x86_64.whl

Download URL ExtraFerm-0.0.2-cp313-cp313-musllinux_1_2_x86_64.whl
Size 3.4 MB
Tags CPython 3.13 Linux musl 1.2+ x86-64
SHA-256 checksum
How to use checksums
94fcbf70c5fafe632dab973a0c220b388e80385cd5e9cca0c7e9784d5ebd469a
BLAKE2b-256 checksum
How to use checksums
9c5be109f53be0060b9db70591dee37ad1285c6bc5ab88430839210b24541165
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 21, 2025.

Transparency log

Release files / ExtraFerm-0.0.2-cp313-cp313-manylinux_2_28_x86_64.whl

Download URL ExtraFerm-0.0.2-cp313-cp313-manylinux_2_28_x86_64.whl
Size 3.4 MB
Tags CPython 3.13 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
7ebd630c19b68f1eb79919c69700ca56ebcd795f752973dc69bb97100948112d
BLAKE2b-256 checksum
How to use checksums
1b8e85dce03106bce8bc41566503a56494befb14cb5dfd60a8f0a91c3bf52b9a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 21, 2025.

Transparency log

Release files / ExtraFerm-0.0.2-cp313-cp313-macosx_11_0_arm64.whl

Download URL ExtraFerm-0.0.2-cp313-cp313-macosx_11_0_arm64.whl
Size 287.6 kB
Tags CPython 3.13 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
c1bfe4f5cc41d156ceea303764d1996e205bf77fdb3a24933e70b7999a7a5876
BLAKE2b-256 checksum
How to use checksums
bbd085502d1f7789b5328943d502d2f94647a5e705813bae7ebe43a6a61d1daa
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 21, 2025.

Transparency log

Release files / ExtraFerm-0.0.2-cp312-cp312-musllinux_1_2_x86_64.whl

Download URL ExtraFerm-0.0.2-cp312-cp312-musllinux_1_2_x86_64.whl
Size 3.4 MB
Tags CPython 3.12 Linux musl 1.2+ x86-64
SHA-256 checksum
How to use checksums
48d7302c1d4a707468b27ff0b5194126cbebb005fdaae73c01515612eed00014
BLAKE2b-256 checksum
How to use checksums
cae489c724384de0b31ca361f87cdf5b486a360fbc4ef26ceff118bfa56c2d4f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 21, 2025.

Transparency log

Release files / ExtraFerm-0.0.2-cp312-cp312-manylinux_2_28_x86_64.whl

Download URL ExtraFerm-0.0.2-cp312-cp312-manylinux_2_28_x86_64.whl
Size 3.4 MB
Tags CPython 3.12 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
41029abaeade84fbb7ec36aeac9cf04f409a91c735f776b663d09bc28f7fc6e4
BLAKE2b-256 checksum
How to use checksums
2d86286a529ddb12ef45a02ab1cd3d01a532b59afbf8f5d136b8fb318c30b588
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 21, 2025.

Transparency log

Release files / ExtraFerm-0.0.2-cp312-cp312-macosx_11_0_arm64.whl

Download URL ExtraFerm-0.0.2-cp312-cp312-macosx_11_0_arm64.whl
Size 287.9 kB
Tags CPython 3.12 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
e84f37af14877c99714e5d685c8d03953a8e42dd2d62f1bc7cf30c841538485e
BLAKE2b-256 checksum
How to use checksums
c20db2652b78aa43db144c6d040fe3921d24266bea44f47a1473bbb232edd54c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 21, 2025.

Transparency log

Release files / ExtraFerm-0.0.2-cp311-cp311-musllinux_1_2_x86_64.whl

Download URL ExtraFerm-0.0.2-cp311-cp311-musllinux_1_2_x86_64.whl
Size 3.4 MB
Tags CPython 3.11 Linux musl 1.2+ x86-64
SHA-256 checksum
How to use checksums
fa63440a472901a845b3acb32980cd922ed28f8a8e7ed86476336790f052a654
BLAKE2b-256 checksum
How to use checksums
5c1ffe71374f71f32a80291403e8c542a6951cde9dfdd1403ae1f8c3043c025c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 21, 2025.

Transparency log

Release files / ExtraFerm-0.0.2-cp311-cp311-manylinux_2_28_x86_64.whl

Download URL ExtraFerm-0.0.2-cp311-cp311-manylinux_2_28_x86_64.whl
Size 3.3 MB
Tags CPython 3.11 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
a323b2cac8f8eebffa4ccd1d8b522b96abbdc5710973086ac4eff048e4475f1a
BLAKE2b-256 checksum
How to use checksums
5ddae40279e348e6c956b11f7939f6cd02ef39a8aaeb15a15f098b0943d14d81
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 21, 2025.

Transparency log

Release files / ExtraFerm-0.0.2-cp311-cp311-macosx_11_0_arm64.whl

Download URL ExtraFerm-0.0.2-cp311-cp311-macosx_11_0_arm64.whl
Size 287.6 kB
Tags CPython 3.11 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
9877d0696561a96a23ab7665cc3a7bd93f37bd9b64353bcf28b38f32ad6cbc0c
BLAKE2b-256 checksum
How to use checksums
95d3f339f1c66a600b64246fb38e315ba11e2bc058efcf40c048d71e2a5e4ac7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 21, 2025.

Transparency log

Release history Release notifications | RSS feed

0.1.0

1 release file

This release

0.0.2 This release

16 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page