Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .envrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
export DIRENV_WARN_TIMEOUT=20s

eval "$(devenv direnvrc)"

# The use_devenv function supports passing flags to the devenv command
# For example: use devenv --impure --option services.postgres.enable:bool true
use devenv
5 changes: 3 additions & 2 deletions .github/workflows/ci-linting.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,14 @@ on:
release:
types:
- created

jobs:
build:
runs-on: ubuntu-22.04
name: "Linux Linting"
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: "Installing dependencies"
run: |
Expand All @@ -43,7 +44,7 @@ jobs:

- name: Trunk cache
id: cache-trunk
uses: actions/cache@v3.0.4
uses: actions/cache@v4
with:
path: ~/.cache/trunk/
key: ${{ runner.os }}-trunk
Expand Down
16 changes: 8 additions & 8 deletions .github/workflows/ci-linux-on-main-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
name: "Linux CI"
steps:
- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
ref: ${{github.event.pull_request.head.ref}}
repository: ${{github.event.pull_request.head.repo.full_name}}
Expand All @@ -30,12 +30,12 @@ jobs:
sudo apt-get remove -y clang-13 llvm-13 clang-format-13 clang-tidy-13 clang-12 llvm-12 clang-format-12 clang-tidy-12
sudo apt install -y --no-install-recommends clang-14 llvm-14 clang-format-14 clang-tidy-14
sudo apt-get install -y nodejs npm
sudo apt install -y python3 python3-pip
sudo apt install -y python3 python3-pip
sudo ln -s /usr/lib/llvm-14/bin/opt /usr/bin/opt
sudo update-alternatives --install /usr/bin/python python /usr/bin/python3 0
dotnet tool install --global Microsoft.Quantum.IQSharp --version 0.24.201332
sudo update-alternatives --install /usr/bin/python python /usr/bin/python3 0
dotnet tool install --global Microsoft.Quantum.IQSharp --version 0.24.201332
git submodule update --init --recursive
pip install -r requirements.txt
pip install -r requirements.txt
npm install -g prettier@2.2.1
env:
DEBIAN_FRONTEND: noninteractive
Expand All @@ -60,8 +60,8 @@ jobs:
- name: "Running Q# tests"
run: |
git clone https://github.com/microsoft/Quantum.git
export QAT_BINARY=${PWD}/Debug/qir/qat/Apps/qat
export QSHARP_SAMPLES=${PWD}/Quantum/samples
export QAT_BINARY=${PWD}/Debug/qir/qat/Apps/qat
export QSHARP_SAMPLES=${PWD}/Quantum/samples

pushd qir/qsharp-tests/
pip3 install --user pytest
Expand All @@ -75,7 +75,7 @@ jobs:
make -j qat
popd

export QAT_BINARY=${PWD}/Debug/qir/qat/Apps/qat
export QAT_BINARY=${PWD}/Debug/qir/qat/Apps/qat
pip install pytest
pip install -r requirements.txt
cd qir/qir-tests/
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/ci-mac-on-main-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
name: "Mac CI"
steps:
- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
ref: ${{github.event.pull_request.head.ref}}
repository: ${{github.event.pull_request.head.repo.full_name}}
Expand Down Expand Up @@ -64,8 +64,8 @@ jobs:
- name: "Running Q# tests"
run: |
git clone https://github.com/microsoft/Quantum.git
export QAT_BINARY=${PWD}/Debug/qir/qat/Apps/qat
export QSHARP_SAMPLES=${PWD}/Quantum/samples
export QAT_BINARY=${PWD}/Debug/qir/qat/Apps/qat
export QSHARP_SAMPLES=${PWD}/Quantum/samples

pushd qir/qsharp-tests/
pip3 install --user pytest
Expand All @@ -79,7 +79,7 @@ jobs:
make -j qat
popd

export QAT_BINARY=${PWD}/Debug/qir/qat/Apps/qat
export QAT_BINARY=${PWD}/Debug/qir/qat/Apps/qat
pip3 install pytest
pip3 install -r requirements.txt
cd qir/qir-tests/
Expand Down Expand Up @@ -122,7 +122,7 @@ jobs:
echo "Done"

export PYTHONPATH=$PWD/qiskit-qir/tests:$PYTHONPATH
export QAT_BINARY=${PWD}/Debug/qir/qat/Apps/qat
export QAT_BINARY=${PWD}/Debug/qir/qat/Apps/qat

