Skip to content

Commit

Permalink
Merge pull request #872 from qiboteam/stinespring
Browse files Browse the repository at this point in the history
`Stinespring` superoperator representation
  • Loading branch information
renatomello authored Jun 27, 2023
2 parents 05e2d3c + f587061 commit b78dd2e
Show file tree
Hide file tree
Showing 6 changed files with 1,449 additions and 302 deletions.
60 changes: 60 additions & 0 deletions doc/source/api-reference/qibo.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1469,6 +1469,12 @@ Choi to Chi-matrix
.. autofunction:: qibo.quantum_info.choi_to_chi


Choi to Stinespring
"""""""""""""""""""

.. autofunction:: qibo.quantum_info.choi_to_stinespring


Kraus to Choi
"""""""""""""

Expand All @@ -1493,6 +1499,12 @@ Kraus to Chi-matrix
.. autofunction:: qibo.quantum_info.kraus_to_chi


Kraus to Stinespring
""""""""""""""""""""

.. autofunction:: qibo.quantum_info.kraus_to_stinespring


Liouville to Choi
"""""""""""""""""

Expand Down Expand Up @@ -1528,6 +1540,12 @@ Liouville to Chi-matrix
.. autofunction:: qibo.quantum_info.liouville_to_chi


Liouville to Stinespring
""""""""""""""""""""""""

.. autofunction:: qibo.quantum_info.liouville_to_stinespring


Pauli-Liouville to Liouville
""""""""""""""""""""""""""""

Expand All @@ -1553,6 +1571,12 @@ Pauli-Liouville to Chi-matrix
.. autofunction:: qibo.quantum_info.pauli_to_chi


Pauli-Liouville to Stinespring
""""""""""""""""""""""""""""""

.. autofunction:: qibo.quantum_info.pauli_to_stinespring


Chi-matrix to Choi
""""""""""""""""""

Expand Down Expand Up @@ -1595,6 +1619,42 @@ Chi-matrix to Kraus
it in its default setting (``validate_cp=True``).


Chi-matrix to Stinespring
"""""""""""""""""""""""""

.. autofunction:: qibo.quantum_info.chi_to_stinespring


Stinespring to Choi
"""""""""""""""""""

.. autofunction:: qibo.quantum_info.stinespring_to_choi


Stinespring to Liouville
""""""""""""""""""""""""

.. autofunction:: qibo.quantum_info.stinespring_to_liouville


Stinespring to Pauli-Liouville
""""""""""""""""""""""""""""""

.. autofunction:: qibo.quantum_info.stinespring_to_pauli


Stinespring to Kraus
""""""""""""""""""""

.. autofunction:: qibo.quantum_info.stinespring_to_kraus


Stinespring to Chi-matrix
"""""""""""""""""""""""""

.. autofunction:: qibo.quantum_info.stinespring_to_chi


Kraus operators as probabilistic sum of unitaries
"""""""""""""""""""""""""""""""""""""""""""""""""

Expand Down
4 changes: 2 additions & 2 deletions src/qibo/gates/channels.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
"""Define quantum channels."""
from itertools import product
from math import exp, sqrt
from typing import Tuple
from typing import Optional, Tuple

import numpy as np

Expand Down Expand Up @@ -39,7 +39,7 @@ def apply(self, backend, state, nqubits): # pragma: no cover
def apply_density_matrix(self, backend, state, nqubits):
return backend.apply_channel_density_matrix(self, state, nqubits)

def to_choi(self, nqubits: int = None, order: str = "row", backend=None):
def to_choi(self, nqubits: Optional[int] = None, order: str = "row", backend=None):
"""Returns the Choi representation :math:`\\mathcal{E}`
of the Kraus channel :math:`\\{K_{\\alpha}\\}_{\\alpha}`.
Expand Down
Loading

0 comments on commit b78dd2e

Please sign in to comment.