Skip to main content

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

bqskitrs-0.4.0a1-cp38-abi3-win_amd64.whl (1.8 MB view details)

Uploaded CPython 3.8+Windows x86-64

bqskitrs-0.4.0a1-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (33.9 MB view details)

Uploaded CPython 3.8+manylinux: glibc 2.17+ x86-64

bqskitrs-0.4.0a1-cp38-abi3-macosx_11_0_x86_64.whl (1.8 MB view details)

Uploaded CPython 3.8+macOS 11.0+ x86-64

bqskitrs-0.4.0a1-cp38-abi3-macosx_11_0_arm64.whl (1.6 MB view details)

Uploaded CPython 3.8+macOS 11.0+ ARM64

File details

Details for the file bqskitrs-0.4.0a1-cp38-abi3-win_amd64.whl.

File metadata

  • Download URL: bqskitrs-0.4.0a1-cp38-abi3-win_amd64.whl
  • Upload date:
  • Size: 1.8 MB
  • Tags: CPython 3.8+, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.9

File hashes

Hashes for bqskitrs-0.4.0a1-cp38-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 7ed3aac3d4980da06e39321f04859f3e4bc1baaa9a18d635a566ec3fd97fb00e
MD5 a4c8b03a7497ce72a0744415a2939106
BLAKE2b-256 6eac854fc8dffa88047207f68f4c4e94f798e29e3a173626c06b0baff45f889f

See more details on using hashes here.

File details

Details for the file bqskitrs-0.4.0a1-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for bqskitrs-0.4.0a1-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 3f996bbc1b47ea7b3c5fb8ca8ba83c1d4b8c6fe98c186534016e12d2915b49e8
MD5 71909addac79db10c66d00bcb2eee4bb
BLAKE2b-256 c9fc51fa719de78d030d379aef061a15e4e91eee2d111f423cb945f640c5b16c

See more details on using hashes here.

File details

Details for the file bqskitrs-0.4.0a1-cp38-abi3-macosx_11_0_x86_64.whl.

File metadata

File hashes

Hashes for bqskitrs-0.4.0a1-cp38-abi3-macosx_11_0_x86_64.whl
Algorithm Hash digest
SHA256 7230b57cdbfd225def785da9db35a44b93672838ece0172086d83e2004486cda
MD5 7208203c3495b3a267923b8a91ab406b
BLAKE2b-256 b258ff4c747a4e602f149381f8195bcf952958e0891edd939194032e052425fb

See more details on using hashes here.

File details

Details for the file bqskitrs-0.4.0a1-cp38-abi3-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for bqskitrs-0.4.0a1-cp38-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 08c33036a067209ad28a2aaab92932c84ea86e45fbb4bb47860cac0f2051def8
MD5 50bfb4e9cc8cf5f2ea2e789be6d78b38
BLAKE2b-256 3274d4f99679274470295bf1cd8372a07991f6a37c3d346e192d8b8ffb1b497d

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page