Skip to content

feat: build autoqasm program directly from main decorator #2776

feat: build autoqasm program directly from main decorator

feat: build autoqasm program directly from main decorator #2776

Workflow file for this run

# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
name: Python package
on:
push:
branches:
- main
pull_request:
branches:
- main
- feature/**
permissions:
contents: read
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
python-version: ["3.9", "3.10", "3.11"]
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@65d7f2d534ac1bc67fcd62888c5f4f3d2cb2b236 # v4.7.1
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
pip install --upgrade pip
pip install -e .[test]
- name: Run unit tests
run: |
tox -e unit-tests
- name: Run AutoQASM example notebooks
# NOTE: Do not merge this part to main. The AutoQASM example notebooks should be moved
# to the example notebooks repo rather than living in the Braket SDK repo.
run: |
pip install notebook matplotlib
jupyter nbconvert --to html --execute --ExecutePreprocessor.kernel_name=python3 ./examples/autoqasm/1_Getting_started_with_AutoQASM.ipynb
jupyter nbconvert --to html --execute --ExecutePreprocessor.kernel_name=python3 ./examples/autoqasm/2_Expressing_classical_control_flow.ipynb
jupyter nbconvert --to html --execute --ExecutePreprocessor.kernel_name=python3 ./examples/autoqasm/3_Iterative_phase_estimation.ipynb
- name: Upload coverage report to Codecov
uses: codecov/codecov-action@eaaf4bedf32dbdc6b720b63067d99c4d77d6047d # v3.1.4
if: ${{ strategy.job-index }} == 0