2024-04-21 15:54:59 +00:00
|
|
|
{
|
|
|
|
lib,
|
2024-06-05 15:53:02 +00:00
|
|
|
stdenv,
|
2024-04-21 15:54:59 +00:00
|
|
|
buildPythonPackage,
|
|
|
|
fetchFromGitHub,
|
2024-07-27 06:49:29 +00:00
|
|
|
opentelemetry-api,
|
|
|
|
opentelemetry-sdk,
|
2024-04-21 15:54:59 +00:00
|
|
|
pytest-asyncio,
|
|
|
|
pytestCheckHook,
|
|
|
|
pythonOlder,
|
|
|
|
quil,
|
|
|
|
rustPlatform,
|
2024-06-05 15:53:02 +00:00
|
|
|
darwin,
|
|
|
|
libiconv,
|
2024-04-21 15:54:59 +00:00
|
|
|
syrupy,
|
2024-02-29 20:09:43 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "qcs-sdk-python";
|
2024-09-19 14:19:46 +00:00
|
|
|
version = "0.19.3";
|
2024-02-29 20:09:43 +00:00
|
|
|
pyproject = true;
|
|
|
|
|
|
|
|
disabled = pythonOlder "3.8";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "rigetti";
|
|
|
|
repo = "qcs-sdk-rust";
|
|
|
|
rev = "python/v${version}";
|
2024-09-19 14:19:46 +00:00
|
|
|
hash = "sha256-TyXUkuiYdz6Z6s96DD33QdEuI0ch4hRjUGWahEBpkX4=";
|
2024-02-29 20:09:43 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
cargoDeps = rustPlatform.importCargoLock {
|
|
|
|
lockFile = ./Cargo.lock;
|
|
|
|
outputHashes = {
|
2024-09-19 14:19:46 +00:00
|
|
|
"quil-rs-0.27.1" = "sha256-w97kkdwRnVVfKNTIKypl3shFQJV5Rh/kF6jp7jCiyqw=";
|
2024-02-29 20:09:43 +00:00
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
buildAndTestSubdir = "crates/python";
|
|
|
|
|
2024-04-21 15:54:59 +00:00
|
|
|
build-system = [
|
2024-02-29 20:09:43 +00:00
|
|
|
rustPlatform.cargoSetupHook
|
|
|
|
rustPlatform.maturinBuildHook
|
|
|
|
];
|
|
|
|
|
2024-04-21 15:54:59 +00:00
|
|
|
dependencies = [ quil ];
|
2024-02-29 20:09:43 +00:00
|
|
|
|
2024-07-27 06:49:29 +00:00
|
|
|
optional-dependencies = {
|
|
|
|
tracing-opentelemetry = [ opentelemetry-api ];
|
|
|
|
};
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
buildInputs = lib.optionals stdenv.isDarwin [
|
|
|
|
darwin.apple_sdk.frameworks.Security
|
|
|
|
darwin.apple_sdk.frameworks.SystemConfiguration
|
|
|
|
libiconv
|
|
|
|
];
|
|
|
|
|
2024-02-29 20:09:43 +00:00
|
|
|
nativeCheckInputs = [
|
2024-07-27 06:49:29 +00:00
|
|
|
opentelemetry-sdk
|
2024-02-29 20:09:43 +00:00
|
|
|
pytest-asyncio
|
|
|
|
pytestCheckHook
|
|
|
|
syrupy
|
|
|
|
];
|
|
|
|
|
|
|
|
disabledTests = [
|
|
|
|
"test_compile_program"
|
|
|
|
"test_conjugate_pauli_by_clifford"
|
|
|
|
"test_execute_qvm"
|
|
|
|
"test_generate_randomized_benchmark_sequence"
|
|
|
|
"test_get_report"
|
|
|
|
"test_get_version_info"
|
|
|
|
"test_list_quantum_processors_timeout"
|
|
|
|
];
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
changelog = "https://github.com/rigetti/qcs-sdk-rust/blob/${src.rev}/crates/python/CHANGELOG.md";
|
|
|
|
description = "Python interface for the QCS Rust SDK";
|
|
|
|
homepage = "https://github.com/rigetti/qcs-sdk-rust/tree/main/crates/python";
|
|
|
|
license = lib.licenses.asl20;
|
|
|
|
maintainers = with lib.maintainers; [ dotlambda ];
|
|
|
|
};
|
|
|
|
}
|