Skip to content

Commit 2b6667b

Browse files
committed
update setup; test
include=["qiskit_algorithms"]
1 parent 6b19c97 commit 2b6667b

File tree

5 files changed

+86
-16
lines changed

5 files changed

+86
-16
lines changed

README.md

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,18 @@
1-
# Quantum-Simulation-Recipe
2-
1+
# Quantum Simulation Recipes
32
<!-- ![Figure](./figs/idea.png) -->
4-
3+
This python package contains ingredients for quantum simulation, such as the Hamiltonians and algorithm primitives.
4+
[![License](https://img.shields.io/github/license/qiskit-community/qiskit-algorithms.svg?style=popout-square)](https://opensource.org/licenses/Apache-2.0)
55

66
## Usage
7-
<!-- - Create python environment `conda create --name myenv python=3.10`
8-
- Install requirements `pip install -r ./code/requirements.txt` -->
9-
```
10-
# Create python environment
11-
conda create --name myenv python=3.10
12-
13-
# Install requirements
14-
pip install -r ./code/requirements.txt
7+
```bash
8+
conda create --name qsenv python=3.10
9+
pip install quantum-simulation-recipe
1510
```
1611

1712
<!-- ### Requirements
1813
- qiskit version ==
1914
- openfermion
20-
- python (version = 3.10), numpy, scipy, matplotlib, jax -->
15+
- python (version = 3.10), numpy, scipy, matplotlib, jax -->
16+
17+
## Examples
18+
https://github.com/Jue-Xu/Quantum-Simulation-Recipe/tree/main/tests/test.ipynb

requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@ openfermion==1.5.1
55
openfermionpyscf==0.5
66
pandas==2.2.2
77
qiskit==1.0.2
8-
scipy==1.14.0
8+
scipy==1.12.0

setup.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,12 +36,14 @@
3636
long_description=long_description,
3737
long_description_content_type="text/markdown",
3838
url="https://github.com/Jue-Xu/quantum-simulation-recipe",
39-
packages=setuptools.find_packages(),
39+
packages=setuptools.find_packages(include=["quantum_simulation_recipe"]),
4040
# package_data={"cf_remote": ["VERSION"]},
4141
# include_package_data=True,
42+
license="Apache-2.0",
4243
classifiers=[
4344
"Programming Language :: Python :: 3",
44-
"License :: OSI Approved :: GNU General Public License v3 (GPLv3)",
45+
"License :: OSI Approved :: Apache Software License",
46+
# "License :: OSI Approved :: GNU General Public License v3 (GPLv3)",
4547
"Operating System :: OS Independent",
4648
],
4749
python_requires=">=3.10",
@@ -52,7 +54,7 @@
5254
"openfermion >= 1.5.1",
5355
"openfermionpyscf >= 0.5",
5456
"matplotlib >= 3.8.2",
55-
"scipy >= 1.14.0",
57+
"scipy >= 1.12.0",
5658
"numpy >= 1.23.5",
5759
"pandas >= 2.2.2",
5860
],

tests/test.ipynb

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
{
2+
"cells": [
3+
{
4+
"cell_type": "markdown",
5+
"id": "e385a43f",
6+
"metadata": {},
7+
"source": [
8+
"# Test"
9+
]
10+
},
11+
{
12+
"cell_type": "code",
13+
"execution_count": 10,
14+
"id": "8c03d3e4",
15+
"metadata": {},
16+
"outputs": [
17+
{
18+
"ename": "ModuleNotFoundError",
19+
"evalue": "No module named 'quantum-simulation-recipe'",
20+
"output_type": "error",
21+
"traceback": [
22+
"\u001b[0;31m---------------------------------------------------------------------------\u001b[0m",
23+
"\u001b[0;31mModuleNotFoundError\u001b[0m Traceback (most recent call last)",
24+
"Cell \u001b[0;32mIn[10], line 2\u001b[0m\n\u001b[1;32m 1\u001b[0m \u001b[38;5;28;01mimport\u001b[39;00m \u001b[38;5;21;01mimportlib\u001b[39;00m \n\u001b[0;32m----> 2\u001b[0m qsr \u001b[38;5;241m=\u001b[39m \u001b[43mimportlib\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mimport_module\u001b[49m\u001b[43m(\u001b[49m\u001b[38;5;124;43m\"\u001b[39;49m\u001b[38;5;124;43mquantum-simulation-recipe\u001b[39;49m\u001b[38;5;124;43m\"\u001b[39;49m\u001b[43m)\u001b[49m\n\u001b[1;32m 4\u001b[0m \u001b[38;5;66;03m# from jupyter_book import *\u001b[39;00m\n\u001b[1;32m 5\u001b[0m \u001b[38;5;66;03m# from quantum_simulation_recipe import *\u001b[39;00m\n\u001b[1;32m 6\u001b[0m \u001b[38;5;28;01mfrom\u001b[39;00m \u001b[38;5;21;01mqiskit_algorithms\u001b[39;00m \u001b[38;5;28;01mimport\u001b[39;00m \u001b[38;5;241m*\u001b[39m\n",
25+
"File \u001b[0;32m/opt/homebrew/Caskroom/miniforge/base/lib/python3.10/importlib/__init__.py:126\u001b[0m, in \u001b[0;36mimport_module\u001b[0;34m(name, package)\u001b[0m\n\u001b[1;32m 124\u001b[0m \u001b[38;5;28;01mbreak\u001b[39;00m\n\u001b[1;32m 125\u001b[0m level \u001b[38;5;241m+\u001b[39m\u001b[38;5;241m=\u001b[39m \u001b[38;5;241m1\u001b[39m\n\u001b[0;32m--> 126\u001b[0m \u001b[38;5;28;01mreturn\u001b[39;00m \u001b[43m_bootstrap\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43m_gcd_import\u001b[49m\u001b[43m(\u001b[49m\u001b[43mname\u001b[49m\u001b[43m[\u001b[49m\u001b[43mlevel\u001b[49m\u001b[43m:\u001b[49m\u001b[43m]\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43mpackage\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43mlevel\u001b[49m\u001b[43m)\u001b[49m\n",
26+
"File \u001b[0;32m<frozen importlib._bootstrap>:1050\u001b[0m, in \u001b[0;36m_gcd_import\u001b[0;34m(name, package, level)\u001b[0m\n",
27+
"File \u001b[0;32m<frozen importlib._bootstrap>:1027\u001b[0m, in \u001b[0;36m_find_and_load\u001b[0;34m(name, import_)\u001b[0m\n",
28+
"File \u001b[0;32m<frozen importlib._bootstrap>:1004\u001b[0m, in \u001b[0;36m_find_and_load_unlocked\u001b[0;34m(name, import_)\u001b[0m\n",
29+
"\u001b[0;31mModuleNotFoundError\u001b[0m: No module named 'quantum-simulation-recipe'"
30+
]
31+
}
32+
],
33+
"source": [
34+
"import importlib \n",
35+
"qsr = importlib.import_module(\"quantum-simulation-recipe\")\n",
36+
"\n",
37+
"# from jupyter_book import *\n",
38+
"from quantum_simulation_recipe import *\n",
39+
"from qiskit_algorithms import *"
40+
]
41+
}
42+
],
43+
"metadata": {
44+
"kernelspec": {
45+
"display_name": "Python 3.8.8 ('base')",
46+
"language": "python",
47+
"name": "python3"
48+
},
49+
"language_info": {
50+
"codemirror_mode": {
51+
"name": "ipython",
52+
"version": 3
53+
},
54+
"file_extension": ".py",
55+
"mimetype": "text/x-python",
56+
"name": "python",
57+
"nbconvert_exporter": "python",
58+
"pygments_lexer": "ipython3",
59+
"version": "3.10.14"
60+
},
61+
"vscode": {
62+
"interpreter": {
63+
"hash": "4e8ef2f9fcac0817bca9a7ca376f64f20b4df5ea3bf7af756a50bda7d3557ea6"
64+
}
65+
}
66+
},
67+
"nbformat": 4,
68+
"nbformat_minor": 5
69+
}

tests/test.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
from quantum_simulation_recipe import *

0 commit comments

Comments
 (0)