504525a148
GitOrigin-RevId: bd645e8668ec6612439a9ee7e71f7eac4099d4f6
76 lines
1.4 KiB
Nix
76 lines
1.4 KiB
Nix
{ lib
|
|
, buildPythonPackage
|
|
, cirq-core
|
|
, fetchFromGitHub
|
|
, matplotlib
|
|
, networkx
|
|
, numpy
|
|
, pandas
|
|
, pybind11
|
|
, pytest-xdist
|
|
, pytestCheckHook
|
|
, pythonOlder
|
|
, scipy
|
|
, setuptools
|
|
, wheel
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
|
pname = "stim";
|
|
version = "1.12.1";
|
|
pyproject = true;
|
|
|
|
disabled = pythonOlder "3.6";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "quantumlib";
|
|
repo = "Stim";
|
|
rev = "refs/tags/v${version}";
|
|
hash = "sha256-vDpW8cn1JPARDIXpLyK9uenhHmva0FwnWIDV7dSHbIY=";
|
|
};
|
|
|
|
postPatch = ''
|
|
# asked to relax this in https://github.com/quantumlib/Stim/issues/623
|
|
substituteInPlace pyproject.toml \
|
|
--replace "pybind11==" "pybind11>="
|
|
'';
|
|
|
|
nativeBuildInputs = [
|
|
pybind11
|
|
setuptools
|
|
wheel
|
|
];
|
|
|
|
propagatedBuildInputs = [
|
|
numpy
|
|
];
|
|
|
|
nativeCheckInputs = [
|
|
cirq-core
|
|
matplotlib
|
|
networkx
|
|
pandas
|
|
pytest-xdist
|
|
pytestCheckHook
|
|
scipy
|
|
];
|
|
|
|
pythonImportsCheck = [
|
|
"stim"
|
|
];
|
|
|
|
enableParallelBuilding = true;
|
|
|
|
disabledTestPaths = [
|
|
# Don't test sample
|
|
"glue/sample/"
|
|
];
|
|
|
|
meta = with lib; {
|
|
description = "A tool for high performance simulation and analysis of quantum stabilizer circuits, especially quantum error correction (QEC) circuits";
|
|
homepage = "https://github.com/quantumlib/stim";
|
|
changelog = "https://github.com/quantumlib/Stim/releases/tag/v${version}";
|
|
license = licenses.asl20;
|
|
maintainers = with maintainers; [ chrispattison ];
|
|
};
|
|
}
|