provide suiitable test

This commit is contained in:
Alessandro Candido
2023-02-07 10:28:53 +01:00
parent f595c268ad
commit b8f09ddf36
3 changed files with 16 additions and 1 deletions

View File

@@ -4,3 +4,4 @@ output-format = "colorized"
[tool.pytest.ini_options] [tool.pytest.ini_options]
testpaths = ["tests/"] testpaths = ["tests/"]
addopts = ["--cov=qibotn", "--cov-report=xml"] addopts = ["--cov=qibotn", "--cov-report=xml"]
env = ["D:NUMBA_DISABLE_JIT=1"]

View File

@@ -24,11 +24,16 @@ setup(
], ],
install_requires=[ install_requires=[
"qibo>=0.1.10", "qibo>=0.1.10",
"qibojit>=0.0.7",
"quimb[tensor]>=1.4.0", "quimb[tensor]>=1.4.0",
], ],
extras_require={ extras_require={
"docs": [], "docs": [],
"tests": ["pytest>=7.2.0", "pytest-cov>=4.0.0"], "tests": [
"pytest>=7.2.0",
"pytest-cov>=4.0.0",
"pytest-env>=0.8.1",
],
}, },
python_requires=">=3.7.0", python_requires=">=3.7.0",
long_description=LONG_DESCRIPTION, long_description=LONG_DESCRIPTION,

View File

@@ -0,0 +1,9 @@
import pytest
from qibotn import qasm_quimb
@pytest.mark.parametrize("nqubits", [1, 2, 5, 10])
def test_eval(nqubits: int):
print(f"Testing for {nqubits} nqubits")
result = qasm_quimb.eval_QI_qft(nqubits)