1{
2 buildPythonPackage,
3 cirq-core,
4 setuptools,
5 pyquil,
6 qcs-sdk-python,
7 pytestCheckHook,
8}:
9
10buildPythonPackage rec {
11 pname = "cirq-rigetti";
12 pyproject = true;
13 inherit (cirq-core) version src;
14
15 sourceRoot = "${src.name}/${pname}";
16
17 pythonRelaxDeps = [ "pyquil" ];
18
19 postPatch = ''
20 # Remove outdated test
21 rm cirq_rigetti/service_test.py
22 '';
23
24 build-system = [ setuptools ];
25
26 dependencies = [
27 cirq-core
28 pyquil
29 qcs-sdk-python
30 ];
31
32 nativeCheckInputs = [ pytestCheckHook ];
33
34 disabledTestPaths = [
35 # No need to test the version number
36 "cirq_rigetti/_version_test.py"
37 ];
38
39 # cirq's importlib hook doesn't work here
40 #pythonImportsCheck = [ "cirq_rigetti" ];
41
42 meta = {
43 inherit (cirq-core.meta) changelog license maintainers;
44 description = "Cirq package to simulate and connect to Rigetti quantum computers and Quil QVM";
45 homepage = "https://github.com/quantumlib/Cirq/tree/main/cirq-rigetti";
46 };
47}