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.0rc3-cp38-abi3-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7812e1a912863930b2335c67953611d80f63c6086535a585791e7860b2e3dd33 |
|
MD5 | 79337e9d16580c426c05e63336ecb4cd |
|
BLAKE2b-256 | 976a349543c59eed27dcc0a97aec13ab1d97a51a8d92777713f3a5f3012e665c |
Hashes for bqskitrs-0.4.0rc3-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f15bfe993b950d63f0cc865e13b6fbab17b078f76338be7b487f89d6d4363861 |
|
MD5 | e58f5ca5b2a805d75b2ec310f99c34a8 |
|
BLAKE2b-256 | 2de9965f84a2a0213c36f458064fba4133ef60d2a262a1063926284fb6f45dda |
Hashes for bqskitrs-0.4.0rc3-cp38-abi3-macosx_11_0_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | bd51ab4ea22fddabe26f8cd4cacb1b4cbe33dbcbf6bee74fbb24651329936d6c |
|
MD5 | 9c197e7c687fc6065170c7af55bdb7a1 |
|
BLAKE2b-256 | 635789ca07fe5798d7e9a5a58382d08c079beb7e5310ea4cf1a6e5000dc1ce65 |
Hashes for bqskitrs-0.4.0rc3-cp38-abi3-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b2b7fd55a1bd68d4043b77a1c664e289cea850783f45017f6fda3f29d33a3edb |
|
MD5 | 73fbf953fb57b3482930dfc862ddf9b1 |
|
BLAKE2b-256 | 4626bbed3a3022ebf8df124ab06aa5b432685b220dd6c521de1c8869469dd460 |