Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Integrate CliffordBackend and stim #1248

Merged
merged 12 commits into from
Mar 6, 2024
Merged
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
17 changes: 17 additions & 0 deletions doc/source/api-reference/qibo.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1615,6 +1615,23 @@ or the complete set of :math:`d = 2^{n}` stabilizers operators can be extracted

The destabilizers can be extracted analogously with :meth:`qibo.quantum_info.clifford.Clifford.destabilizers`.

We provide integration with the `stim <https://github.com/quantumlib/Stim>`_ package.
It is possible to run Clifford circuits using `stim` as an engine:

.. code-block:: python
from qibo.backends import CliffordBackend
from qibo.quantum_info import Clifford, random_clifford

clifford_backend = CliffordBackend(engine="stim")

circuit = random_clifford(nqubits)
result = clifford_backend.execute_circuit(circuit)

## Note that the execution above is equivalent to the one below

result = Clifford.from_circuit(circuit, engine="stim")


.. autoclass:: qibo.quantum_info.clifford.Clifford
:members:
:member-order: bysource
Expand Down
135 changes: 50 additions & 85 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ matplotlib = "^3.7.0"
qibojit = { git = "https://github.com/qiboteam/qibojit.git" }
tensorflow = { version = "^2.14.1,<2.16", markers = "sys_platform == 'linux'" }
qibotn = { git = "https://github.com/qiboteam/qibotn.git" }
stim = "^1.12.0"
renatomello marked this conversation as resolved.
Show resolved Hide resolved

[tool.poe.tasks]
test = "pytest"
Expand Down
Loading
Loading