Merge pull request #82 from qiboteam/fix_doc

Updating basic example in doc
This commit is contained in:
Stefano Carrazza
2025-01-16 08:40:27 +04:00
committed by GitHub
6 changed files with 14 additions and 9 deletions

View File

@@ -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 }}

View File

@@ -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"

View File

@@ -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 }}

View File

@@ -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]

View File

@@ -49,10 +49,8 @@ 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)