No project description provided
Project description
Native code for BQSKit
bqskitrs
is a Python package that implements circuit instantiation and simulation to accelerate BQSKit.
Installing bqskitrs
You can often install bqskitrs
via PyPi with pip
:
pip install bqskitrs
this will use pre-built wheels. Sometimes wheels are not available, so you must build from source.
Building bqskitrs
Linux
It's best to build and install the manylinux version with the provided docker container:
git clone https://github.com/BQSKit/bqskitrs.git --recursive
cd bqskitrs
docker run -e OPENBLAS_ARGS="DYNAMIC_ARCH=1" --rm -v $(pwd):/io edyounis/bqskitrs-manylinux:1.1 build --release --features=openblas --compatibility=manylinux2014
pip install --no-index --find-links=target/wheels bqskitrs
MacOS
Make sure the version of pip you have is at least 20.0.2.
You can check via pip -V
and upgrade via python3 -m pip install -U pip
.
First, install the dependencies. We use homebrew here, which is what we build the official package against.
brew install gcc ceres-solver eigen lapack
Once that is complete you should then install Rust like as follows:
curl https://sh.rustup.rs -sSf | sh -s -- -y
Then clone and enter enter the bqskitrs
directory:
git clone https://github.com/BQSKit/bqskitrs.git --recursive
cd bqskitrs
Then build the wheel (package file) with maturin:
pip install -U setuptools wheel maturin
maturin build --features="accelerate" --release
If you encounter issues on an intel x86 Mac computer with a message like "rust failed to run custom build command for cxx', you may need to run the following build command instead:
MACOSX_DEPLOYMENT_TARGET=11.0 maturin build --features="accelerate"
Finally install the wheel that you built:
pip install --no-index --find-links=target/wheels bqskitrs
Once it is done installing the wheel, verify that the installation succeeded by running
python3 -c 'import bqskitrs'
It should not print anything out nor give any error.
Windows
Make sure the version of pip you have is at least 20.0.2.
You can check via pip -V
and upgrade via python3 -m pip install -U pip
.
Download and install rust via the installer found at https://rustup.rs/. Accept all of the defaults.
Close your shell and open a new one (this updates the enviroment).
Then install cargo-vcpkg
, which will help install dependencies for us. You can install it via
cargo install cargo-vcpkg
cargo
is installed with Rust so this should "just work".
Then clone and enter enter the bqskitrs
directory:
git clone https://github.com/BQSKit/bqskitrs.git --recursive
cd bqskitrs
Then build the dependencies with vcpkg.
cargo vcpkg build
This will take quite a while.
Then build the wheel (package file) with maturin:
python -m pip install maturin
python -m maturin build --interpreter $(which python) --features="openblas,openblas-src/system" --release
Finally install the wheel that you built:
pip install --no-index --find-links=target/wheels bqskitrs
Once it is done installing the wheel, verify that the installation succeeded by running
python3 -c 'import bqskitrs'
It should not print anything out nor give any error.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distributions
Hashes for bqskitrs-0.4.0rc5-cp38-abi3-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 93ad8bdc640b93253aa81755e2c15cf1534e462d55676df9a8341b3696d0ab43 |
|
MD5 | 1ea33a24f29368e3218449b65c924c96 |
|
BLAKE2b-256 | 1c8ba6e373a441ca49eaa75a4252ee94169ba41dad61dbd67aa4eb9fe8cb6798 |
Hashes for bqskitrs-0.4.0rc5-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9c8e685241dbb79e3f575f86bd61426102830180c839666c44c8cf87bc759bf9 |
|
MD5 | 58eb26f9dffef5aa955fe79352817d4d |
|
BLAKE2b-256 | 8850b43fb93a86e96f43f4f1c3b286d81ec389b791cfff39043c7835374f9153 |
Hashes for bqskitrs-0.4.0rc5-cp38-abi3-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | afdcdfdc59f31495f733ac9610a1e862202fa85cd0b9a8116aa9bf00b76460a4 |
|
MD5 | 46edc6fe1155ee3acb902af0f0988d21 |
|
BLAKE2b-256 | 791e8d487482f31e0931cd6309aa3c34e1a7743bee5ac6cd7d80a6d0d9fe04e1 |
Hashes for bqskitrs-0.4.0rc5-cp38-abi3-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a7df9d6c31e6a3da4f2566c3c75c14d5be7ffeb926bb956ec5c1a57fc8107f7d |
|
MD5 | 9609523da28f14f926d63800dc3d3238 |
|
BLAKE2b-256 | 69348d0d44bf438ac5be8aadee1d5e47c921e7318feecb377776ce0ecf8904de |