Skip to content

Commit 09afeca

Browse files
committed
Merge branch 'main' into kjf/unitary-synthesis
2 parents 963aae9 + 18b81a3 commit 09afeca

File tree

27,604 files changed

+573998
-422114
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

27,604 files changed

+573998
-422114
lines changed

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
blank_issues_enabled: true
22
contact_links:
3+
- name: Trouble with your code?
4+
url: https://ibm.co/joinqiskitslack
5+
about: Ask for debugging help on the Qiskit community Slack when you run into problems with your code.
6+
- name: Overall impressions and feedback
7+
url: https://ibmxm.iad1.qualtrics.com/jfe/form/SV_7Uq9FCMjZPyTsFM?Q_PopulateResponse={%22QID20%22:%223%22}
8+
about: Let us know what you think! Provide feedback to help us improve your documentation experience.
39
- name: Qiskit API feedback
410
url: https://github.com/Qiskit/qiskit/issues/new/choose
511
about: Open an issue in the Qiskit repository for the docs found at https://docs.quantum.ibm.com/api/qiskit.

.github/ISSUE_TEMPLATE/user-feedback.yml

Lines changed: 0 additions & 33 deletions
This file was deleted.

.github/actions/set-up-notebook-testing/action.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ inputs:
1717
description: Whether to install extra dependencies
1818
default: "false"
1919
ibm-quantum-token:
20-
required: true
20+
default: ""
2121
instance:
2222
# We usually only want the same access as an open user, but occasionally we
2323
# need higher priority to test notebooks that submit jobs in reasonable
@@ -28,7 +28,7 @@ runs:
2828
steps:
2929
- uses: actions/setup-python@v4
3030
with:
31-
python-version: "3.11"
31+
python-version: "3.9"
3232
cache: "pip"
3333

3434
- name: Install Python packages
@@ -42,6 +42,7 @@ runs:
4242
key: ${{ hashFiles('scripts/nb-tester/requirements.txt') }}
4343

4444
- name: Save IBM Quantum account
45+
if: ${{ inputs.ibm-quantum-token != '' }}
4546
shell: python
4647
run: |
4748
from qiskit_ibm_runtime import QiskitRuntimeService

.github/dependabot.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: "pip"
4+
directory: "scripts/nb-tester"
5+
schedule:
6+
interval: "daily"
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
# This code is a Qiskit project.
2+
#
3+
# (C) Copyright IBM 2024.
4+
#
5+
# This code is licensed under the Apache License, Version 2.0. You may
6+
# obtain a copy of this license in the LICENSE file in the root directory
7+
# of this source tree or at http://www.apache.org/licenses/LICENSE-2.0.
8+
#
9+
# Any modifications or derivative works of this code must retain this
10+
# copyright notice, and modified files need to carry a notice indicating
11+
# that they have been altered from the originals.
12+
13+
name: Deploy tutorials
14+
on:
15+
workflow_dispatch:
16+
inputs:
17+
environment:
18+
type: environment
19+
description: Where to upload the tutorials. Either "Learning platform (staging)" or "Learning platform (production)".
20+
required: true
21+
jobs:
22+
deploy:
23+
name: Deploy tutorials to learning platform
24+
runs-on: ubuntu-latest
25+
environment: ${{ inputs.environment }}
26+
steps:
27+
- uses: actions/checkout@v4
28+
- uses: actions/setup-python@v4
29+
with:
30+
python-version: "3.11"
31+
- name: Install tool
32+
run: pip install ./scripts/ibm-quantum-learning-uploader
33+
- name: Upload tutorials
34+
run: |
35+
cd tutorials
36+
sync-lessons
37+
env:
38+
LEARNING_API_TOKEN: ${{ secrets.LEARNING_API_TOKEN }}
39+
LEARNING_API_ENVIRONMENT: ${{ vars.LEARNING_API_ENVIRONMENT }}

