fa5436e0a7
GitOrigin-RevId: e8057b67ebf307f01bdcc8fba94d94f75039d1f6
75 lines
1.6 KiB
Nix
75 lines
1.6 KiB
Nix
{
|
|
lib,
|
|
stdenv,
|
|
buildPythonPackage,
|
|
fetchFromGitHub,
|
|
pytest-asyncio,
|
|
pytestCheckHook,
|
|
pythonOlder,
|
|
quil,
|
|
rustPlatform,
|
|
darwin,
|
|
libiconv,
|
|
syrupy,
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
|
pname = "qcs-sdk-python";
|
|
version = "0.17.7";
|
|
pyproject = true;
|
|
|
|
disabled = pythonOlder "3.8";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "rigetti";
|
|
repo = "qcs-sdk-rust";
|
|
rev = "python/v${version}";
|
|
hash = "sha256-6Rh5gQH+ObpWGR9rYJfkXnGfG1GjKLn+ckiR7RhKzoE=";
|
|
};
|
|
|
|
cargoDeps = rustPlatform.importCargoLock {
|
|
lockFile = ./Cargo.lock;
|
|
outputHashes = {
|
|
"quil-rs-0.25.1" = "sha256-zC4DEjCN6y9XeZlzmXHSTbVTpFQ4Srozix89IHDhHXc=";
|
|
};
|
|
};
|
|
|
|
buildAndTestSubdir = "crates/python";
|
|
|
|
build-system = [
|
|
rustPlatform.cargoSetupHook
|
|
rustPlatform.maturinBuildHook
|
|
];
|
|
|
|
dependencies = [ quil ];
|
|
|
|
buildInputs = lib.optionals stdenv.isDarwin [
|
|
darwin.apple_sdk.frameworks.Security
|
|
darwin.apple_sdk.frameworks.SystemConfiguration
|
|
libiconv
|
|
];
|
|
|
|
nativeCheckInputs = [
|
|
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 ];
|
|
};
|
|
}
|