From be40912c4eb67ece038bed7d88c6d461bd8f093c Mon Sep 17 00:00:00 2001 From: Vinitha Balachandran Date: Fri, 10 Jan 2025 17:20:45 +0800 Subject: [PATCH 1/3] Updating basic example in doc --- doc/source/getting-started/quickstart.rst | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/doc/source/getting-started/quickstart.rst b/doc/source/getting-started/quickstart.rst index 4e9c1a5..b36e5f6 100644 --- a/doc/source/getting-started/quickstart.rst +++ b/doc/source/getting-started/quickstart.rst @@ -48,11 +48,9 @@ Basic example """"""""""""" The following is a basic example to execute a two qubit circuit and print the final state in dense vector form using quimb backend:: - - # Set the quimb backend - qibo.set_backend( - backend="qibotn", platform="qutensornet", runcard=computation_settings - ) + + import qibo + from qibo import Circuit, gates # Set the runcard computation_settings = { @@ -62,6 +60,13 @@ The following is a basic example to execute a two qubit circuit and print the fi "expectation_enabled": False, } + + # Set the quimb backend + qibo.set_backend( + backend="qibotn", platform="qutensornet", runcard=computation_settings + ) + + # Construct the circuit with two qubits c = Circuit(2) From 712346e988d4ee51b5357d5e30bb4a33acb753e2 Mon Sep 17 00:00:00 2001 From: Vinitha Balachandran Date: Thu, 16 Jan 2025 12:13:13 +0800 Subject: [PATCH 2/3] Updating pre-commit file to fix docformatter --- .github/workflows/deploy.yml | 2 +- .github/workflows/publish.yml | 2 +- .github/workflows/rules.yml | 2 +- .pre-commit-config.yaml | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 3370558..8f50cc1 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -13,7 +13,7 @@ jobs: matrix: os: [ubuntu-latest] python-version: [3.9, "3.10", "3.11", "3.12"] - uses: qiboteam/workflows/.github/workflows/deploy-pip-poetry.yml@main + uses: qiboteam/workflows/.github/workflows/deploy-pip-poetry.yml@v1 with: os: ${{ matrix.os }} python-version: ${{ matrix.python-version }} diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 0aaf3a1..18b90bc 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -28,7 +28,7 @@ jobs: deploy-docs: needs: [evaluate-label] - uses: qiboteam/workflows/.github/workflows/deploy-ghpages-latest-stable.yml@main + uses: qiboteam/workflows/.github/workflows/deploy-ghpages-latest-stable.yml@v1 with: python-version: "3.10" package-manager: "poetry" diff --git a/.github/workflows/rules.yml b/.github/workflows/rules.yml index 8f956cf..8d1d59c 100644 --- a/.github/workflows/rules.yml +++ b/.github/workflows/rules.yml @@ -30,7 +30,7 @@ jobs: matrix: os: [ubuntu-latest] python-version: [3.9, "3.10", "3.11", "3.12"] - uses: qiboteam/workflows/.github/workflows/rules-poetry.yml@main + uses: qiboteam/workflows/.github/workflows/rules-poetry.yml@v1 with: os: ${{ matrix.os }} python-version: ${{ matrix.python-version }} diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 0d8d655..42147ca 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -19,7 +19,7 @@ repos: - id: isort args: ["--profile", "black"] - repo: https://github.com/PyCQA/docformatter - rev: v1.7.5 + rev: master hooks: - id: docformatter additional_dependencies: [tomli] From ba92e902e87757518fce914281a5d0b1199fcfdc Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Thu, 16 Jan 2025 04:18:21 +0000 Subject: [PATCH 3/3] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- README.md | 2 +- doc/source/getting-started/quickstart.rst | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 64378fe..7552994 100644 --- a/README.md +++ b/README.md @@ -72,7 +72,7 @@ computation_settings = { qibo.set_backend( backend="qibotn", platform="cutensornet", runcard=computation_settings ) # cuQuantum -#qibo.set_backend(backend="qibotn", platform="qutensornet", runcard=computation_settings) #quimb +# qibo.set_backend(backend="qibotn", platform="qutensornet", runcard=computation_settings) #quimb # Construct the circuit diff --git a/doc/source/getting-started/quickstart.rst b/doc/source/getting-started/quickstart.rst index b36e5f6..6650118 100644 --- a/doc/source/getting-started/quickstart.rst +++ b/doc/source/getting-started/quickstart.rst @@ -48,7 +48,7 @@ Basic example """"""""""""" The following is a basic example to execute a two qubit circuit and print the final state in dense vector form using quimb backend:: - + import qibo from qibo import Circuit, gates