Skip to content

Commit

Permalink
Merge branch 'main' into dag-deprecate-none-args
Browse files Browse the repository at this point in the history
  • Loading branch information
1ucian0 authored Oct 16, 2023
2 parents f14012e + fc74ab9 commit 9611b77
Show file tree
Hide file tree
Showing 508 changed files with 68,734 additions and 38,948 deletions.
2 changes: 1 addition & 1 deletion .azure/docs-linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:
verbose: true

- task: PublishBuildArtifacts@1
displayName: 'Publish docs'
displayName: 'Upload docs artifact'
inputs:
pathtoPublish: '$(Build.ArtifactStagingDirectory)'
artifactName: 'html_docs'
Expand Down
12 changes: 9 additions & 3 deletions .azure/test-linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ jobs:
- task: UsePythonVersion@0
inputs:
versionSpec: '${{ parameters.pythonVersion }}'
name: 'usePython'
displayName: 'Use Python ${{ parameters.pythonVersion }}'

- task: Cache@2
Expand All @@ -47,9 +48,14 @@ jobs:
displayName: "Cache stestr"

- ${{ if eq(parameters.testRust, true) }}:
- bash: |
set -e
cargo test
# We need to avoid linking our crates into full Python extension libraries during Rust-only
# testing because Rust/PyO3 can't handle finding a static CPython interpreter.
- bash: cargo test --no-default-features
env:
# On Linux we link against `libpython` dynamically, but it isn't written into the rpath
# of the test executable (I'm not 100% sure why ---Jake). It's easiest just to forcibly
# include the correct place in the `dlopen` search path.
LD_LIBRARY_PATH: '$(usePython.pythonLocation)/lib:$LD_LIBRARY_PATH'
displayName: "Run Rust tests"

- bash: |
Expand Down
4 changes: 0 additions & 4 deletions .azure/tutorials-linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,6 @@ jobs:
- bash: tools/install_ubuntu_docs_dependencies.sh
displayName: 'Install dependencies'

# Sync with '.github/workflows/docs_deploy.yml'
- bash: tools/prepare_tutorials.bash circuits circuits_advanced operators
displayName: 'Download current tutorials'

- bash: tox -e tutorials
displayName: "Execute tutorials"
env:
Expand Down
50 changes: 50 additions & 0 deletions .github/workflows/backport.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: Backport metadata

# Mergify manages the opening of the backport PR, this workflow is just to extend its behaviour to
# do useful things like copying across the tagged labels and milestone from the base PR.

on:
pull_request:
types:
- opened
branches:
- 'stable/*'

jobs:
copy_metadata:
name: Copy metadata from base PR
runs-on: ubuntu-latest
if: github.repository == 'Qiskit/qiskit' && github.actor == 'mergify[bot]'

permissions:
pull-requests: write

steps:
- name: Copy metadata
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
set -e
# Split Mergify's ref name (e.g. 'mergify/bp/stable/0.25/pr-10828') on the final '-' to
# get the number of the PR that triggered Mergify.
IFS='-' read -ra split <<< "${{ github.event.pull_request.head.ref }}"
base_pr=${split[-1]}
gh pr --repo "${{ github.repository }}" view "$base_pr" --json labels,milestone > base_pr.json
add_labels="$(jq --raw-output '[.labels[].name] - ["stable backport potential"] | join(",")' base_pr.json)"
echo "New labels: '$add_labels'"
milestone="$(jq --raw-output '.milestone.title // ""' base_pr.json )"
echo "Milestone: '$milestone'"
echo "Targetting current PR '${{ github.event.number }}'"
# The GitHub API is sometimes weird about empty values - the REST API certainly treats
# "add-label" with an empty input not as a no-op but as a clear of all labels.
if [[ -n "$add_labels" && -n "$milestone" ]]; then
gh pr --repo "${{ github.repository }}" edit "${{ github.event.number }}" --add-label "$add_labels" --milestone "$milestone"
elif [[ -n "$add_labels" ]]; then
gh pr --repo "${{ github.repository }}" edit "${{ github.event.number }}" --add-label "$add_labels"
elif [[ -n "$milestone" ]]; then
gh pr --repo "${{ github.repository }}" edit "${{ github.event.number }}" --milestone "$milestone"
fi
59 changes: 7 additions & 52 deletions .github/workflows/docs_deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
latest_tag: ${{ steps.latest_tag.outputs.latest_tag }}

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
# We need to fetch the whole history so 'reno' can do its job and we can inspect tags.
fetch-depth: 0
Expand All @@ -53,11 +53,6 @@ jobs:
- name: Install dependencies
run: tools/install_ubuntu_docs_dependencies.sh

# Sync with '.azure/tutorials-linux.yml'.
- name: Download current tutorials
run: tools/prepare_tutorials.bash circuits circuits_advanced operators
shell: bash

# This is just to have tox create the environment, so we can use it to execute the tutorials.
# We want to re-use it later for the build, hence 'tox run --notest' instead of 'tox devenv'.
- name: Prepare Python environment
Expand Down Expand Up @@ -110,7 +105,7 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
path: qiskit

Expand Down Expand Up @@ -211,7 +206,7 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
path: 'qiskit'

Expand All @@ -220,49 +215,9 @@ jobs:
name: qiskit-translatables
path: 'deploy'