pushd qir/qiskit-tests/
pip3 install pytest
Expand Down
16 changes: 8 additions & 8 deletions .github/workflows/ci-on-pr-bazel-test-mac.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,14 @@ jobs:
name: "Bazel Debug Build"
steps:
- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
ref: ${{github.event.pull_request.head.ref}}
repository: ${{github.event.pull_request.head.repo.full_name}}

- name: Bazel cache
id: cache-bazel-debug
uses: actions/cache@v3.0.4
uses: actions/cache@v4
with:
path: ~/.cache/bazel/
key: ${{ runner.os }}-bazel-debug
Expand All @@ -41,14 +41,14 @@ jobs:
name: "Bazel Release Build"
steps:
- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
ref: ${{github.event.pull_request.head.ref}}
repository: ${{github.event.pull_request.head.repo.full_name}}

- name: Bazel cache
id: cache-bazel-release
uses: actions/cache@v3.0.4
uses: actions/cache@v4
with:
path: ~/.cache/bazel/
key: ${{ runner.os }}-bazel-release
Expand All @@ -66,14 +66,14 @@ jobs:
needs: [build-debug]
steps:
- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
ref: ${{github.event.pull_request.head.ref}}
repository: ${{github.event.pull_request.head.repo.full_name}}

- name: Bazel cache
id: cache-bazel-debug
uses: actions/cache@v3.0.4
uses: actions/cache@v4
with:
path: ~/.cache/bazel/
key: ${{ runner.os }}-bazel-debug
Expand All @@ -91,14 +91,14 @@ jobs:
needs: [build-release]
steps:
- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
ref: ${{github.event.pull_request.head.ref}}
repository: ${{github.event.pull_request.head.repo.full_name}}

- name: Bazel cache
id: cache-bazel-release
uses: actions/cache@v3.0.4
uses: actions/cache@v4
with:
path: ~/.cache/bazel/
key: ${{ runner.os }}-bazel-release
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/ci-on-pr-bazel-test-win.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
shell: pwsh

- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
ref: ${{github.event.pull_request.head.ref}}
repository: ${{github.event.pull_request.head.repo.full_name}}
Expand All @@ -39,7 +39,7 @@ jobs:

