biome: 1.9.2 -> 1.9.3 (#349335)
[NixPkgs.git] / pkgs / development / python-modules / cirq-core / default.nix
blob4c20d01f302f7d8a6d377687004ed0cd4ae38eea
2   lib,
3   stdenv,
4   attrs,
5   autoray ? null,
6   buildPythonPackage,
7   duet,
8   fetchFromGitHub,
9   freezegun,
10   matplotlib,
11   networkx,
12   numpy,
13   opt-einsum,
14   pandas,
15   ply,
16   pylatex ? null,
17   pyquil ? null,
18   pytest-asyncio,
19   pytestCheckHook,
20   pythonOlder,
21   quimb ? null,
22   requests,
23   scipy,
24   setuptools,
25   sortedcontainers,
26   sympy,
27   tqdm,
28   typing-extensions,
29   withContribRequires ? false,
32 buildPythonPackage rec {
33   pname = "cirq-core";
34   version = "1.4.1";
35   pyproject = true;
37   disabled = pythonOlder "3.10";
39   src = fetchFromGitHub {
40     owner = "quantumlib";
41     repo = "cirq";
42     rev = "refs/tags/v${version}";
43     hash = "sha256-1GcRDVgYF+1igZQFlQbiWZmU1WNIJh4CcOftQe6OP6I=";
44   };
46   sourceRoot = "${src.name}/${pname}";
48   postPatch = ''
49     substituteInPlace requirements.txt \
50       --replace-fail "matplotlib~=3.0" "matplotlib"
51   '';
53   build-system = [ setuptools ];
55   dependencies =
56     [
57       attrs
58       duet
59       matplotlib
60       networkx
61       numpy
62       pandas
63       requests
64       scipy
65       sortedcontainers
66       sympy
67       tqdm
68       typing-extensions
69     ]
70     ++ lib.optionals withContribRequires [
71       autoray
72       opt-einsum
73       ply
74       pylatex
75       pyquil
76       quimb
77     ];
79   nativeCheckInputs = [
80     pytestCheckHook
81     pytest-asyncio
82     freezegun
83   ];
85   disabledTestPaths = lib.optionals (!withContribRequires) [
86     # Requires external (unpackaged) libraries, so untested
87     "cirq/contrib/"
88     # No need to test the version number
89     "cirq/_version_test.py"
90   ];
92   disabledTests = lib.optionals stdenv.hostPlatform.isAarch64 [
93     # https://github.com/quantumlib/Cirq/issues/5924
94     "test_prepare_two_qubit_state_using_sqrt_iswap"
95   ];
97   meta = with lib; {
98     description = "Framework for creating, editing, and invoking Noisy Intermediate Scale Quantum (NISQ) circuits";
99     homepage = "https://github.com/quantumlib/cirq";
100     changelog = "https://github.com/quantumlib/Cirq/releases/tag/v${version}";
101     license = licenses.asl20;
102     maintainers = with maintainers; [
103       drewrisinger
104       fab
105     ];
106   };