-
Notifications
You must be signed in to change notification settings - Fork 848
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'Classiq:main' into trial_1
- Loading branch information
Showing
25 changed files
with
1,670 additions
and
40 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
### PR Description | ||
|
||
<!-- Describe the PR's general purpose --> | ||
|
||
### Some notes | ||
|
||
- [ ] Please make sure that you placed the files in an appropriate folder | ||
- [ ] And that the files have indicative names. | ||
|
||
- [ ] Please note that Classiq runs automatic code linting, which may minorly alter some files. | ||
- [ ] If you're familiar with `pre-commit`, you may run `pre-commit install`, and then at each commit, your files will be altered in a similar way |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
name: Lint | ||
|
||
on: [push, workflow_dispatch] | ||
|
||
permissions: | ||
contents: read | ||
|
||
env: | ||
FORCE_COLOR: 1 | ||
RUFF_OUTPUT_FORMAT: github | ||
|
||
jobs: | ||
lint: | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 5 | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-python@v5 | ||
with: | ||
python-version: "3.11" | ||
- uses: pre-commit/action@v3.0.1 | ||
if: false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
name: "Test notebooks" | ||
|
||
on: [pull_request, workflow_dispatch] | ||
|
||
jobs: | ||
tests: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Set up Python | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: "3.11" | ||
- name: "Install dependencies" | ||
run: | | ||
python -m pip install -U -r requirements.txt | ||
python -m pip install -U -r requirements_tests.txt | ||
- name: Get changed files - all | ||
id: changed-files-all | ||
uses: tj-actions/changed-files@v44 | ||
- name: Get changed files - ipynb | ||
id: changed-files-ipynb | ||
uses: tj-actions/changed-files@v44 | ||
with: | ||
files: | | ||
**.ipynb | ||
- name: Set environment variables | ||
run: | | ||
if [ "${{ github.event_name }}" == 'pull_request' ]; then | ||
echo "SHOULD_TEST_ALL_FILES=false" >> $GITHUB_ENV | ||
echo "HAS_ANY_FILE_CHANGED=${{ steps.changed-files-all.outputs.any_changed }}" >> $GITHUB_ENV | ||
echo "LIST_OF_FILE_CHANGED=${{ steps.changed-files-all.outputs.all_changed_files }}" >> $GITHUB_ENV | ||
echo "HAS_ANY_IPYNB_CHANGED=${{ steps.changed-files-ipynb.outputs.any_changed }}" >> $GITHUB_ENV | ||
echo "LIST_OF_IPYNB_CHANGED=${{ steps.changed-files-ipynb.outputs.all_changed_files }}" >> $GITHUB_ENV | ||
elif [ "${{ github.event_name }}" == 'workflow_dispatch' ]; then | ||
echo "SHOULD_TEST_ALL_FILES=true" >> $GITHUB_ENV | ||
echo "HAS_ANY_FILE_CHANGED=None" >> $GITHUB_ENV | ||
echo "LIST_OF_FILE_CHANGED=None" >> $GITHUB_ENV | ||
echo "HAS_ANY_IPYNB_CHANGED=None" >> $GITHUB_ENV | ||
echo "LIST_OF_IPYNB_CHANGED=None" >> $GITHUB_ENV | ||
fi | ||
- name: "Run tests" | ||
run: python -m pytest tests | ||
env: | ||
JUPYTER_PLATFORM_DIRS: "1" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12 changes: 12 additions & 0 deletions
12
community/basic_examples/hw_aware_synthesis/hardware_aware_mcx_grid.qmod
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
qfunc my_mcx(ctrl: qbit[], target: qbit) { | ||
control (ctrl) { | ||
X(target); | ||
} | ||
} | ||
|
||
qfunc main(output ctrl: qbit[], output target: qbit) { | ||
allocate<12>(ctrl); | ||
allocate<1>(target); | ||
my_mcx(ctrl, target); | ||
} | ||
|
Oops, something went wrong.