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

fix: onboard onto ruff #38

Open
wants to merge 8 commits into
base: main
Choose a base branch
from
Open

fix: onboard onto ruff #38

wants to merge 8 commits into from

Conversation

AbeCoull
Copy link
Contributor

Issue #, if available:

Description of changes:
Ruff is a good linter/formatter that Braket should be looking into. If has speed improvements, good support coverage, and is actively being adopted around the Python community. Additionally, this can drop the number of tools in our tool chain flake8, isort, black -> ruff.

In summary, some reasons:

  • It is fast - about 10x faster than flake8
  • Used by mane places, scipy, pypi, pandas, etc
  • has an autofix feature
  • Able to replace isort, black, and flake8 as one tool

Testing done:

Merge Checklist

Put an x in the boxes that apply. You can also fill these out after creating the PR. If you're unsure about any of them, don't hesitate to ask. We're here to help! This is simply a reminder of what we are going to look for before merging your pull request.

General

Tests

  • I have added tests that prove my fix is effective or that my feature works (if appropriate)
  • I have checked that my tests are not configured for a specific region or account (if appropriate)

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@AbeCoull AbeCoull requested a review from a team as a code owner September 12, 2024 20:39
Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Performance Alert ⚠️

Possible performance regression was detected for benchmark 'Python Benchmark with pytest-benchmark'.
Benchmark result of this commit is worse than the previous benchmark result exceeding threshold 2.

Benchmark suite Current: 3a1bbaf Previous: 7bb5014 Ratio
benchmark/benchmark.py::test_exact_shots[ghz-density_matrix q[0], q[1]-8-braket_dm_v2] 56.69482997465119 iter/sec (stddev: 0) 188.98067302228355 iter/sec (stddev: 0) 3.33
benchmark/benchmark.py::test_exact_shots[ghz-expectation z(q[0])-7-braket_dm_v2] 74.46280300036203 iter/sec (stddev: 0) 206.40790875857144 iter/sec (stddev: 0) 2.77
benchmark/benchmark.py::test_exact_shots[ghz-variance y(q[0])-6-braket_dm] 46.96039145507576 iter/sec (stddev: 0) 115.96715318524535 iter/sec (stddev: 0) 2.47
benchmark/benchmark.py::test_exact_shots[qft-state_vector-7-braket_sv_v2] 62.496668146413164 iter/sec (stddev: 0) 242.0432868274179 iter/sec (stddev: 0) 3.87
benchmark/benchmark.py::test_exact_shots[qft-density_matrix q[0], q[1]-5-braket_dm_v2] 73.95451865143785 iter/sec (stddev: 0) 355.98126484826656 iter/sec (stddev: 0) 4.81
benchmark/benchmark.py::test_nonzero_shots[ghz-probability-100-7-braket_dm_v2] 93.27729283328414 iter/sec (stddev: 0) 223.17397491543704 iter/sec (stddev: 0) 2.39
benchmark/benchmark.py::test_nonzero_shots[qft-variance y(q[0])-100-7-braket_dm_v2] 35.39342034192071 iter/sec (stddev: 0) 85.43125148997323 iter/sec (stddev: 0) 2.41
benchmark/benchmark.py::test_nonzero_shots[qft-sample z(q[0])-100-6-braket_dm] 29.9822690857063 iter/sec (stddev: 0) 61.50969695454911 iter/sec (stddev: 0) 2.05

This comment was automatically generated by workflow using github-action-benchmark.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant