1
0
forked from pool/python-pyquil
Files
python-pyquil/python-pyquil.spec
Dirk Mueller 68e9952457 - update to 3.5.2:
* Add CHANNEL-DELAY attribute to DefFrame (#1564)
  * regression on pyquil 3.4.0 regarding DEFCAL filtering (#1562)
  * check and warn for existing gate when using defgate (#1512)
  * add hash method to Program (#1527)
  * Allow benchmarks to be missing for 1QRB; fallback to default
    RX fidelity (#1556)

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:numeric/python-pyquil?expand=0&rev=19
2023-05-31 19:37:22 +00:00

113 lines
4.6 KiB
RPMSpec

#
# spec file for package python-pyquil
#
# Copyright (c) 2023 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
Name: python-pyquil
Version: 3.5.2
Release: 0
Summary: A Python library to generate Quantum Instruction Language (Quil) Programs
License: Apache-2.0
URL: https://github.com/rigetti/pyquil
Source: https://github.com/rigetti/pyquil/archive/v%{version}.tar.gz#/pyquil-%{version}.tar.gz
BuildRequires: %{python_module Deprecated >= 1.2.13}
BuildRequires: %{python_module base >= 3.7}
BuildRequires: %{python_module importlib-metadata >= 3.7.3 if %python-base < 3.8}
BuildRequires: %{python_module lark >= 0.11.1}
BuildRequires: %{python_module networkx >= 2.5}
BuildRequires: %{python_module numpy >= 1.21}
BuildRequires: %{python_module pip}
BuildRequires: %{python_module poetry-core >= 1.0.0}
BuildRequires: %{python_module qcs-api-client >= 0.21 with %python-qcs-api-client < 0.22.0}
BuildRequires: %{python_module rpcq >= 3.10.0}
BuildRequires: %{python_module scipy >= 1.6.1}
BuildRequires: %{python_module tenacity >= 8.2.2}
BuildRequires: fdupes
BuildRequires: python-rpm-macros
Requires: python-Deprecated >= 1.2.13
Requires: python-lark >= 0.11.1
Requires: python-networkx >= 2.5
Requires: python-numpy >= 1.21
Requires: python-rpcq >= 3.10.0
Requires: python-scipy >= 1.6.1
Requires: python-tenacity >= 8.2.2
Requires: (python-importlib-metadata >= 3.7.3 if python-base < 3.8)
Requires: (python-qcs-api-client >= 0.21 with python-qcs-api-client < 0.22.0)
Recommends: python-ipython
# SECTION test
BuildRequires: %{python_module ipython}
BuildRequires: %{python_module pytest >= 6.2.2}
BuildRequires: %{python_module pytest-freezegun >= 0.4.2}
BuildRequires: %{python_module pytest-mock >= 3.6.1}
BuildRequires: %{python_module pytest-rerunfailures >= 9.1.1}
BuildRequires: %{python_module pytest-timeout >= 1.4.2}
BuildRequires: %{python_module pytest-xdist >= 2.2.1}
BuildRequires: %{python_module respx >= 0.20}
# /SECTION
BuildArch: noarch
%python_subpackages
%description
PyQuil is a Python library for quantum programming using Quil,
the quantum instruction language developed at Rigetti Computing.
PyQuil serves three main functions:
- Easily generating Quil programs from quantum gates and
classical operations
- Compiling and simulating Quil programs using the Quil
Compiler (quilc) and the Quantum Virtual Machine (QVM)
- Executing Quil programs on real quantum processors (QPUs)
using Quantum Cloud Services (QCS)
%prep
%autosetup -p1 -n pyquil-%{version}
echo "# empty module" >> pyquil/quantum_processor/_isa.py
%build
%pyproject_wheel
%install
%pyproject_install
%python_expand %fdupes %{buildroot}%{$python_sitelib}
%check
# These need a (local) network connection to two docker containers
ignoretests="--ignore api/_qvm.py"
ignoretests="$ignoretests --ignore test/e2e"
ignoretests="$ignoretests --ignore test/unit/test_api.py"
ignoretests="$ignoretests --ignore test/unit/test_compiler.py"
ignoretests="$ignoretests --ignore test/unit/test_compatibility_v2_operator_estimation.py"
ignoretests="$ignoretests --ignore test/unit/test_compatibility_v2_quantum_computer.py"
ignoretests="$ignoretests --ignore test/unit/test_compatibility_v2_qvm.py"
ignoretests="$ignoretests --ignore test/unit/test_operator_estimation.py"
ignoretests="$ignoretests --ignore test/unit/test_quantum_computer.py"
ignoretests="$ignoretests --ignore test/unit/test_qvm.py"
ignoretests="$ignoretests --ignore test/unit/test_reference_wavefunction.py"
ignoretests="$ignoretests --ignore test/unit/test_wavefunction_simulator.py"
if [ $(getconf LONG_BIT) -eq 32 ]; then
# 32-bit precision errors
donttest="$donttest or (test_wavefunction and test_probabilities)"
# non-deterministic order
donttest="$donttest or (test_paulis_with_placeholders and test_get_qubit)"
fi
%pytest -n auto $ignoretests -k "not (dummpyprefix $donttest)"
%files %{python_files}
%{python_sitelib}/pyquil-%{version}.dist-info
%{python_sitelib}/pyquil
%changelog