.github/workflows/learning-uploader-test.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ on:
2222
jobs:
2323
e2e:
2424
name: End-to-end test
25+
environment: "Learning platform (staging)"
2526
if: ${{ github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' || github.event.pull_request.head.repo.full_name == github.repository }}
2627
runs-on: ubuntu-latest
2728
steps:
@@ -37,7 +38,7 @@ jobs:
3738
./e2e-test.sh
3839
env:
3940
LEARNING_API_TOKEN: ${{ secrets.LEARNING_API_TOKEN_STAGING }}
40-
LEARNING_API_ENVIRONMENT: staging
41+
LEARNING_API_ENVIRONMENT: ${{ vars.LEARNING_API_ENVIRONMENT }}
4142

4243
make_issue:
4344
name: Make issue on failure

.github/workflows/main.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,8 @@ jobs:
3030
run: npm run check:metadata
3131
- name: Spellcheck
3232
run: npm run check:spelling
33+
- name: Check Qiskit bot config
34+
run: npm run check:qiskit-bot
3335
- name: Internal link checker
3436
run: npm run check:internal-links
3537
- name: Check orphaned pages
@@ -57,3 +59,8 @@ jobs:
5759
run: |
5860
echo "${{ steps.changed-docs-files.outputs.all_changed_files }}" > changed.txt
5961
npm run check:pages-render -- --from-file changed.txt
62+
63+
- name: Setup Python environment
64+
uses: ./.github/actions/set-up-notebook-testing
65+
- name: nb-tester tests
66+
run: tox -e nb-tester

.github/workflows/notebook-test-cron.yml

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,26 @@ jobs:
2626
uses: ./.github/actions/set-up-notebook-testing
2727
with:
2828
ibm-quantum-token: ${{ secrets.IBM_QUANTUM_TEST_TOKEN }}
29-
instance: "ibm-q-internal/deployed/default"
29+
instance: "client-enablement/documentation/qiskit-documenta"
3030

3131
- name: Execute notebooks
32-
run: tox -- --only-submit-jobs
32+
timeout-minutes: 350
33+
run: tox -- --write --only-submit-jobs
34+
35+
- name: Detect changed notebooks
36+
id: changed-notebooks
37+
if: "!cancelled()"
38+
run: |
39+
echo "CHANGED_NOTEBOOKS<<EOF" >> $GITHUB_OUTPUT
40+
git diff --name-only >> $GITHUB_OUTPUT
41+
echo "EOF" >> $GITHUB_OUTPUT
42+
43+
- name: Upload executed notebooks
44+
if: "!cancelled()"
45+
uses: actions/upload-artifact@v4
46+
with:
47+
name: Executed notebooks
48+
path: ${{ steps.changed-notebooks.outputs.CHANGED_NOTEBOOKS }}
3349

3450
make_issue:
3551
name: Make issue on failure

.github/workflows/notebook-test.yml

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ name: Test notebooks
1414
on:
1515
pull_request:
1616
paths:
17+
- "tutorials/**/*.ipynb"
1718
- "docs/**/*.ipynb"
1819
- "!docs/api/**/*"
1920
workflow_dispatch:
@@ -24,11 +25,29 @@ jobs:
2425
steps:
2526
- uses: actions/checkout@v4
2627

28+
- name: Exit early on forks
29+
if: ${{ github.event.pull_request.head.repo.full_name != github.repository }}
30+
shell: python
31+
run: |
32+
raise SystemExit(
33+
"We can't run this test on pull requests from forks."
34+
"\n\n"
35+
"If you have write access to Qiskit/documentation, push to a new "
36+
"branch there and make your pull request from that branch instead."
37+
"\n\n"
38+
"If you don't have write access, you must test out the notebook "
39+
"locally using the instructions in "
40+
"https://github.com/Qiskit/documentation#execute-notebooks."
41+
"When this PR is approved, a maintainer will merge it to a new "
42+
"branch in Qiskit/documentation, then make a PR from that branch "
43+
"into main so it can pass CI."
44+
)
45+
2746
- name: Get all changed files
2847
id: all-changed-files
2948
uses: tj-actions/changed-files@af2816c65436325c50621100d67f6e853cd1b0f1
3049
with:
31-
files: docs/**/*.ipynb
50+
files: "{tutorials,docs}/**/*.ipynb"
3251
separator: "\n"
3352

3453
- name: Check for notebooks that require Linux

.github/workflows/weekly-checks.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,35 @@ jobs:
5353
- name: Install Node.js dependencies
5454
run: npm ci
5555
- name: Check external links
56+
env:
57+
GITHUB_TOKEN: ${{ github.token }}
5658
run: >
5759
npm run check:external-links --
5860
'docs/**/*.{md,mdx,ipynb}'
5961
'!docs/api/qiskit/[0-9]*/*'
62+
63+
make_issue:
64+
name: Make issue on failure
65+
needs: [external-link-checker, pages-render]
66+
if: ${{ failure() && github.event_name == 'schedule' }}
67+
runs-on: ubuntu-latest
68+
steps:
69+
- name: Post issue
70+
uses: actions/github-script@v7
71+
with:
72+
script: |
73+
const message = `Today's scheduled extended checks failed.
74+
75+
Please [check the logs](https://github.com/Qiskit/documentation/actions/runs/${{ github.run_id }}/).
76+
77+
> [!NOTE]
78+
> This issue was created by a GitHub action.
79+
`
80+
81+
github.rest.issues.create({
82+
owner: context.repo.owner,
83+
repo: context.repo.repo,
84+
title: "Extended checks failed",
85+
body: message,
86+
assignees: ["frankharkins", "Eric-Arellano", "arnaucasau"]
87+
})

.gitignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
.tox/
66
docs/.gitkeep
77
.envrc
8+
.python-version
89
latex_error.log
910

1011
.ipynb_checkpoints/
@@ -17,4 +18,5 @@ tsconfig.tsbuildinfo
1718
/.out/
1819
/.sphinx-artifacts/
1920
poetry.lock
20-
pyproject.toml
21+
22+
.mypy_cache/

.prettierignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
docs
22
translations
33
scripts/lib/api/testdata
4+
.mypy_cache

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
# 2. ❯ docker run --rm -p 3000:3000 -t qiskit-docs-preview
3232
# 3. Open up http://localhost:3000
3333

34-
FROM icr.io/quantum-computing/iqp-channel-docs-dev:next13.4
34+
FROM icr.io/quantum-computing/iqp-channel-docs-dev:open-source
3535

3636
COPY docs/ /home/node/app/docs
3737
COPY translations/ /home/node/app/docs

0 commit comments

Comments
 (0)