Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 4 additions & 5 deletions pkgs/development/python-modules/cirq-aqt/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,12 @@ buildPythonPackage rec {

sourceRoot = "${src.name}/${pname}";

postPatch = ''
substituteInPlace requirements.txt \
--replace-fail "requests~=2.18" "requests"
'';

build-system = [ setuptools ];

pythonRelaxDeps = [
"requests"
];

dependencies = [
cirq-core
requests
Expand Down
10 changes: 7 additions & 3 deletions pkgs/development/python-modules/cirq-core/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -37,14 +37,14 @@

buildPythonPackage rec {
pname = "cirq-core";
version = "1.4.1-unstable-2024-09-21";
version = "1.5.0";
pyproject = true;

src = fetchFromGitHub {
owner = "quantumlib";
repo = "cirq";
rev = "3fefe2984a1203c0bf647c1ea84f4882b05f8477";
hash = "sha256-/WDKVxNJ8pewTLAFTyAZ/nnYcJSLubEJcn7qoJslZ3U=";
tag = "v${version}";
hash = "sha256-4FgXX4ox7BkjmLecxsvg0/JpcrHPn6hlFw5rk4bn9Cc=";
};

sourceRoot = "${src.name}/${pname}";
Expand Down Expand Up @@ -98,6 +98,10 @@ buildPythonPackage rec {
++ lib.optionals stdenv.hostPlatform.isAarch64 [
# https://github.com/quantumlib/Cirq/issues/5924
"test_prepare_two_qubit_state_using_sqrt_iswap"
]
++ lib.optionals stdenv.hostPlatform.isDarwin [
# test_scalar_division[scalar9-terms9-terms_expected9] result differs in the final digit
"test_scalar_division"
];

meta = {
Expand Down
2 changes: 2 additions & 0 deletions pkgs/development/python-modules/cirq-google/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
protobuf,
freezegun,
pytestCheckHook,
typedunits,
}:

buildPythonPackage rec {
Expand All @@ -25,6 +26,7 @@ buildPythonPackage rec {
cirq-core
google-api-core
protobuf
typedunits
] ++ google-api-core.optional-dependencies.grpc;

nativeCheckInputs = [
Expand Down
9 changes: 4 additions & 5 deletions pkgs/development/python-modules/cirq-ionq/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,12 @@ buildPythonPackage rec {

sourceRoot = "${src.name}/${pname}";

postPatch = ''
substituteInPlace requirements.txt \
--replace-fail "requests~=2.18" "requests"
'';

build-system = [ setuptools ];

pythonRelaxDeps = [
"requests"
];

dependencies = [
cirq-core
requests
Expand Down
9 changes: 4 additions & 5 deletions pkgs/development/python-modules/cirq-pasqal/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,12 @@ buildPythonPackage rec {

sourceRoot = "${src.name}/${pname}";

postPatch = ''
substituteInPlace requirements.txt \
--replace-fail "requests~=2.18" "requests"
'';

build-system = [ setuptools ];

pythonRelaxDeps = [
"requests"
];

dependencies = [
cirq-core
requests
Expand Down
5 changes: 4 additions & 1 deletion pkgs/development/python-modules/cirq-rigetti/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,10 @@ buildPythonPackage rec {

sourceRoot = "${src.name}/${pname}";

pythonRelaxDeps = [ "pyquil" ];
pythonRelaxDeps = [
"pyquil"
"qcs-sdk-python"
];

postPatch = ''
# Remove outdated test
Expand Down
68 changes: 68 additions & 0 deletions pkgs/development/python-modules/typedunits/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
{
lib,
buildPythonPackage,
fetchFromGitHub,
stdenv,
cython,
setuptools,
attrs,
numpy,
protobuf,
pyparsing,
pytestCheckHook,
}:

buildPythonPackage {
pname = "typedunits";
version = "0.0.1.dev20250509200845";
pyproject = true;

src = fetchFromGitHub {
owner = "quantumlib";
repo = "TypedUnits";
# PyPi ships platform- and python- specific wheels, so pin the matching source
rev = "95e698b10454dc8dffdb708d56199a748e6dab75";
hash = "sha256-mNo2s1sIMOa7zYfp6XyF8CBQ840+XvN0Ek59W6bRqeM=";
};

build-system = [
cython
setuptools
];

dependencies = [
attrs
cython
numpy
protobuf
pyparsing
];

nativeCheckInputs = [
pytestCheckHook
];

disabledTests = lib.optionals stdenv.hostPlatform.isDarwin [
# Rounding differences
"test_float_to_twelths_frac"
];

disabledTestPaths = [
# Flaky due to host timing differences under load
"test_perf/test_array_with_dimension_performance.py"
"test_perf/test_value_array_performance.py"
"test_perf/test_value_performance.py"
"test_perf/test_value_with_dimension_performance.py"
];

pythonImportsCheck = [
"tunits"
];

meta = {
description = "Units and dimensions library with support for static dimensionality checking and protobuffer serialization";
homepage = "https://github.com/quantumlib/TypedUnits";
license = lib.licenses.asl20;
maintainers = [ lib.maintainers.sarahec ];
};
}
2 changes: 2 additions & 0 deletions pkgs/top-level/python-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -17907,6 +17907,8 @@ self: super: with self; {

typed-settings = callPackage ../development/python-modules/typed-settings { };

typedunits = callPackage ../development/python-modules/typedunits { };

typeguard = callPackage ../development/python-modules/typeguard { };

typepy = callPackage ../development/python-modules/typepy { };
Expand Down