diff --git a/.github/workflows/build-with-nix.yml b/.github/workflows/build-with-nix.yml index 08ac988e19..7a83d0b784 100644 --- a/.github/workflows/build-with-nix.yml +++ b/.github/workflows/build-with-nix.yml @@ -1,9 +1,14 @@ name: build with nix + on: + pull_request: + branches: + - main schedule: # 01:00 every Sunday morning - cron: '0 1 * * 0' workflow_dispatch: {} + concurrency: group: ${{ github.workflow }}-${{ github.ref }} cancel-in-progress: true diff --git a/.github/workflows/build_and_test.yml b/.github/workflows/build_and_test.yml index 9df57f11f7..a8a738ef5b 100644 --- a/.github/workflows/build_and_test.yml +++ b/.github/workflows/build_and_test.yml @@ -4,10 +4,9 @@ on: pull_request: branches: - main - - develop push: branches: - - develop + - main schedule: # 03:00 every Saturday morning - cron: '0 3 * * 6' @@ -63,7 +62,7 @@ jobs: tket_package_exists=`conan search -r tket-libs "tket/${{ steps.tket_ver.outputs.tket_ver }}@tket/stable" | grep "not found" > /dev/null 2>&1 && echo false || echo true` echo "tket_package_exists=${tket_package_exists}" >> $GITHUB_OUTPUT - name: Check tket version bump - if: github.event_name == 'pull_request' && github.event.pull_request.base.ref == 'develop' && steps.filter.outputs.tket == 'true' && steps.test_package_exists.outputs.tket_package_exists == 'true' + if: github.event_name == 'pull_request' && steps.filter.outputs.tket == 'true' && steps.test_package_exists.outputs.tket_package_exists == 'true' run: exit 1 check_docs_tket: @@ -138,7 +137,7 @@ jobs: - name: Build tket run: conan create tket -s build_type=Release --user=tket --channel=stable -o boost/*:header_only=True -o with_all_tests=True - name: Upload package - if: github.event_name == 'push' && github.ref == 'refs/heads/develop' + if: github.event_name == 'push' run: | ccache --set-config namespace=WITHOUT_TESTS conan create tket --user=tket --channel=stable -o boost/*:header_only=True @@ -207,7 +206,7 @@ jobs: conan build tket --user=tket --channel=stable -o boost/*:header_only=True -o with_all_tests=True -c tools.cmake.cmaketoolchain:generator=Ninja conan export-pkg tket --user=tket --channel=stable -o boost/*:header_only=True -o with_all_tests=True -c tools.cmake.cmaketoolchain:generator=Ninja - name: Upload package - if: github.event_name == 'push' && github.ref == 'refs/heads/develop' + if: github.event_name == 'push' run: | ccache --set-config namespace=WITHOUT_TESTS conan build tket --user=tket --channel=stable -o boost/*:header_only=True @@ -319,7 +318,7 @@ jobs: name: pytket_test_coverage path: pytket/tests/htmlcov - name: Upload package - if: github.event_name == 'push' && github.ref == 'refs/heads/develop' && needs.check_changes.outputs.tket_changed == 'true' + if: github.event_name == 'push' && needs.check_changes.outputs.tket_changed == 'true' run: | conan remote login -p ${{ secrets.JFROG_ARTIFACTORY_TOKEN_3 }} tket-libs ${{ secrets.JFROG_ARTIFACTORY_USER_3 }} conan upload tket/${{ needs.check_changes.outputs.tket_ver }}@tket/stable -r=tket-libs @@ -409,7 +408,7 @@ jobs: git diff --quiet pytket/_tket && echo "Stubs are up-to-date" || exit 1 # fail if stubs change after regeneration python -m mypy --config-file=mypy.ini --no-incremental -p pytket -p tests - name: Upload package - if: github.event_name == 'push' && github.ref == 'refs/heads/develop' && needs.check_changes.outputs.tket_changed == 'true' + if: github.event_name == 'push' && needs.check_changes.outputs.tket_changed == 'true' run: | conan remote login -p ${{ secrets.JFROG_ARTIFACTORY_TOKEN_3 }} tket-libs ${{ secrets.JFROG_ARTIFACTORY_USER_3 }} conan upload tket/${{ needs.check_changes.outputs.tket_ver }}@tket/stable -r=tket-libs @@ -521,7 +520,7 @@ jobs: pip install -r requirements.txt pytest --ignore=simulator/ - name: Upload package - if: github.event_name == 'push' && github.ref == 'refs/heads/develop' && needs.check_changes.outputs.tket_changed == 'true' + if: github.event_name == 'push' && needs.check_changes.outputs.tket_changed == 'true' run: | conan remote login -p ${{ secrets.JFROG_ARTIFACTORY_TOKEN_3 }} tket-libs ${{ secrets.JFROG_ARTIFACTORY_USER_3 }} conan upload tket/${{ needs.check_changes.outputs.tket_ver }}@tket/stable -r=tket-libs @@ -534,7 +533,7 @@ jobs: name: Publish pytket coverage needs: build_test_pytket_ubuntu concurrency: gh_pages - if: github.event_name == 'push' && github.ref == 'refs/heads/develop' + if: github.event_name == 'push' runs-on: ubuntu-22.04 steps: - uses: actions/checkout@v4 @@ -562,7 +561,7 @@ jobs: check_pytket_coverage: name: Check pytket line and branch coverage needs: build_test_pytket_ubuntu - if: (github.event_name == 'pull_request' && github.event.pull_request.base.ref == 'develop') || github.event_name == 'workflow_dispatch' + if: github.event_name == 'pull_request' || github.event_name == 'workflow_dispatch' runs-on: ubuntu-22.04 steps: - uses: actions/checkout@v4 @@ -571,7 +570,7 @@ jobs: with: name: pytket_test_coverage path: pytket-test-coverage/ - - name: Compare with latest report from develop + - name: Compare with latest report from main run: | wget https://cqcl.github.io/tket/pytket/test-coverage/cov.xml -O oldcov.xml ./.github/workflows/compare-pytket-coverage oldcov.xml pytket-test-coverage/cov.xml diff --git a/.github/workflows/build_libs.yml b/.github/workflows/build_libs.yml index 735058d515..eb0ac8cb91 100644 --- a/.github/workflows/build_libs.yml +++ b/.github/workflows/build_libs.yml @@ -2,10 +2,10 @@ name: build libraries on: push: branches: - - develop + - main pull_request: branches: - - develop + - main workflow_dispatch: {} jobs: diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml index 59dea72bb4..be2ebec17a 100644 --- a/.github/workflows/coverage.yml +++ b/.github/workflows/coverage.yml @@ -3,10 +3,10 @@ name: Analyse tket C++ test coverage on: pull_request: branches: - - develop + - main push: branches: - - develop + - main schedule: # 03:00 every Saturday morning - cron: '0 3 * * 6' @@ -99,12 +99,12 @@ jobs: with: name: test_coverage path: test-coverage/ - - name: Compare with latest report from develop (short tests) + - name: Compare with latest report from main (short tests) if: github.event_name == 'pull_request' || github.event_name == 'workflow_dispatch' run: | wget https://cqcl.github.io/tket/tket/test-coverage-short/summary.txt ./.github/workflows/compare-coverage summary.txt test-coverage/summary.txt - - name: Compare with latest report from develop (full suite) + - name: Compare with latest report from main (full suite) if: github.event_name == 'schedule' run: | wget https://cqcl.github.io/tket/tket/test-coverage/summary.txt diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index d661c5743d..6edc995828 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -3,7 +3,7 @@ name: Deploy tket C++ documentation on: push: branches: - - develop + - main paths: - 'tket/src/**' diff --git a/.github/workflows/pytket_benchmarking.yml b/.github/workflows/pytket_benchmarking.yml new file mode 100644 index 0000000000..171e4188d4 --- /dev/null +++ b/.github/workflows/pytket_benchmarking.yml @@ -0,0 +1,107 @@ +name: Automated Benchmarks + +on: + pull_request: + branches: + - main + workflow_dispatch: + +jobs: + + build_wheels: + name: Build macos wheels + runs-on: macos-14 + + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: '0' + + - run: git fetch --depth=1 origin +refs/tags/*:refs/tags/* + + - name: Set up Python 3.11 + uses: actions/setup-python@v5 + with: + python-version: 3.11 + + - name: Install conan + uses: turtlebrowser/get-conan@v1.2 + + - name: Set up conan + run: | + conan profile detect + DEFAULT_PROFILE_PATH=`conan profile path default` + PROFILE_PATH=./conan-profiles/macos-14 + diff ${DEFAULT_PROFILE_PATH} ${PROFILE_PATH} || true + cp ${PROFILE_PATH} ${DEFAULT_PROFILE_PATH} + conan remote add tket-libs https://quantinuumsw.jfrog.io/artifactory/api/conan/tket1-libs --index 0 + + - name: Build tket C++ + run: conan create tket --user tket --channel stable --build=missing -o boost/*:header_only=True -o tklog/*:shared=True -o tket/*:shared=True -tf "" + + - name: Build wheel + run: | + conan create recipes/pybind11 + conan create recipes/pybind11_json/all --version 0.2.13 + cd pytket + # Ensure wheels are compatible with MacOS 12.0 and later: + export WHEEL_PLAT_NAME=macosx_12_0_arm64 + python3.11 -m pip install -U pip build delocate + python3.11 -m build + delocate-wheel -v -w "$GITHUB_WORKSPACE/wheelhouse/" "dist/pytket-"*".whl" + + - name: Save Wheel + uses: actions/upload-artifact@v4 + with: + name: pytket_wheel + path: wheelhouse/ + + compile-and-compare: + name: Compile and compare + runs-on: macos-14 + needs: build_wheels + + steps: + + - name: Setup Python + uses: actions/setup-python@v5 + with: + python-version: '3.11' + + - name: Download wheel + uses: actions/download-artifact@v4 + with: + name: pytket_wheel + + - name: Install dependencies + run: | + pip install pytket-*.whl + pip install --pre --index-url https://github_actions:${{ secrets.PRIVATE_PYPI_PASS }}@cqcpythonrepository.azurewebsites.net/simple/ pytket_benchmarking + + - name: Checkout pytket-benchmarking-store + uses: actions/checkout@v4 + with: + repository: CQCL/pytket-benchmarking-store + path: pytket-benchmarking-store + + - name: Perform Compilation + run: | + pytket_benchmarking compile QiskitIBMQ pytket-benchmarking-store/benchmarking_circuits/quantum_volume automated_benchmarks_compiled + pytket_benchmarking compile PytketIBMQ pytket-benchmarking-store/benchmarking_circuits/quantum_volume automated_benchmarks_compiled + + - name: Save compiled circuits + uses: actions/upload-artifact@v4 + with: + name: automated_benchmarks_compiled + path: automated_benchmarks_compiled/ + + - name: Calculate percentage better + run: echo "RETURN_TEST=$(pytket_benchmarking percentage-better pytket-benchmarking-store/benchmarking_circuits/quantum_volume automated_benchmarks_compiled PytketIBMQ)" >> $GITHUB_ENV + + - name: Create comment + uses: peter-evans/create-or-update-comment@v4 + with: + issue-number: ${{ github.event.pull_request.number }} + body: '${{ env.RETURN_TEST }}' + env: + RETURN_TEST: ${{ env.RETURN_TEST }} diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 269c9b0d28..6cca5016ab 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -107,6 +107,8 @@ jobs: build_macos_arm64_wheels: name: Build macos arm64 wheels runs-on: macos-14 + env: + MACOSX_DEPLOYMENT_TARGET: '12.0' strategy: matrix: python-version: ['3.10', '3.11', '3.12'] @@ -130,7 +132,7 @@ jobs: cp ${PROFILE_PATH} ${DEFAULT_PROFILE_PATH} conan remote add tket-libs https://quantinuumsw.jfrog.io/artifactory/api/conan/tket1-libs --index 0 - name: Build tket C++ - run: conan create tket --user tket --channel stable --build=missing -o boost/*:header_only=True -o tklog/*:shared=True -o tket/*:shared=True -tf "" + run: conan create tket --user tket --channel stable --build="*" -o boost/*:header_only=True -o tklog/*:shared=True -o tket/*:shared=True -tf "" - name: Build wheel run: | conan create recipes/pybind11 @@ -138,8 +140,7 @@ jobs: cd pytket # Ensure wheels are compatible with MacOS 12.0 and later: export WHEEL_PLAT_NAME=macosx_12_0_arm64 - python${{ matrix.python-version }} -m pip install -U pip build - python${{ matrix.python-version }} -m pip install delocate~=0.10.7 + python${{ matrix.python-version }} -m pip install -U pip build delocate python${{ matrix.python-version }} -m build delocate-wheel -v -w "$GITHUB_WORKSPACE/wheelhouse/" "dist/pytket-"*".whl" - uses: actions/upload-artifact@v4 diff --git a/.github/workflows/test_libs.yml b/.github/workflows/test_libs.yml index abe72ad419..2091bafaf8 100644 --- a/.github/workflows/test_libs.yml +++ b/.github/workflows/test_libs.yml @@ -2,10 +2,10 @@ name: test libraries on: push: branches: - - develop + - main pull_request: branches: - - develop + - main workflow_dispatch: {} env: @@ -135,7 +135,7 @@ jobs: with: name: ${{ matrix.lib }}_coverage path: ${{ matrix.lib }}-coverage/ - - name: check coverage against latest published data from develop + - name: check coverage against latest published data from main if: github.event_name == 'pull_request' || github.event_name == 'workflow_dispatch' run: | # File may not exist if this is the very first time, so don't error. @@ -146,7 +146,7 @@ jobs: publish_coverage: name: Publish coverage needs: [set_libs_matrix, generate_coverage] - if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/develop' && needs.set_libs_matrix.outputs.libs != '[]' && needs.set_libs_matrix.outputs.libs != '' }} + if: ${{ github.event_name == 'push' && needs.set_libs_matrix.outputs.libs != '[]' && needs.set_libs_matrix.outputs.libs != '' }} strategy: matrix: lib: ${{ fromJson(needs.set_libs_matrix.outputs.libs) }} diff --git a/.github/workflows/valgrind.yml b/.github/workflows/valgrind.yml index 8b2159e081..eaa78cca44 100644 --- a/.github/workflows/valgrind.yml +++ b/.github/workflows/valgrind.yml @@ -2,7 +2,7 @@ name: valgrind check on: pull_request: branches: - - develop + - main workflow_dispatch: {} schedule: diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index b6bb21e212..c420c90c0f 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,7 +1,7 @@ # Contributing to TKET Pull requests are welcome. To make a PR, first fork the repo, make your proposed -changes on the `develop` branch, and open a PR from your fork. If it passes +changes on the `main` branch, and open a PR from your fork. If it passes tests and is accepted after review, it will be merged in. When adding a new feature, please add tests for it. When fixing a bug, please @@ -9,11 +9,11 @@ add a test that demonstrates the fix. If you make a change to one of the libraries in the `libs` directory, please increase the version number and make a PR with that change only: the component -will then be tested on the CI, and on merge to `develop` the new version will be +will then be tested on the CI, and on merge to `main` the new version will be uploaded. Then it will be possible to update conan requirements to use the new version. -A new version of TKET is uploaded to our conan repo with each push to `develop` +A new version of TKET is uploaded to our conan repo with each push to `main` that changes the core library. This process is managed by CI workflows. If you are making changes only to TKET tests or pytket, you do not need to build TKET locally: the right version should be downloaded automatically from the conan @@ -80,7 +80,7 @@ If you make any changes in `tket/src`, you should bump the version number of `tket` in `recipes/tket/conanfile.py`, and also the `tket` versions in the `requires` field in `recipes/tket-test/conanfile.py`, `recipes/tket-proptests/conanfile.py` and `pytket/conanfile.txt` so that they -match the new version. (This is checked on the CI for all PRs to `develop`.) +match the new version. (This is checked on the CI for all PRs to `main`.) Follow the "semantic versioning" convention: any backwards-incompatible changes to the C++ API require a major version bump; new API features that maintain backwards compatibility require a minor version bump; internal improvements and @@ -92,21 +92,21 @@ bugfixes require a patch version bump. The code coverage of the `tket` tests is reported [here](https://cqcl.github.io/tket/tket/test-coverage/index.html). This report -is generated weekly from the `develop` branch. +is generated weekly from the `main` branch. The libraries' coverage (from their own unit tests) is also reported: for example [tklog](https://cqcl.github.io/tket/tket/tklog-coverage/index.html). (For other libraries, just replace "tklog" with the library name in the URL.) -In both cases, PRs to `develop` check that the coverage has not decreased, and +In both cases, PRs to `main` check that the coverage has not decreased, and merging is blocked until the coverage is at least as good as before. ### pytket The code coverage of the `pytket` tests is reported [here](https://cqcl.github.io/tket/pytket/test-coverage/index.html). This report -reflects the coverage of the `develop` branch, and is updated with every push. +reflects the coverage of the `main` branch, and is updated with every push. The same report can be found in XML format [here](https://cqcl.github.io/tket/pytket/test-coverage/cov.xml). -Lines and branch coverage results are also checked with every PR to `develop`. +Lines and branch coverage results are also checked with every PR to `main`. diff --git a/pytket/binders/include/UnitRegister.hpp b/pytket/binders/include/UnitRegister.hpp index 32c7fed8b5..0db7009179 100644 --- a/pytket/binders/include/UnitRegister.hpp +++ b/pytket/binders/include/UnitRegister.hpp @@ -30,7 +30,7 @@ template class UnitRegister { public: UnitRegister(const std::string &name, const std::size_t size) - : name_(name), size_(size){}; + : name_(name), size_(size) {}; std::string name() const { return name_; } std::size_t size() const { return size_; } diff --git a/pytket/conanfile.py b/pytket/conanfile.py index 0f2b30f322..53331101db 100644 --- a/pytket/conanfile.py +++ b/pytket/conanfile.py @@ -32,7 +32,7 @@ def package(self): cmake.install() def requirements(self): - self.requires("tket/1.2.117@tket/stable") + self.requires("tket/1.2.119@tket/stable") self.requires("tklog/0.3.3@tket/stable") self.requires("tkrng/0.3.3@tket/stable") self.requires("tkassert/0.3.4@tket/stable") diff --git a/pytket/docs/changelog.rst b/pytket/docs/changelog.rst index 29ea0efdf9..a771bc3d77 100644 --- a/pytket/docs/changelog.rst +++ b/pytket/docs/changelog.rst @@ -1,6 +1,14 @@ Changelog ========= +Unreleased +---------- + +Features: + +* Update to pytket-circuit-renderer 0.8. +* Add two new status values for circuits on backends: "CANCELLING" and "RETRYING". + 1.27.0 (April 2024) ------------------- diff --git a/pytket/docs/circuit_class.rst b/pytket/docs/circuit_class.rst index 30f2ddc84d..1340b34c16 100644 --- a/pytket/docs/circuit_class.rst +++ b/pytket/docs/circuit_class.rst @@ -327,6 +327,12 @@ condition on a specified set of bit values.) .. automethod:: ZZMax + .. automethod:: AAMS + + .. automethod:: GPI + + .. automethod:: GPI2 + Methods for appending circuit boxes ----------------------------------- @@ -347,6 +353,10 @@ condition on a specified set of bit values.) .. automethod:: add_circbox + .. automethod:: add_circbox_regwise + + .. automethod:: add_circbox_with_regmap + .. automethod:: add_unitary1qbox .. automethod:: add_unitary2qbox @@ -361,6 +371,8 @@ condition on a specified set of bit values.) .. automethod:: add_pauliexpcommutingsetbox + .. automethod:: add_termsequencebox + .. automethod:: add_phasepolybox .. automethod:: add_toffolibox diff --git a/pytket/pytket/backends/status.py b/pytket/pytket/backends/status.py index 880bb95145..022f6387d6 100644 --- a/pytket/pytket/backends/status.py +++ b/pytket/pytket/backends/status.py @@ -26,6 +26,8 @@ class StatusEnum(Enum): QUEUED = "Circuit is queued." SUBMITTED = "Circuit has been submitted." RUNNING = "Circuit is running." + RETRYING = "Circuit is being retried." + CANCELLING = "Cancellation has been requested." CANCELLED = "Circuit has been cancelled." ERROR = "Circuit has errored. Check CircuitStatus.message for error message." diff --git a/pytket/pytket/circuit/display/static/head_imports.html b/pytket/pytket/circuit/display/static/head_imports.html index d560b50085..b72cacdb86 100644 --- a/pytket/pytket/circuit/display/static/head_imports.html +++ b/pytket/pytket/circuit/display/static/head_imports.html @@ -1,5 +1,5 @@ - - + + diff --git a/tket/conanfile.py b/tket/conanfile.py index cb0f27dcba..aa82ae4190 100644 --- a/tket/conanfile.py +++ b/tket/conanfile.py @@ -23,7 +23,7 @@ class TketConan(ConanFile): name = "tket" - version = "1.2.117" + version = "1.2.119" package_type = "library" license = "Apache 2" homepage = "https://github.com/CQCL/tket" diff --git a/tket/include/tket/Characterisation/Cycles.hpp b/tket/include/tket/Characterisation/Cycles.hpp index e62533baec..4ceb70d544 100644 --- a/tket/include/tket/Characterisation/Cycles.hpp +++ b/tket/include/tket/Characterisation/Cycles.hpp @@ -90,7 +90,7 @@ struct CycleHistory { class CycleFinder { public: CycleFinder(const Circuit& _circ, const OpTypeSet& _cycle_types) - : circ(_circ), cycle_types_(_cycle_types){}; + : circ(_circ), cycle_types_(_cycle_types) {}; // Cycles are sub-circuits of circ where every gate has OpType in cycle_types_ // get_cycles() returns the minimum number of cycles such that every diff --git a/tket/include/tket/Circuit/ClassicalExpBox.hpp b/tket/include/tket/Circuit/ClassicalExpBox.hpp index f4dcc7c839..d3cbc96309 100644 --- a/tket/include/tket/Circuit/ClassicalExpBox.hpp +++ b/tket/include/tket/Circuit/ClassicalExpBox.hpp @@ -81,7 +81,7 @@ class ClassicalExpBox : public ClassicalExpBoxBase { n_io_(other.n_io_), n_o_(other.n_o_), exp_(other.exp_), - sig_(other.sig_){}; + sig_(other.sig_) {}; ~ClassicalExpBox() override {} Op_ptr symbol_substitution( diff --git a/tket/include/tket/Mapping/AASLabelling.hpp b/tket/include/tket/Mapping/AASLabelling.hpp index 23179ae9e4..27b88d6f65 100644 --- a/tket/include/tket/Mapping/AASLabelling.hpp +++ b/tket/include/tket/Mapping/AASLabelling.hpp @@ -25,7 +25,7 @@ class AASLabellingMethod : public RoutingMethod { * Checking and Routing methods redefined for dynamically assigning qubits to * some Architecture. */ - AASLabellingMethod(){}; + AASLabellingMethod() {}; /** * will place all the qubits of the given circuit that are not placed at the diff --git a/tket/include/tket/Mapping/LexiLabelling.hpp b/tket/include/tket/Mapping/LexiLabelling.hpp index bb57248e71..ef49e08f40 100644 --- a/tket/include/tket/Mapping/LexiLabelling.hpp +++ b/tket/include/tket/Mapping/LexiLabelling.hpp @@ -25,7 +25,7 @@ class LexiLabellingMethod : public RoutingMethod { * Checking and Routing methods redefined for dynamically assigning qubits to * some Architecture. */ - LexiLabellingMethod(){}; + LexiLabellingMethod() {}; /** * @param mapping_frontier Contains boundary of routed/unrouted circuit for diff --git a/tket/include/tket/Mapping/RoutingMethod.hpp b/tket/include/tket/Mapping/RoutingMethod.hpp index d9181eb774..365f81c05d 100644 --- a/tket/include/tket/Mapping/RoutingMethod.hpp +++ b/tket/include/tket/Mapping/RoutingMethod.hpp @@ -21,7 +21,7 @@ namespace tket { class RoutingMethod { public: - RoutingMethod(){}; + RoutingMethod() {}; virtual ~RoutingMethod() {} /** diff --git a/tket/include/tket/Placement/Placement.hpp b/tket/include/tket/Placement/Placement.hpp index bc6d9f287a..fa918c57cf 100644 --- a/tket/include/tket/Placement/Placement.hpp +++ b/tket/include/tket/Placement/Placement.hpp @@ -27,7 +27,7 @@ class Placement { explicit Placement(const Architecture& _architecture); - Placement(){}; + Placement() {}; /** * Reassigns some UnitID in circ_ as UnitID in architecture_ @@ -90,7 +90,7 @@ class Placement { */ const Architecture& get_architecture_ref() { return architecture_; } - virtual ~Placement(){}; + virtual ~Placement() {}; static const std::string& unplaced_reg(); diff --git a/tket/include/tket/Predicates/CompilerPass.hpp b/tket/include/tket/Predicates/CompilerPass.hpp index 26ac7def6c..4b266b7d92 100644 --- a/tket/include/tket/Predicates/CompilerPass.hpp +++ b/tket/include/tket/Predicates/CompilerPass.hpp @@ -132,7 +132,7 @@ class BasePass { static Guarantee get_guarantee( const std::type_index& ti, const PassConditions& conditions); - virtual ~BasePass(){}; + virtual ~BasePass() {}; protected: BasePass(const PredicatePtrMap& precons, const PostConditions& postcons) diff --git a/tket/include/tket/Predicates/Predicates.hpp b/tket/include/tket/Predicates/Predicates.hpp index e03e1d0db8..cad531ed29 100644 --- a/tket/include/tket/Predicates/Predicates.hpp +++ b/tket/include/tket/Predicates/Predicates.hpp @@ -60,7 +60,7 @@ class Predicate { virtual bool implies(const Predicate& other) const = 0; virtual PredicatePtr meet(const Predicate& other) const = 0; virtual std::string to_string() const = 0; - virtual ~Predicate(){}; // satisfy compiler + virtual ~Predicate() {}; // satisfy compiler }; // all Predicate subclasses must inherit from `Predicate` diff --git a/tket/src/Mapping/BoxDecomposition.cpp b/tket/src/Mapping/BoxDecomposition.cpp index 1aae01c200..dc7f812789 100644 --- a/tket/src/Mapping/BoxDecomposition.cpp +++ b/tket/src/Mapping/BoxDecomposition.cpp @@ -53,7 +53,7 @@ bool BoxDecomposition::solve() { return true; } -BoxDecompositionRoutingMethod::BoxDecompositionRoutingMethod(){}; +BoxDecompositionRoutingMethod::BoxDecompositionRoutingMethod() {}; std::pair BoxDecompositionRoutingMethod::routing_method( MappingFrontier_ptr &mapping_frontier, diff --git a/tket/src/Mapping/LexiRouteRoutingMethod.cpp b/tket/src/Mapping/LexiRouteRoutingMethod.cpp index 16c3cdbab3..07ecafa8f6 100644 --- a/tket/src/Mapping/LexiRouteRoutingMethod.cpp +++ b/tket/src/Mapping/LexiRouteRoutingMethod.cpp @@ -17,7 +17,7 @@ namespace tket { LexiRouteRoutingMethod::LexiRouteRoutingMethod(unsigned _max_depth) - : max_depth_(_max_depth){}; + : max_depth_(_max_depth) {}; std::pair LexiRouteRoutingMethod::routing_method( MappingFrontier_ptr& mapping_frontier, diff --git a/tket/src/Mapping/RoutingMethodCircuit.cpp b/tket/src/Mapping/RoutingMethodCircuit.cpp index e5da4e4c7b..f2610eef79 100644 --- a/tket/src/Mapping/RoutingMethodCircuit.cpp +++ b/tket/src/Mapping/RoutingMethodCircuit.cpp @@ -23,7 +23,7 @@ RoutingMethodCircuit::RoutingMethodCircuit( unsigned _max_size, unsigned _max_depth) : route_subcircuit_(_route_subcircuit), max_size_(_max_size), - max_depth_(_max_depth){}; + max_depth_(_max_depth) {}; std::pair RoutingMethodCircuit::routing_method( MappingFrontier_ptr& mapping_frontier, diff --git a/tket/src/Placement/Placement.cpp b/tket/src/Placement/Placement.cpp index 53a7f4a299..41e1b1cfad 100644 --- a/tket/src/Placement/Placement.cpp +++ b/tket/src/Placement/Placement.cpp @@ -48,7 +48,7 @@ void fill_partial_mapping( } Placement::Placement(const Architecture& _architecture) - : architecture_(_architecture){}; + : architecture_(_architecture) {}; bool Placement::place( Circuit& circ_, std::shared_ptr compilation_map) const { diff --git a/tket/test/src/test_MappingManager.cpp b/tket/test/src/test_MappingManager.cpp index f0b30a523c..1e0ab6544d 100644 --- a/tket/test/src/test_MappingManager.cpp +++ b/tket/test/src/test_MappingManager.cpp @@ -23,7 +23,7 @@ namespace tket { class TokenSwappingTester : public RoutingMethod { public: - TokenSwappingTester(){}; + TokenSwappingTester() {}; /** * @param mapping_frontier Contains boundary of routed/unrouted circuit for