Merge pull request #138502 from fabaff/bump-cirq

python3Packages.cirq-core: 0.11.0 -> 0.12.0
conduit-nginx
Fabian Affolter 2021-10-21 09:20:40 +02:00 committed by GitHub
commit c9c5344930
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
12 changed files with 462 additions and 9 deletions

View File

@ -0,0 +1,32 @@
{ lib
, buildPythonPackage
, cirq-core
, pythonOlder
, fetchFromGitHub
, requests
, pytestCheckHook
}:
buildPythonPackage rec {
pname = "cirq-aqt";
inherit (cirq-core) version src meta;
sourceRoot = "source/${pname}";
postPatch = ''
substituteInPlace requirements.txt \
--replace "requests~=2.18" "requests"
'';
propagatedBuildInputs = [
cirq-core
requests
];
checkInputs = [
pytestCheckHook
];
# cirq's importlib hook doesn't work here
#pythonImportsCheck = [ "cirq_aqt" ];
}

View File

@ -1,5 +1,5 @@
{ stdenv
, lib
{ lib
, stdenv
, buildPythonPackage
, pythonOlder
, fetchFromGitHub
@ -26,9 +26,10 @@
, freezegun
, pytest-asyncio
}:
buildPythonPackage rec {
pname = "cirq-core";
version = "0.11.0";
version = "0.12.0";
disabled = pythonOlder "3.6";
@ -36,7 +37,7 @@ buildPythonPackage rec {
owner = "quantumlib";
repo = "cirq";
rev = "v${version}";
hash = "sha256-JaKTGnkYhzIFb35SGaho8DRupoT0JFYKA5+rJEq4oXw=";
sha256 = "sha256-NPaADiRoPL0KoLugtk0vsnTGuRDK85e4j9kHv9aO/Po=";
};
sourceRoot = "source/${pname}";
@ -45,8 +46,7 @@ buildPythonPackage rec {
substituteInPlace requirements.txt \
--replace "matplotlib~=3.0" "matplotlib" \
--replace "networkx~=2.4" "networkx" \
--replace "numpy~=1.16" "numpy" \
--replace "requests~=2.18" "requests"
--replace "numpy~=1.16" "numpy"
'';
propagatedBuildInputs = [
@ -89,10 +89,10 @@ buildPythonPackage rec {
];
meta = with lib; {
description = "A framework for creating, editing, and invoking Noisy Intermediate Scale Quantum (NISQ) circuits.";
description = "Framework for creating, editing, and invoking Noisy Intermediate Scale Quantum (NISQ) circuits";
homepage = "https://github.com/quantumlib/cirq";
changelog = "https://github.com/quantumlib/Cirq/releases/tag/v${version}";
license = licenses.asl20;
maintainers = with maintainers; [ drewrisinger ];
maintainers = with maintainers; [ drewrisinger fab ];
};
}

View File

@ -27,5 +27,8 @@ buildPythonPackage rec {
protobuf
];
checkInputs = [ pytestCheckHook freezegun ];
checkInputs = [
freezegun
pytestCheckHook
];
}

View File

@ -0,0 +1,32 @@
{ lib
, buildPythonPackage
, cirq-core
, pythonOlder
, fetchFromGitHub
, requests
, pytestCheckHook
}:
buildPythonPackage rec {
pname = "cirq-ionq";
inherit (cirq-core) version src meta;
sourceRoot = "source/${pname}";
postPatch = ''
substituteInPlace requirements.txt \
--replace "requests~=2.18" "requests"
'';
propagatedBuildInputs = [
cirq-core
requests
];
checkInputs = [
pytestCheckHook
];
# cirq's importlib hook doesn't work here
#pythonImportsCheck = [ "cirq_ionq" ];
}

View File

@ -0,0 +1,32 @@
{ lib
, buildPythonPackage
, cirq-core
, pythonOlder
, fetchFromGitHub
, requests
, pytestCheckHook
}:
buildPythonPackage rec {
pname = "cirq-pasqal";
inherit (cirq-core) version src meta;
sourceRoot = "source/${pname}";
postPatch = ''
substituteInPlace requirements.txt \
--replace "requests~=2.18" "requests"
'';
propagatedBuildInputs = [
cirq-core
requests
];
checkInputs = [
pytestCheckHook
];
# cirq's importlib hook doesn't work here
#pythonImportsCheck = [ "cirq_pasqal" ];
}

View File

@ -0,0 +1,73 @@
{ lib
, buildPythonPackage
, cirq-core
, pythonOlder
, fetchFromGitHub
, requests
, pytestCheckHook
, attrs
, certifi
, h11
, httpcore
, idna
, httpx
, iso8601
, pydantic
, pyjwt
, pyquil
, python-dateutil
, qcs-api-client
, retrying
, rfc3339
, rfc3986
, six
, sniffio
, toml
}:
buildPythonPackage rec {
pname = "cirq-rigetti";
inherit (cirq-core) version src meta;
sourceRoot = "source/${pname}";
postPatch = ''
substituteInPlace requirements.txt \
--replace "attrs~=20.3.0" "attrs" \
--replace "h11~=0.9.0" "h11" \
--replace "httpcore~=0.11.1" "httpcore" \
--replace "httpx~=0.15.5" "httpx" \
--replace "idna~=2.10" "idna" \
--replace "requests~=2.18" "requests" \
--replace "pyjwt~=1.7.1" "pyjwt"
'';
propagatedBuildInputs = [
cirq-core
attrs
certifi
h11
httpcore
httpx
idna
iso8601
pydantic
pyjwt
pyquil
python-dateutil
qcs-api-client
retrying
rfc3339
rfc3986
six
sniffio
toml
];
checkInputs = [
pytestCheckHook
];
# cirq's importlib hook doesn't work here
#pythonImportsCheck = [ "cirq_rigetti" ];
}

View File

@ -0,0 +1,25 @@
{ lib
, buildPythonPackage
, cirq-core
, pythonOlder
, fetchFromGitHub
, pytestCheckHook
}:
buildPythonPackage rec {
pname = "cirq-web";
inherit (cirq-core) version src meta;
sourceRoot = "source/${pname}";
propagatedBuildInputs = [
cirq-core
];
checkInputs = [
pytestCheckHook
];
# cirq's importlib hook doesn't work here
#pythonImportsCheck = [ "cirq_web" ];
}

View File

@ -0,0 +1,93 @@
{ lib
, buildPythonPackage
, fetchFromGitHub
, importlib-metadata
, ipython
, lark-parser
, networkx
, numpy
, poetry-core
, pytest-asyncio
, pytest-freezegun
, pytest-httpx
, pytest-mock
, pytestCheckHook
, pythonOlder
, qcs-api-client
, retry
, rpcq
, scipy
}:
buildPythonPackage rec {
pname = "pyquil";
version = "3.0.0";
format = "pyproject";
disabled = pythonOlder "3.7";
src = fetchFromGitHub {
owner = "rigetti";
repo = pname;
rev = "v${version}";
sha256 = "0070pslz6vvyavm5pm27q2bng2mfmkb41v5czzckz7m8db3b1r2x";
};
nativeBuildInputs = [
poetry-core
];
propagatedBuildInputs = [
lark-parser
networkx
numpy
qcs-api-client
retry
rpcq
scipy
] ++ lib.optionals (pythonOlder "3.8") [
importlib-metadata
];
checkInputs = [
pytest-asyncio
pytest-freezegun
pytest-httpx
pytest-mock
pytestCheckHook
ipython
];
postPatch = ''
substituteInPlace pyproject.toml \
--replace 'lark = "^0.11.1"' 'lark-parser = ">=0.11.1"'
'';
disabledTestPaths = [
# Tests require network access
"test/e2e/"
"test/unit/test_api.py"
"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"
];
disabledTests = [
"test_compile_with_quilt_calibrations"
"test_sets_timeout_on_requests"
];
pythonImportsCheck = [ "pyquil" ];
meta = with lib; {
description = "Python library for creating Quantum Instruction Language (Quil) programs";
homepage = "https://github.com/rigetti/pyquil";
license = licenses.asl20;
maintainers = with maintainers; [ fab ];
};
}

View File

@ -0,0 +1,66 @@
{ lib
, attrs
, buildPythonPackage
, fetchPypi
, httpx
, iso8601
, pydantic
, pyjwt
, pytest-asyncio
, pytestCheckHook
, python-dateutil
, pythonOlder
, respx
, retrying
, rfc3339
, toml
}:
buildPythonPackage rec {
pname = "qcs-api-client";
version = "0.8.0";
disabled = pythonOlder "3.7";
src = fetchPypi {
inherit pname version;
sha256 = "1c0g3aa2pk4zd40banap2j797080qivd42q7imla2yvv6cvq24b8";
};
propagatedBuildInputs = [
attrs
httpx
iso8601
pydantic
pyjwt
python-dateutil
retrying
rfc3339
toml
];
checkInputs = [
pytest-asyncio
pytestCheckHook
respx
];
postPatch = ''
substituteInPlace setup.py \
--replace "attrs>=20.1.0,<21.0.0" "attrs" \
--replace "httpx>=0.15.0,<0.16.0" "httpx" \
--replace "pyjwt>=1.7.1,<2.0.0" "pyjwt"
'';
# Project has no tests
doCheck = false;
pythonImportsCheck = [ "qcs_api_client" ];
meta = with lib; {
description = "Python library for accessing the Rigetti QCS API";
homepage = "https://pypi.org/project/qcs-api-client/";
license = licenses.asl20;
maintainers = with maintainers; [ fab ];
};
}

View File

@ -0,0 +1,26 @@
{ lib
, buildPythonPackage
, fetchPypi
}:
buildPythonPackage rec {
pname = "rfc3339";
version = "6.2";
src = fetchPypi {
inherit pname version;
sha256 = "1l6l1bh91i2r4dwcm86hlkx8cbh1xwgsk8hb4jvr5y5fxxg3ng6m";
};
# Project has no tests
doCheck = false;
pythonImportsCheck = [ "rfc3339" ];
meta = with lib; {
description = "Format dates according to the RFC 3339";
homepage = "https://hg.sr.ht/~henryprecheur/rfc3339";
license = licenses.isc;
maintainers = with maintainers; [ fab ];
};
}

View File

@ -0,0 +1,53 @@
{ lib
, buildPythonPackage
, fetchFromGitHub
, msgpack
, numpy
, pytest-asyncio
, pytestCheckHook
, python-rapidjson
, pythonOlder
, pyzmq
, ruamel-yaml
}:
buildPythonPackage rec {
pname = "rpcq";
version = "3.9.2";
disabled = pythonOlder "3.6";
src = fetchFromGitHub {
owner = "rigetti";
repo = pname;
rev = "v${version}";
sha256 = "1vvf6y7459f8aamhkcxx36ajiai143s2vwg751x0dl0lx7hp3yn5";
};
propagatedBuildInputs = [
msgpack
python-rapidjson
pyzmq
ruamel-yaml
];
checkInputs = [
numpy
pytest-asyncio
pytestCheckHook
];
postPatch = ''
substituteInPlace setup.py \
--replace "msgpack>=0.6,<1.0" "msgpack"
'';
pythonImportsCheck = [ "rpcq" ];
meta = with lib; {
description = "The RPC framework and message specification for rigetti Quantum Cloud services";
homepage = "https://github.com/rigetti/rpcq";
license = licenses.asl20;
maintainers = with maintainers; [ fab ];
};
}

View File

@ -1491,10 +1491,20 @@ in {
cirq = callPackage ../development/python-modules/cirq { };
cirq-aqt = callPackage ../development/python-modules/cirq-aqt { };
cirq-core = callPackage ../development/python-modules/cirq-core { };
cirq-ionq = callPackage ../development/python-modules/cirq-ionq { };
cirq-google = callPackage ../development/python-modules/cirq-google { };
cirq-rigetti = callPackage ../development/python-modules/cirq-rigetti { };
cirq-pasqal = callPackage ../development/python-modules/cirq-pasqal { };
cirq-web = callPackage ../development/python-modules/cirq-web { };
ciscomobilityexpress = callPackage ../development/python-modules/ciscomobilityexpress { };
ciso8601 = callPackage ../development/python-modules/ciso8601 { };
@ -6808,6 +6818,8 @@ in {
pyquery = callPackage ../development/python-modules/pyquery { };
pyquil = callPackage ../development/python-modules/pyquil { };
pyrabbit2 = callPackage ../development/python-modules/pyrabbit2 { };
pyrad = callPackage ../development/python-modules/pyrad { };
@ -7778,6 +7790,8 @@ in {
qcengine = callPackage ../development/python-modules/qcengine { };
qcs-api-client = callPackage ../development/python-modules/qcs-api-client { };
qdarkstyle = callPackage ../development/python-modules/qdarkstyle { };
qdldl = callPackage ../development/python-modules/qdldl { };
@ -8015,6 +8029,8 @@ in {
retworkx = callPackage ../development/python-modules/retworkx { };
rfc3339 = callPackage ../development/python-modules/rfc3339 { };
rfc3339-validator = callPackage ../development/python-modules/rfc3339-validator { };
rfc3986 = callPackage ../development/python-modules/rfc3986 { };
@ -8103,6 +8119,8 @@ in {
routes = callPackage ../development/python-modules/routes { };
rpcq = callPackage ../development/python-modules/rpcq { };
rpdb = callPackage ../development/python-modules/rpdb { };
rply = callPackage ../development/python-modules/rply { };