paddle_quantum.channel.representation
The library of representations of channels
- paddle_quantum.channel.representation.bit_flip_kraus(prob, dtype=None)
Kraus representation of a bit flip channel with form
\[E_0 = \sqrt{1-p} I, E_1 = \sqrt{p} X.\]- Parameters:
prob (float | ndarray | Tensor) – probability \(p\).
dtype (str | None) – data type. Defaults to be
None
.
- Returns:
a list of Kraus operators
- Return type:
List[Tensor]
- paddle_quantum.channel.representation.phase_flip_kraus(prob, dtype=None)
Kraus representation of a phase flip channel with form
\[E_0 = \sqrt{1 - p} I, E_1 = \sqrt{p} Z.\]- Parameters:
prob (float | ndarray | Tensor) – probability \(p\).
dtype (str | None) – data type. Defaults to be
None
.
- Returns:
a list of Kraus operators
- Return type:
List[Tensor]
- paddle_quantum.channel.representation.bit_phase_flip_kraus(prob, dtype=None)
Kraus representation of a bit-phase flip channel with form
\[E_0 = \sqrt{1 - p} I, E_1 = \sqrt{p} Y.\]- Parameters:
prob (float | ndarray | Tensor) – probability \(p\).
dtype (str | None) – data type. Defaults to be
None
.
- Returns:
a list of Kraus operators
- Return type:
List[Tensor]
- paddle_quantum.channel.representation.amplitude_damping_kraus(gamma, dtype=None)
Kraus representation of an amplitude damping channel with form
\[\begin{split}E_0 = \begin{bmatrix} 1 & 0 \\ 0 & \sqrt{1-\gamma} \end{bmatrix}, E_1 = \begin{bmatrix} 0 & \sqrt{\gamma} \\ 0 & 0 \end{bmatrix}.\end{split}\]- Parameters:
gamma (float | ndarray | Tensor) – coefficient \(\gamma\).
dtype (str | None) – data type. Defaults to be
None
.
- Returns:
a list of Kraus operators
- Return type:
List[Tensor]
- paddle_quantum.channel.representation.generalized_amplitude_damping_kraus(gamma, prob, dtype=None)
Kraus representation of a generalized amplitude damping channel with form
\[\begin{split}E_0 = \sqrt{p} \begin{bmatrix} 1 & 0 \\ 0 & \sqrt{1-\gamma} \end{bmatrix}, E_1 = \sqrt{p} \begin{bmatrix} 0 & \sqrt{\gamma} \\ 0 & 0 \end{bmatrix},\\ E_2 = \sqrt{1-p} \begin{bmatrix} \sqrt{1-\gamma} & 0 \\ 0 & 1 \end{bmatrix}, E_3 = \sqrt{1-p} \begin{bmatrix} 0 & 0 \\ \sqrt{\gamma} & 0 \end{bmatrix}.\end{split}\]- Parameters:
gamma (float | ndarray | Tensor) – coefficient \(\gamma\).
prob (float | ndarray | Tensor) – probability \(p\).
dtype (str | None) – data type. Defaults to be
None
.
- Returns:
a list of Kraus operators
- Return type:
List[Tensor]
- paddle_quantum.channel.representation.phase_damping_kraus(gamma, dtype=None)
Kraus representation of a phase damping channel with form
\[\begin{split}E_0 = \begin{bmatrix} 1 & 0 \\ 0 & \sqrt{1-\gamma} \end{bmatrix}, E_1 = \begin{bmatrix} 0 & 0 \\ 0 & \sqrt{\gamma} \end{bmatrix}.\end{split}\]- Parameters:
gamma (float | ndarray | Tensor) – coefficient \(\gamma\).
dtype (str | None) – data type. Defaults to be
None
.
- Returns:
a list of Kraus operators
- Return type:
List[Tensor]
- paddle_quantum.channel.representation.depolarizing_kraus(prob, dtype=None)
Kraus representation of a depolarizing channel with form
\[E_0 = \sqrt{1-3p/4} I, E_1 = \sqrt{p/4} X, E_2 = \sqrt{p/4} Y, E_3 = \sqrt{p/4} Z.\]- Parameters:
prob (float | ndarray | Tensor) – probability \(p\).
dtype (str | None) – data type. Defaults to be
None
.
- Returns:
a list of Kraus operators
- Return type:
List[Tensor]
- paddle_quantum.channel.representation.generalized_depolarizing_kraus(prob, num_qubits, dtype=None)
Kraus representation of a generalized depolarizing channel with form
\[E_0 = \sqrt{1-(D - 1)p/D} I, \text{ where } D = 4^n, E_k = \sqrt{p/D} \sigma_k, \text{ for } 0 < k < D.\]- Parameters:
prob (float) – probability \(p\).
num_qubits (int) – number of qubits \(n\) of this channel.
dtype (str | None) – data type. Defaults to be
None
.
- Returns:
a list of Kraus operators
- Return type:
List[Tensor]
- paddle_quantum.channel.representation.pauli_kraus(prob, dtype=None)
Kraus representation of a pauli channel
- Parameters:
prob (List[float] | ndarray | Tensor) – a list of three probabilities corresponding to X, Y, Z gate \(p\).
dtype (str | None) – data type. Defaults to be
None
.
- Returns:
a list of Kraus operators
- Return type:
List[Tensor]
- paddle_quantum.channel.representation.reset_kraus(prob, dtype=None)
Kraus representation of a reset channel with form
\[\begin{split}E_0 = \begin{bmatrix} \sqrt{p} & 0 \\ 0 & 0 \end{bmatrix}, E_1 = \begin{bmatrix} 0 & \sqrt{p} \\ 0 & 0 \end{bmatrix},\\ E_2 = \begin{bmatrix} 0 & 0 \\ \sqrt{q} & 0 \end{bmatrix}, E_3 = \begin{bmatrix} 0 & 0 \\ 0 & \sqrt{q} \end{bmatrix},\\ E_4 = \sqrt{1-p-q} I.\end{split}\]- Parameters:
prob (List[float] | ndarray | Tensor) – list of two probabilities of resetting to state \(|0\rangle\) and \(|1\rangle\).
dtype (str | None) – data type. Defaults to be
None
.
- Returns:
a list of Kraus operators
- Return type:
List[Tensor]
- paddle_quantum.channel.representation.thermal_relaxation_kraus(const_t, exec_time, dtype=None)
Kraus representation of a thermal relaxation channel
- Parameters:
const_t (List[float] | ndarray | Tensor) – list of \(T_1\) and \(T_2\) relaxation time in microseconds.
exec_time (List[float] | ndarray | Tensor) – quantum gate execution time in the process of relaxation in nanoseconds.
dtype (str | None) – data type. Defaults to be
None
.
- Returns:
a list of Kraus operators.
- Return type:
List[Tensor]