From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <gentoo-commits+bounces-1490518-garchives=archives.gentoo.org@lists.gentoo.org>
Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256)
	(No client certificate requested)
	by finch.gentoo.org (Postfix) with ESMTPS id 6C55E158030
	for <garchives@archives.gentoo.org>; Sun, 26 Feb 2023 00:30:17 +0000 (UTC)
Received: from pigeon.gentoo.org (localhost [127.0.0.1])
	by pigeon.gentoo.org (Postfix) with SMTP id 26899E07D1;
	Sun, 26 Feb 2023 00:30:16 +0000 (UTC)
Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
	(No client certificate requested)
	by pigeon.gentoo.org (Postfix) with ESMTPS id EB168E07D1
	for <gentoo-commits@lists.gentoo.org>; Sun, 26 Feb 2023 00:30:15 +0000 (UTC)
Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
	(No client certificate requested)
	by smtp.gentoo.org (Postfix) with ESMTPS id B13A2335D75
	for <gentoo-commits@lists.gentoo.org>; Sun, 26 Feb 2023 00:30:14 +0000 (UTC)
Received: from localhost.localdomain (localhost [IPv6:::1])
	by oystercatcher.gentoo.org (Postfix) with ESMTP id 016358C2
	for <gentoo-commits@lists.gentoo.org>; Sun, 26 Feb 2023 00:30:13 +0000 (UTC)
From: "Sam James" <sam@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Content-Transfer-Encoding: 8bit
Content-type: text/plain; charset=UTF-8
Reply-To: gentoo-dev@lists.gentoo.org, "Sam James" <sam@gentoo.org>
Message-ID: <1677371398.c01ca5e9ecb1a56e9c77b6599da2af2578ff6b24.sam@gentoo>
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-python/qiskit-aer/files/, dev-python/qiskit-aer/
X-VCS-Repository: repo/gentoo
X-VCS-Files: dev-python/qiskit-aer/files/qiskit-aer-0.11.2-terra-test.patch dev-python/qiskit-aer/qiskit-aer-0.11.2-r1.ebuild
X-VCS-Directories: dev-python/qiskit-aer/files/ dev-python/qiskit-aer/
X-VCS-Committer: sam
X-VCS-Committer-Name: Sam James
X-VCS-Revision: c01ca5e9ecb1a56e9c77b6599da2af2578ff6b24
X-VCS-Branch: master
Date: Sun, 26 Feb 2023 00:30:13 +0000 (UTC)
Precedence: bulk
List-Post: <mailto:gentoo-commits@lists.gentoo.org>
List-Help: <mailto:gentoo-commits+help@lists.gentoo.org>
List-Unsubscribe: <mailto:gentoo-commits+unsubscribe@lists.gentoo.org>
List-Subscribe: <mailto:gentoo-commits+subscribe@lists.gentoo.org>
List-Id: Gentoo Linux mail <gentoo-commits.gentoo.org>
X-BeenThere: gentoo-commits@lists.gentoo.org
X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply
X-Archives-Salt: 077c4af5-e811-4564-be82-1f952205b776
X-Archives-Hash: 3292d43311204eda5d0e413d29932aaf

commit:     c01ca5e9ecb1a56e9c77b6599da2af2578ff6b24
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Sun Feb 26 00:22:53 2023 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sun Feb 26 00:29:58 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c01ca5e9

dev-python/qiskit-aer: enable py3.11

Closes: https://bugs.gentoo.org/896868
Signed-off-by: Sam James <sam <AT> gentoo.org>

 .../files/qiskit-aer-0.11.2-terra-test.patch       | 45 ++++++++++++++++++++++
 dev-python/qiskit-aer/qiskit-aer-0.11.2-r1.ebuild  | 36 +++++++++--------
 2 files changed, 66 insertions(+), 15 deletions(-)

diff --git a/dev-python/qiskit-aer/files/qiskit-aer-0.11.2-terra-test.patch b/dev-python/qiskit-aer/files/qiskit-aer-0.11.2-terra-test.patch
new file mode 100644
index 000000000000..e9f65dd6a42a
--- /dev/null
+++ b/dev-python/qiskit-aer/files/qiskit-aer-0.11.2-terra-test.patch
@@ -0,0 +1,45 @@
+https://github.com/Qiskit/qiskit-aer/commit/cec5c11513118fa8d701e2bef1376dc3db7263c3
+
+From cec5c11513118fa8d701e2bef1376dc3db7263c3 Mon Sep 17 00:00:00 2001
+From: Jun Doi <doichan@jp.ibm.com>
+Date: Fri, 27 Jan 2023 18:55:59 +0900
+Subject: [PATCH] Fix test_aer_statevector (#1710)
+
+* fix test_aer_statevector
+
+* add plot directive to docs
+
+* fix test_aer_statevector and remove reno
+
+Co-authored-by: Hiroshi Horii <horii@jp.ibm.com>
+--- a/docs/conf.py
++++ b/docs/conf.py
+@@ -67,6 +67,7 @@ extensions = [
+     'sphinx_tabs.tabs',
+     'jupyter_sphinx',
+     'reno.sphinxext',
++    'matplotlib.sphinxext.plot_directive',
+ ]
+ html_static_path = ['_static']
+ templates_path = ['_templates']
+--- a/test/terra/states/test_aer_statevector.py
++++ b/test/terra/states/test_aer_statevector.py
+@@ -1347,13 +1347,14 @@ class TestAerStatevector(common.QiskitAerTestCase):
+             ([-1, 1j], ["-", "+i"]),
+             ([1e-16 + 1j], ["i"]),
+             ([-1 + 1e-16 * 1j], ["-"]),
+-            ([-1, -1 - 1j], ["-", "+ (-1 - i)"]),
++            ([-1, -1 - 1j], ["-", "+(-1 - i)"]),
+             ([np.sqrt(2) / 2, np.sqrt(2) / 2], ["\\frac{\\sqrt{2}}{2}", "+\\frac{\\sqrt{2}}{2}"]),
+             ([1 + np.sqrt(2)], ["(1 + \\sqrt{2})"]),
+         ]
+-        for numbers, latex_terms in cases:
+-            terms = numbers_to_latex_terms(numbers)
+-            self.assertListEqual(terms, latex_terms)
++        with self.assertWarns(DeprecationWarning):
++            for numbers, latex_terms in cases:
++                terms = numbers_to_latex_terms(numbers, 15)
++                self.assertListEqual(terms, latex_terms)
+ 
+     def test_statevector_draw_latex_regression(self):
+         """Test numerical rounding errors are not printed"""

