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

Changed documentation of channels. #808

Merged
merged 1 commit into from
Mar 1, 2023
Merged
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
8 changes: 4 additions & 4 deletions src/qibo/gates/channels.py
Original file line number Diff line number Diff line change
Expand Up @@ -310,15 +310,15 @@ class DepolarizingChannel(Channel):
""":math:`n`-qubit Depolarizing quantum error channel,

.. math::
\\mathcal{E}(\\rho ) = (1 - \\lambda) \\rho +\\lambda \\text{Tr}[\\rho] \\frac{I}{2^n}
\\mathcal{E}(\\rho ) = (1 - \\lambda) \\rho +\\lambda \\text{Tr}_q[\\rho]\\otimes \\frac{I}{2^n}

where :math:`\\lambda` is the depolarizing error parameter and :math:`0 \\le \\lambda \\le 4^n / (4^n - 1)`.

* If :math:`\\lambda = 1` this is a completely depolarizing channel
:math:`E(\\rho) = I / 2^n`
* If :math:`\\lambda = 4^n / (4^n - 1)` this is a uniform Pauli
error channel: :math:`E(\\rho) = \\sum_j P_j \\rho P_j / (4^n - 1)` for
all :math:`P_j != I`.
all :math:`P_j \\neq I`.

Args:
q (tuple): Qubit ids that the noise acts on.
Expand Down Expand Up @@ -371,7 +371,7 @@ class ResetChannel(Channel):

.. math::
\\mathcal{E}(\\rho ) = (1 - p_0 - p_1) \\rho
+ \\mathrm{Tr}\\rho \\otimes (p_0|0\\rangle \\langle 0| + p_1|1\\rangle \\langle 1|)
+ \\mathrm{Tr}_q[\\rho] \\otimes (p_0|0\\rangle \\langle 0| + p_1|1\\rangle \\langle 1|),

Args:
q (int): Qubit id that the channel acts on.
Expand Down Expand Up @@ -400,7 +400,7 @@ class ThermalRelaxationChannel(Channel):

.. math::
\\mathcal{E} (\\rho ) = (1 - p_z - p_0 - p_1)\\rho + p_zZ\\rho Z
+ \\mathrm{Tr}\\rho \\otimes (p_0|0\\rangle \\langle 0| + p_1|1\\rangle \\langle 1|)
+ \\mathrm{Tr}_q[\\rho] \\otimes (p_0|0\\rangle \\langle 0| + p_1|1\\rangle \\langle 1|)


while if :math:`T_1 < T_2`:
Expand Down