- name: Bazel cache
id: cache-bazel
uses: actions/cache@v3.0.4
uses: actions/cache@v4
with:
path: ~/.cache/bazel/
key: ${{ matrix.config.os }}-${{ matrix.config.arch }}-bazel-${{ steps.timestamp.outputs.timestamp }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/link_and_spell_check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
runs-on: ubuntu-latest
name: "Check spelling, linting and links"
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- run: |
# we download the config files from the org repo and pick up the rules from the latest main
wget https://github.com/qir-alliance/.github/archive/refs/heads/main.zip -O clone.zip &&
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/target-testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
name: "Target testing"
steps:
- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
ref: ${{github.event.pull_request.head.ref}}
repository: ${{github.event.pull_request.head.repo.full_name}}
Expand All @@ -30,12 +30,12 @@ jobs:
sudo apt-get remove -y clang-13 llvm-13 clang-format-13 clang-tidy-13 clang-12 llvm-12 clang-format-12 clang-tidy-12
sudo apt install -y --no-install-recommends clang-14 llvm-14 clang-format-14 clang-tidy-14
sudo apt-get install -y nodejs npm
sudo apt install -y python3 python3-pip
sudo apt install -y python3 python3-pip
sudo ln -s /usr/lib/llvm-14/bin/opt /usr/bin/opt
sudo update-alternatives --install /usr/bin/python python /usr/bin/python3 0
dotnet tool install --global Microsoft.Quantum.IQSharp --version 0.25.218240
sudo update-alternatives --install /usr/bin/python python /usr/bin/python3 0
dotnet tool install --global Microsoft.Quantum.IQSharp --version 0.25.218240
git submodule update --init --recursive
pip install -r requirements.txt
pip install -r requirements.txt
npm install -g prettier@2.2.1
env:
DEBIAN_FRONTEND: noninteractive
Expand All @@ -52,7 +52,7 @@ jobs:
make qat
popd

export QAT_BINARY=${PWD}/Debug/qir/qat/Apps/qat
export QAT_BINARY=${PWD}/Debug/qir/qat/Apps/qat
pip install pytest
pip install -r requirements.txt
cd qir/qsharp-target-tests/
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/trusted-cd-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
name: "Push documentation"
steps:
- name: Checkout
uses: actions/checkout@v2.3.1
uses: actions/checkout@v4

- name: "Installing dependencies"
run: |
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/trusted-cd-linux-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
runs-on: ubuntu-22.04
steps:
- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: "Installing dependencies"
run: |
Expand All @@ -22,12 +22,12 @@ jobs:
sudo apt-get remove -y clang-13 llvm-13 clang-format-13 clang-tidy-13 clang-12 llvm-12 clang-format-12 clang-tidy-12
sudo apt install -y --no-install-recommends clang-14 llvm-14 clang-format-14 clang-tidy-14
sudo apt-get install -y nodejs npm
sudo apt install -y python3 python3-pip
sudo apt install -y python3 python3-pip
sudo ln -s /usr/lib/llvm-14/bin/opt /usr/bin/opt
sudo update-alternatives --install /usr/bin/python python /usr/bin/python3 0
dotnet tool install --global Microsoft.Quantum.IQSharp --version 0.20.2110171573
sudo update-alternatives --install /usr/bin/python python /usr/bin/python3 0
dotnet tool install --global Microsoft.Quantum.IQSharp --version 0.20.2110171573
git submodule update --init --recursive
pip install -r requirements.txt
pip install -r requirements.txt
npm install -g prettier@2.2.1
env:
DEBIAN_FRONTEND: noninteractive
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/trusted-cd-mac-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
runs-on: macos-11
steps:
- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: "Installing dependencies"
run: |
Expand Down
20 changes: 10 additions & 10 deletions .github/workflows/trusted-ci-linux-on-main-pr.disabled
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
name: "Trusted Linux CI"
steps:
- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
ref: ${{github.event.pull_request.head.ref}}
repository: ${{github.event.pull_request.head.repo.full_name}}
Expand All @@ -40,23 +40,23 @@ jobs:
- name: "Building QAT"
run: |
sudo apt-get update -y
sudo apt-get install -y
sudo apt-get install -y
sudo apt-get remove -y llvm-12
sudo apt-get install -y curl pkg-config findutils wget
sudo apt install -y clang-13 cmake clang-format-13 clang-tidy-13
sudo apt-get install -y llvm-13 lldb-13 llvm-13-dev libllvm11 llvm-13-runtime opt
sudo apt install -y clang-13 cmake clang-format-13 clang-tidy-13
sudo apt-get install -y llvm-13 lldb-13 llvm-13-dev libllvm11 llvm-13-runtime opt
sudo apt-get install -y nodejs npm
sudo apt install -y python3 python3-pip
sudo apt install -y python3 python3-pip
sudo apt-get remove -y llvm-10
sudo ln -s /usr/lib/llvm-13/bin/opt /usr/bin/opt
sudo update-alternatives --install /usr/bin/python python /usr/bin/python3 0
dotnet tool install --global Microsoft.Quantum.IQSharp --version 0.20.2110171573
sudo update-alternatives --install /usr/bin/python python /usr/bin/python3 0
dotnet tool install --global Microsoft.Quantum.IQSharp --version 0.20.2110171573
git submodule update --init --recursive
pip install -r requirements.txt
npm install -g prettier@2.2.1
pip install -r requirements.txt
npm install -g prettier@2.2.1
mkdir Debug
cd Debug
cmake ..
cmake ..
make qat
env:
DEBIAN_FRONTEND: noninteractive
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/trusted-ci-mac-on-main-pr.disabled
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
name: "Trusted Mac CI"
steps:
- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
ref: ${{github.event.pull_request.head.ref}}
repository: ${{github.event.pull_request.head.repo.full_name}}
Expand All @@ -27,7 +27,7 @@ jobs:
cp -R qir/qat /tmp/

- name: Checkout code main
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
ref: "main"
repository: ${{github.event.pull_request.head.repo.full_name}}
Expand Down Expand Up @@ -88,7 +88,7 @@ jobs:
popd

export PYTHONPATH=$PWD/qiskit-qir/tests:$PYTHONPATH
export QAT_BINARY=${PWD}/Debug/qir/qat/Apps/qat
export QAT_BINARY=${PWD}/Debug/qir/qat/Apps/qat

pushd qir/qiskit-tests/
pip3 install --user pytest
Expand Down
10 changes: 10 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -368,3 +368,13 @@ bazel-*/
.bazelrc.configure.orig
qat.sublime-project
qat.sublime-workspace

# Devenv
.devenv*
devenv.local.nix

# direnv
.direnv

# pre-commit
.pre-commit-config.yaml
Loading
Loading