diff --git a/dev-python/qiskit-aer/qiskit-aer-0.11.2-r1.ebuild b/dev-python/qiskit-aer/qiskit-aer-0.11.2-r1.ebuild
index f9de54e64534..07d45fbdb52d 100644
--- a/dev-python/qiskit-aer/qiskit-aer-0.11.2-r1.ebuild
+++ b/dev-python/qiskit-aer/qiskit-aer-0.11.2-r1.ebuild
@@ -4,9 +4,9 @@
 EAPI=8
 
 DISTUTILS_USE_PEP517=setuptools
-PYTHON_COMPAT=( python3_{9..10} )
+PYTHON_COMPAT=( python3_{9..11} )
 
-inherit distutils-r1
+inherit distutils-r1 multiprocessing
 
 DESCRIPTION="High performance simulator for quantum circuits that includes noise models"
 HOMEPAGE="
@@ -35,7 +35,11 @@ DEPEND="
 	virtual/cblas[eselect-ldso]
 	sci-libs/openblas[eselect-ldso]
 "
-
+RDEPEND="
+	${DEPEND}
+	>=dev-python/qiskit-terra-0.21.0[${PYTHON_USEDEP}]
+	>=dev-python/scipy-1.0[${PYTHON_USEDEP}]
+"
 BDEPEND="
 	>=dev-util/cmake-3.17
 	>=dev-python/scikit-build-0.11.0[${PYTHON_USEDEP}]
@@ -43,21 +47,19 @@ BDEPEND="
 	test? (
 		dev-python/ddt[${PYTHON_USEDEP}]
 		dev-python/fixtures[${PYTHON_USEDEP}]
+		dev-python/pytest-xdist[${PYTHON_USEDEP}]
 	)
 "
 
-RDEPEND="
-	${DEPEND}
-	>=dev-python/qiskit-terra-0.21.0[${PYTHON_USEDEP}]
-	>=dev-python/scipy-1.0[${PYTHON_USEDEP}]
-"
+PATCHES=(
+	# Remove cmake dependency from setup.py because of
+	# invalid dependency description. We put this dependency check in BDEPEND.
+	"${FILESDIR}/qiskit-aer-0.10.3-remove-cmake-dependency.patch"
+	"${FILESDIR}/qiskit-aer-0.11.2-terra-test.patch"
+)
 
 distutils_enable_tests pytest
 
-# Remove cmake dependency from setup.py because of
-# invalid dependency description. We put this dependency check in BDEPEND.
-PATCHES=( "${FILESDIR}/qiskit-aer-0.10.3-remove-cmake-dependency.patch" )
-
 check_openblas() {
 	local libdir=$(get_libdir) me="openblas"
 
@@ -75,7 +77,7 @@ check_openblas() {
 pkg_setup() {
 	if use test; then
 		check_openblas
-		if [ $? -ne 0 ]; then
+		if [[ $? -ne 0 ]]; then
 			die "Set blas implementation to openblas using 'eselect blas set openblas'!"
 		fi
 	fi
@@ -92,11 +94,15 @@ python_prepare_all() {
 python_test() {
 	local EPYTEST_DESELECT=(
 		# TODO
-		test/terra/states/test_aer_statevector.py::TestAerStatevector::test_number_to_latex_terms
+		test/terra/states/test_aer_statevector.py::TestAerStatevector::test_drawings
+
+		# TODO: GLIBCXX_ASSERTIONS, bug #897758
+		test/terra/backends/aer_simulator/test_algorithms.py::TestAlgorithms::test_extended_stabilizer_sparse_output_probs
+		test/terra/backends/aer_simulator/test_options.py::TestOptions::test_mps_options
 	)
 
 	rm -rf qiskit_aer || die
-	epytest -s
+	epytest -n "$(makeopts_jobs)" -s
 }
 
 pkg_postinst() {