Skip to content

Commit

Permalink
Pure language! (v1.29.8)
Browse files Browse the repository at this point in the history
  • Loading branch information
WrathfulSpatula committed Jul 3, 2024
1 parent d5a502d commit b27d5a7
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 33 deletions.
28 changes: 6 additions & 22 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,10 @@ jobs:
repository: 'unitaryfund/qrack'
path: qrack

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.12'

- name: Install Python Dependencies
run: |
python -m pip install --upgrade pip
python -m pip install wheel setuptools
python -m pip install wheel setuptools python3
- name: Prepare Build Environment (Linux)
run: |
Expand Down Expand Up @@ -78,15 +73,10 @@ jobs:
repository: 'unitaryfund/qrack'
path: qrack

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.12'

- name: Install Python Dependencies
run: |
python -m pip install --upgrade pip
python -m pip install wheel setuptools
python -m pip install wheel setuptools python3
- name: Prepare Build Environment (Linux)
run: |
Expand Down Expand Up @@ -130,16 +120,10 @@ jobs:
with:
repository: 'unitaryfund/qrack'
path: qrack

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.12'

- name: Install Python Dependencies
run: |
python -m pip install --upgrade pip
python -m pip install wheel setuptools
python -m pip install wheel setuptools python3
- name: Prepare Build Environment (Linux)
run: |
Expand Down Expand Up @@ -187,7 +171,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.12'
python-version: '3.10'

- name: Install Python Dependencies
run: |
Expand All @@ -206,7 +190,7 @@ jobs:
cd qrack
mkdir build
cd build
cmake -DCMAKE_CXX_FLAGS=-I\ /opt/homebrew/opt/opencl-clhpp-headers/include -DENABLE_COMPLEX_X2=OFF -DENABLE_SSE3=OFF -DENABLE_RDRAND=OFF -DENABLE_OPENCL=OFF -DENABLE_FIXED_POINT=ON -DQBCAPPOW=12 -DCPP_STD=14 ..
cmake -DENABLE_COMPLEX_X2=OFF -DENABLE_SSE3=OFF -DENABLE_RDRAND=OFF -DENABLE_OPENCL=OFF -DENABLE_FIXED_POINT=ON -DQBCAPPOW=12 -DCPP_STD=14 ..
make qrack_pinvoke qrack_cl_precompile
- name: Build Wheel
Expand Down Expand Up @@ -243,7 +227,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.12'
python-version: '3.10'

- name: Install Python Dependencies
run: |
Expand Down
9 changes: 4 additions & 5 deletions pyqrack/qrack_system/qrack_system.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,22 +16,21 @@
# found in the LICENSE file or at https://opensource.org/licenses/MIT.

import os
import pathlib
from ctypes import *
from sys import platform as _platform


class QrackSystem:
def __init__(self):
path = pathlib.Path(__file__).absolute().parent
path = "."
if os.environ.get('PYQRACK_SHARED_LIB_PATH') != None:
shared_lib_path = os.environ.get('PYQRACK_SHARED_LIB_PATH')
elif _platform == "win32":
shared_lib_path = str(path / "qrack_lib/qrack_pinvoke.dll")
shared_lib_path = "qrack_lib/qrack_pinvoke.dll"
elif _platform == "darwin":
shared_lib_path = str(path / "qrack_lib/libqrack_pinvoke.dylib")
shared_lib_path = "qrack_lib/libqrack_pinvoke.dylib"
else:
shared_lib_path = str(path / "qrack_lib/libqrack_pinvoke.so")
shared_lib_path = "qrack_lib/libqrack_pinvoke.so"

try:
self.qrack_lib = CDLL(shared_lib_path)
Expand Down
16 changes: 10 additions & 6 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,15 @@
from setuptools import setup


VERSION = "1.29.6"
VERSION = "1.29.8"

# Read long description from README.
README_PATH = os.path.join(os.path.abspath(os.path.dirname(__file__)), 'README.md')
with open(README_PATH) as readme_file:
README = readme_file.read()

# This is technically a module included in the language standard by PEP,
# but some systems might opt not to implement any particular PEP.
requirements = [
"pathlib"
]
# Pure language standard!
requirements = []

setup(
name='pyqrack',
Expand All @@ -36,12 +33,19 @@
"Operating System :: MacOS",
"Operating System :: POSIX :: Linux",
"Programming Language :: C++",
"Programming Language :: Python :: 3.0",
"Programming Language :: Python :: 3.1",
"Programming Language :: Python :: 3.2",
"Programming Language :: Python :: 3.3",
"Programming Language :: Python :: 3.4",
"Programming Language :: Python :: 3.5",
"Programming Language :: Python :: 3.6",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Topic :: Scientific/Engineering",
],
keywords="pyqrack qrack simulator quantum gpu",
Expand Down

0 comments on commit b27d5a7

Please sign in to comment.