Sequential Quantum Gate Decomposer  v1.9.6
Powerful decomposition of general unitarias into one- and two-qubit gates gates
List of all members | Public Member Functions | Private Attributes
squander::density::DepolarizingChannel Class Reference

Depolarizing channel: ρ → (1-p)ρ + p·I/2^n. More...

#include <noise_channel.h>

Inheritance diagram for squander::density::DepolarizingChannel:
Inheritance graph
[legend]

Public Member Functions

void apply (DensityMatrix &rho) override
 Apply noise channel to density matrix. More...
 
 DepolarizingChannel (int qbit_num, double error_rate)
 Constructor. More...
 
double get_error_rate () const
 
std::string get_name () const override
 Get channel name. More...
 
int get_qbit_num () const
 

Private Attributes

double error_rate_
 
int qbit_num_
 

Detailed Description

Depolarizing channel: ρ → (1-p)ρ + p·I/2^n.

Represents uniform noise that replaces quantum state with maximally mixed state. Equivalent to applying X, Y, Z with equal probability p/3 each.

Kraus operators:

Example:

DepolarizingChannel noise(2, 0.01); // 1% depolarizing noise
DensityMatrix rho(2);
noise.apply(rho); // ρ → 0.99ρ + 0.01·I/4

Definition at line 66 of file noise_channel.h.

Constructor & Destructor Documentation

◆ DepolarizingChannel()

squander::density::DepolarizingChannel::DepolarizingChannel ( int  qbit_num,
double  error_rate 
)

Constructor.

Parameters
qbit_numNumber of qubits (applies to full system)
error_rateError rate p ∈ [0, 1]
Exceptions
std::invalid_argumentif error_rate not in [0,1]

Definition at line 27 of file noise_channel.cpp.

Member Function Documentation

◆ apply()

void squander::density::DepolarizingChannel::apply ( DensityMatrix rho)
overridevirtual

Apply noise channel to density matrix.

Parameters
rhoDensity matrix (modified in-place)

Implements squander::density::NoiseChannel.

Definition at line 35 of file noise_channel.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ get_error_rate()

double squander::density::DepolarizingChannel::get_error_rate ( ) const
inline

Definition at line 79 of file noise_channel.h.

Here is the caller graph for this function:

◆ get_name()

std::string squander::density::DepolarizingChannel::get_name ( ) const
inlineoverridevirtual

Get channel name.

Implements squander::density::NoiseChannel.

Definition at line 77 of file noise_channel.h.

◆ get_qbit_num()

int squander::density::DepolarizingChannel::get_qbit_num ( ) const
inline

Definition at line 80 of file noise_channel.h.

Here is the caller graph for this function:

Member Data Documentation

◆ error_rate_

double squander::density::DepolarizingChannel::error_rate_
private

Definition at line 84 of file noise_channel.h.

◆ qbit_num_

int squander::density::DepolarizingChannel::qbit_num_
private

Definition at line 83 of file noise_channel.h.


The documentation for this class was generated from the following files: