2021-10-28 06:52:43 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromGitHub
|
|
|
|
, importlib-metadata
|
|
|
|
, ipython
|
2022-02-10 20:34:41 +00:00
|
|
|
, lark
|
2021-10-28 06:52:43 +00:00
|
|
|
, networkx
|
|
|
|
, numpy
|
|
|
|
, poetry-core
|
|
|
|
, pytest-asyncio
|
|
|
|
, pytest-freezegun
|
|
|
|
, pytest-httpx
|
|
|
|
, pytest-mock
|
|
|
|
, pytestCheckHook
|
2023-02-02 18:25:31 +00:00
|
|
|
, pythonAtLeast
|
2021-10-28 06:52:43 +00:00
|
|
|
, pythonOlder
|
2023-02-02 18:25:31 +00:00
|
|
|
, pythonRelaxDepsHook
|
2021-10-28 06:52:43 +00:00
|
|
|
, qcs-api-client
|
2021-12-06 16:07:01 +00:00
|
|
|
, respx
|
2022-10-21 18:38:19 +00:00
|
|
|
, retry
|
2021-10-28 06:52:43 +00:00
|
|
|
, rpcq
|
|
|
|
, scipy
|
2022-10-21 18:38:19 +00:00
|
|
|
, types-python-dateutil
|
|
|
|
, types-retry
|
2021-10-28 06:52:43 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "pyquil";
|
2023-03-15 16:39:30 +00:00
|
|
|
version = "3.3.4";
|
2021-10-28 06:52:43 +00:00
|
|
|
format = "pyproject";
|
|
|
|
|
|
|
|
disabled = pythonOlder "3.7";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "rigetti";
|
|
|
|
repo = pname;
|
2023-02-02 18:25:31 +00:00
|
|
|
rev = "refs/tags/v${version}";
|
2023-03-15 16:39:30 +00:00
|
|
|
hash = "sha256-iHyYX9e3O611OzBMafqn4V+yR1y8y4twiJehYDYlvdg=";
|
2021-10-28 06:52:43 +00:00
|
|
|
};
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
pythonRelaxDeps = [
|
|
|
|
"lark"
|
|
|
|
];
|
|
|
|
|
2021-10-28 06:52:43 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
poetry-core
|
2023-02-02 18:25:31 +00:00
|
|
|
pythonRelaxDepsHook
|
2021-10-28 06:52:43 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
2022-02-10 20:34:41 +00:00
|
|
|
lark
|
2021-10-28 06:52:43 +00:00
|
|
|
networkx
|
|
|
|
numpy
|
|
|
|
qcs-api-client
|
|
|
|
retry
|
|
|
|
rpcq
|
|
|
|
scipy
|
2022-10-21 18:38:19 +00:00
|
|
|
types-python-dateutil
|
|
|
|
types-retry
|
2021-10-28 06:52:43 +00:00
|
|
|
] ++ lib.optionals (pythonOlder "3.8") [
|
|
|
|
importlib-metadata
|
|
|
|
];
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
|
|
|
pytestCheckHook
|
|
|
|
];
|
|
|
|
|
2021-10-28 06:52:43 +00:00
|
|
|
checkInputs = [
|
|
|
|
pytest-asyncio
|
|
|
|
pytest-freezegun
|
|
|
|
pytest-httpx
|
|
|
|
pytest-mock
|
2021-12-06 16:07:01 +00:00
|
|
|
respx
|
2021-10-28 06:52:43 +00:00
|
|
|
ipython
|
|
|
|
];
|
|
|
|
|
|
|
|
disabledTestPaths = [
|
|
|
|
# Tests require network access
|
|
|
|
"test/e2e/"
|
|
|
|
"test/unit/test_api.py"
|
2021-12-06 16:07:01 +00:00
|
|
|
"test/unit/test_engagement_manager.py"
|
2021-10-28 06:52:43 +00:00
|
|
|
"test/unit/test_operator_estimation.py"
|
|
|
|
"test/unit/test_wavefunction_simulator.py"
|
|
|
|
"test/unit/test_compatibility_v2_operator_estimation.py"
|
|
|
|
"test/unit/test_compatibility_v2_quantum_computer.py"
|
|
|
|
"test/unit/test_compatibility_v2_qvm.py"
|
|
|
|
"test/unit/test_quantum_computer.py"
|
|
|
|
"test/unit/test_qvm.py"
|
|
|
|
"test/unit/test_reference_wavefunction.py"
|
2022-09-30 11:47:45 +00:00
|
|
|
# Out-dated
|
|
|
|
"test/unit/test_qpu_client.py"
|
2023-02-02 18:25:31 +00:00
|
|
|
"test/unit/test_qvm_client.py"
|
|
|
|
"test/unit/test_reference_density.py"
|
2021-10-28 06:52:43 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
disabledTests = [
|
|
|
|
"test_compile_with_quilt_calibrations"
|
|
|
|
"test_sets_timeout_on_requests"
|
2022-02-10 20:34:41 +00:00
|
|
|
# sensitive to lark parser output
|
|
|
|
"test_memory_commands"
|
|
|
|
"test_classical"
|
2021-10-28 06:52:43 +00:00
|
|
|
];
|
|
|
|
|
2022-02-20 05:27:41 +00:00
|
|
|
pythonImportsCheck = [
|
|
|
|
"pyquil"
|
|
|
|
];
|
2021-10-28 06:52:43 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Python library for creating Quantum Instruction Language (Quil) programs";
|
|
|
|
homepage = "https://github.com/rigetti/pyquil";
|
2023-02-02 18:25:31 +00:00
|
|
|
changelog = "https://github.com/rigetti/pyquil/blob/v${version}/CHANGELOG.md";
|
2021-10-28 06:52:43 +00:00
|
|
|
license = licenses.asl20;
|
|
|
|
maintainers = with maintainers; [ fab ];
|
|
|
|
};
|
|
|
|
}
|