Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement multithreaded stochastic swap in rust #7658

Merged
merged 42 commits into from
Feb 28, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
9d9c2dc
Implement multithreaded stochastic swap in rust
mtreinish Feb 11, 2022
7af1c43
Sanitize packaging to support future modules
mtreinish Feb 16, 2022
2f8de01
Adjust random normal distribution to use correct mean
mtreinish Feb 16, 2022
6da1b7b
Remove unecessary extra scope from locked read
mtreinish Feb 16, 2022
3cf6e04
Remove unecessary explicit type from opt_edges variable
mtreinish Feb 16, 2022
f838ff6
Fix indices typo in NLayout constructor
mtreinish Feb 16, 2022
780f327
Remove explicit lifetime annotation from swap_trials
mtreinish Feb 16, 2022
35fba96
Use sum() instead of fold()
mtreinish Feb 16, 2022
d72d6c5
Fix lint and add rust style and lint checks to CI
mtreinish Feb 16, 2022
0b6e4d7
Fix returned layout mapping from NLayout
mtreinish Feb 17, 2022
a9a879d
Tweak tox configuration to try and reliably build rust extension
mtreinish Feb 17, 2022
57790c8
Make swap_trials parallelization configurable
mtreinish Feb 17, 2022
ea23eae
Merge remote-tracking branch 'origin/main' into parallel-stochastic-s…
mtreinish Feb 17, 2022
18a8b56
Revert "Make swap_trials parallelization configurable"
mtreinish Feb 17, 2022
6a63d11
Add docs to swap_trials() and remove unecessary num_gates arg
mtreinish Feb 17, 2022
873de02
Fix race condition leading to non-deterministic behavior
mtreinish Feb 18, 2022
2d9aae0
Merge branch 'main' into parallel-stochastic-swap-in-rust
mtreinish Feb 18, 2022
76167c7
Apply suggestions from code review
mtreinish Feb 18, 2022
2685c01
Fix compiler errors in previous commit
mtreinish Feb 18, 2022
610b306
Revert accidental commit of parallel reduction in compute_cost
mtreinish Feb 18, 2022
c510764
Eliminate short circuit for depth == 1 swap_trial() result
mtreinish Feb 18, 2022
b7607c1
Add missing docstrings
mtreinish Feb 18, 2022
5e31fb2
Add section to contributing on installing form source
mtreinish Feb 18, 2022
cfc8fcb
Make rust python classes pickleable
mtreinish Feb 18, 2022
d726101
Add rust compiler install to linux wheel jobs
mtreinish Feb 18, 2022
fb70158
Try more tox changes to fix docs builds
mtreinish Feb 18, 2022
25187b8
Revert "Eliminate short circuit for depth == 1 swap_trial() result"
mtreinish Feb 18, 2022
b2a0536
Fix submodule declaration and module attribute on rust classes
mtreinish Feb 18, 2022
f2737aa
Fix rust lint
mtreinish Feb 18, 2022
2588837
Fix docs job definition
mtreinish Feb 18, 2022
93ded7f
Disable multiprocessing parallelism in unit tests
mtreinish Feb 19, 2022
e7a6b93
Fix typo in azure pipelines config
mtreinish Feb 20, 2022
91f0da9
Remove unecessary extension compilation for image tests
mtreinish Feb 20, 2022
6da2a3a
Add test script to explicitly verify parallel dispatch
mtreinish Feb 20, 2022
3d1d561
Avoid multi-threading when run in a multiprocessing context
mtreinish Feb 22, 2022
25b2747
Merge branch 'main' into parallel-stochastic-swap-in-rust
mtreinish Feb 22, 2022
fc109d2
Apply suggestions from code review
mtreinish Feb 23, 2022
eaf92f2
Minor fixes from review comments
mtreinish Feb 23, 2022
b318a2a
Merge remote-tracking branch 'origin/main' into parallel-stochastic-s…
mtreinish Feb 23, 2022
4c4c9d4
Simplify tox configuration
mtreinish Feb 23, 2022
73296a4
Add missing pieces of cargo configuration
mtreinish Feb 23, 2022
eb69288
Merge branch 'main' into parallel-stochastic-swap-in-rust
mergify[bot] Feb 28, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 33 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
[package]
name = "qiskit-terra"
version = "0.20.0"
edition = "2018"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[lib]
name = "qiskit"
crate-type = ["cdylib"]

[dependencies]
rayon = "1.5"
numpy = "0.15.1"
rand = "0.8"
rand_pcg = "0.3"
rand_distr = "0.4.3"

[dependencies.pyo3]
version = "0.15.1"
features = ["extension-module", "hashbrown"]

[dependencies.ndarray]
version = "^0.15.0"
features = ["rayon"]

[dependencies.hashbrown]
version = "0.11.2"
features = ["rayon"]

[profile.release]
lto = 'fat'
codegen-units = 1
3 changes: 3 additions & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,6 @@ include test/python/pickles/*.pickle
include test/python/qasm/*.qasm
include test/python/visualization/references/*.png
include test/python/notebooks/*.ipynb

include Cargo.toml
recursive-include src *
jakelishman marked this conversation as resolved.
Show resolved Hide resolved
3 changes: 2 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
[build-system]
requires = ["Cython>=0.27.1", "setuptools", "wheel"]
requires = ["Cython>=0.27.1", "setuptools", "wheel", "setuptools-rust"]
build-backend = "setuptools.build_meta"

[tool.black]
line-length = 100
Expand Down
13 changes: 0 additions & 13 deletions qiskit/transpiler/passes/routing/cython/__init__.py

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Loading