Skip to content

Commit decf127

Browse files
authored
Merge pull request #1786 from qiboteam/clifford
Add `Clifford+T` decomposition to transpiler
2 parents bb30e5e + b4d6f90 commit decf127

File tree

8 files changed

+1639
-804
lines changed

8 files changed

+1639
-804
lines changed

poetry.lock

Lines changed: 518 additions & 124 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyproject.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,10 +70,11 @@ pytest-cov = "^4.0.0"
7070
pylint = "^3.3.5"
7171
matplotlib = "^3.7.0"
7272
qibojit = { git = "https://github.com/qiboteam/qibojit.git" }
73-
stim = "^1.12.0"
73+
stim = "^1.15.0"
7474
qulacs = { version = "^0.6.4", python = "<3.13" }
7575
qiskit = "^2.2.3"
7676
qbraid = { version = "^0.10.0", extras = ["cudaq", "qir"] }
77+
pygridsynth = "^2.0.0"
7778

7879
[tool.poe.tasks]
7980
test = "pytest"

src/qibo/backends/__init__.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -147,8 +147,8 @@ def _default_transpiler(cls):
147147
from qibo.transpiler.router import Sabre
148148
from qibo.transpiler.unroller import NativeGates, Unroller
149149

150-
qubits = cls._backend.qubits
151-
natives = cls._backend.natives
150+
qubits = cls.backend().qubits
151+
natives = cls.backend().natives
152152
connectivity_edges = cls._backend.connectivity
153153
if qubits is not None and natives is not None:
154154
connectivity = (
@@ -189,9 +189,11 @@ def create(self, dtype):
189189
if dtype in ("complex64", "complex128"):
190190
self.Y = self.matrices.Y
191191
self.SX = self.matrices.SX
192+
self.SXDG = self.matrices.SXDG
192193
self.S = self.matrices.S
193-
self.T = self.matrices.T
194194
self.SDG = self.matrices.SDG
195+
self.T = self.matrices.T
196+
self.TDG = self.matrices.TDG
195197
self.CY = self.matrices.CY
196198
self.CSX = self.matrices.CSX
197199
self.CSXDG = self.matrices.CSXDG

src/qibo/backends/clifford.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,15 @@
1818

1919

2020
class CliffordBackend(Backend):
21-
"""Backend for the simulation of Clifford circuits following
21+
"""Backend for the simulation of Clifford circuits following Ref. [1].
2222
`Aaronson & Gottesman (2004) <https://arxiv.org/abs/quant-ph/0406196>`_.
2323
2424
Args:
2525
:class:`qibo.backends.abstract.Backend`: Backend used for the calculation.
26+
27+
References:
28+
1. S. Aaronson and D. Gottesman, *Improved Simulation of Stabilizer Circuits*,
29+
`Phys. Rev. A 70, 052328 (2004) <https://doi.org/10.1103/PhysRevA.70.052328>`_.
2630
"""
2731

2832
def __init__(self, platform: Optional[str] = None):

0 commit comments

Comments
 (0)