- name: Decrypt SSH secret key
- name: Deploy translations
id: ssh_key
run: |
set -e
ssh_key=$(openssl enc -aes-256-cbc -d -in qiskit/tools/github_poBranch_update_key.enc -K $SSH_UPDATE_KEY -iv $SSH_UPDATE_IV)
echo "::add-mask::${ssh_key}"
echo "ssh_key=${ssh_key}" >> "$GITHUB_OUTPUT"
run: qiskit/tools/deploy_translatable_strings.sh
env:
SSH_UPDATE_KEY: ${{ secrets.ENCRYPTED_DEPLOY_PO_BRANCH_KEY }}
SSH_UPDATE_IV: ${{ secrets.ENCRYPTED_DEPLOY_PO_BRANCH_IV }}

- uses: actions/checkout@v3
with:
repository: 'qiskit-community/qiskit-translations'
path: 'qiskit-translations'
ssh-key: '${{ steps.ssh_key.outputs.ssh_key }}'

- name: Remove ignored documents
run: rm -r LC_MESSAGES/{apidocs,stubs}
working-directory: 'deploy'

- name: Push changes to translations repository
run: |
set -e
shopt -s failglob
# Bring the new `.po` target files into the repository.
git rm -r --ignore-unmatch docs/locale/en
mv "${{ github.workspace }}/deploy" docs/locale/en
# Update the ways to recreate the build.
cp "${{ github.workspace }}/qiskit/"{setup.py,requirements-*.txt,constraints.txt} .
git add .
cat > COMMIT_MSG << EOF
Automated documentation update to add .po files from ${{ github.repository }}
skip ci
Commit: ${{ github.sha }}
GitHub Actions run: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
EOF
git config user.name "Qiskit Autodeploy"
git config user.email "qiskit@qiskit.org"
git commit -F COMMIT_MSG
git push origin
working-directory: 'qiskit-translations'
encrypted_deploy_po_branch_key: ${{ secrets.ENCRYPTED_DEPLOY_PO_BRANCH_KEY }}
encrypted_deploy_po_branch_iv: ${{ secrets.ENCRYPTED_DEPLOY_PO_BRANCH_IV }}
55 changes: 14 additions & 41 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@ rust-version = "1.64" # Keep in sync with README.md and rust-toolchain.toml.
license = "Apache-2.0"

[workspace.dependencies]
pyo3 = { version = "0.19.2", features = ["extension-module", "abi3-py38"] }
# This doesn't set `extension-module` as a shared feature because we need to be able to disable it
# during Rust-only testing (see # https://github.com/PyO3/pyo3/issues/340).
pyo3 = { version = "0.19.2", features = ["abi3-py38"] }

[profile.release]
lto = 'fat'
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
[![Coverage Status](https://coveralls.io/repos/github/Qiskit/qiskit-terra/badge.svg?branch=main)](https://coveralls.io/github/Qiskit/qiskit-terra?branch=main)
![PyPI - Python Version](https://img.shields.io/pypi/pyversions/qiskit)
[![Minimum rustc 1.64.0](https://img.shields.io/badge/rustc-1.64.0+-blue.svg)](https://rust-lang.github.io/rfcs/2495-min-rust-version.html)
[![Downloads](https://pepy.tech/badge/qiskit-terra)](https://pypi.org/project/qiskit-terra/)<!--- long-description-skip-end -->
[![Downloads](https://static.pepy.tech/badge/qiskit-terra)](https://pepy.tech/project/qiskit-terra)<!--- long-description-skip-end -->
[![DOI](https://zenodo.org/badge/161550823.svg)](https://zenodo.org/badge/latestdoi/161550823)

**Qiskit** is an open-source SDK for working with quantum computers at the level of extended quantum circuits, operators, and primitives.
Expand Down Expand Up @@ -121,7 +121,7 @@ hardware or simulators to Qiskit. The backend class includes a common interface
* https://github.com/qiskit-community/qiskit-quantinuum-provider
* https://github.com/rigetti/qiskit-rigetti

<!-- This is not an exhasutive list, and if you maintain a provider package please feel free to open a PR to add new providers -->
<!-- This is not an exhaustive list, and if you maintain a provider package please feel free to open a PR to add new providers -->

You can refer to the documentation of these packages for further instructions
on how to get access and use these systems.
Expand Down
Binary file added circuit.qpy
Binary file not shown.
13 changes: 11 additions & 2 deletions crates/accelerate/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,13 @@ license.workspace = true
name = "qiskit_accelerate"
crate-type = ["cdylib"]

[features]
# This is a test-only shim removable feature. See the root `Cargo.toml`.
default = ["extension-module"]
extension-module = ["pyo3/extension-module"]

[dependencies]
rayon = "1.7"
rayon = "1.8"
numpy = "0.19.0"
rand = "0.8"
rand_pcg = "0.3"
Expand All @@ -20,6 +25,10 @@ num-complex = "0.4"
num-bigint = "0.4"
rustworkx-core = "0.13"

[dependencies.smallvec]
version = "1.11"
features = ["union"]

[dependencies.pyo3]
workspace = true
features = ["hashbrown", "indexmap", "num-complex", "num-bigint"]
Expand All @@ -33,5 +42,5 @@ version = "0.14.0"
features = ["rayon"]

[dependencies.indexmap]
version = "2.0.0"
version = "2.0.1"
features = ["rayon"]
Loading

0 comments on commit 9611b77

Please sign in to comment.