Merge pull request #82 from qiboteam/fix_doc
Updating basic example in doc
This commit is contained in:
2
.github/workflows/deploy.yml
vendored
2
.github/workflows/deploy.yml
vendored
@@ -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 }}
|
||||
|
||||
2
.github/workflows/publish.yml
vendored
2
.github/workflows/publish.yml
vendored
@@ -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"
|
||||
|
||||
2
.github/workflows/rules.yml
vendored
2
.github/workflows/rules.yml
vendored
@@ -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 }}
|
||||
|
||||
@@ -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]
|
||||
|
||||
@@ -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)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user