Q2NS dev
ns-3 module
Loading...
Searching...
No Matches
q2ns::DephasingQMap Class Referencefinal

Dephasing noise model that applies Z with probability p. More...

#include <q2ns-qmap.h>

Inheritance diagram for q2ns::DephasingQMap:
Collaboration diagram for q2ns::DephasingQMap:

Public Member Functions

QMapInstance Sample (ns3::Ptr< ns3::UniformRandomVariable > u, const QMapContext &ctx=QMapContext{}) const override
 Sample a per-transmission QMapInstance.
 
- Public Member Functions inherited from q2ns::QMap
 ~QMap () override=default
 Virtual destructor.
 

Static Public Member Functions

static ns3::TypeId GetTypeId ()
 Get the ns-3 TypeId.
 
- Static Public Member Functions inherited from q2ns::QMap
static ns3::TypeId GetTypeId ()
 Get the ns-3 TypeId.
 
static ns3::Ptr< QMapCompose (const ns3::Ptr< QMap > &a, const ns3::Ptr< QMap > &b)
 Compose two QMaps into one sequential composite QMap.
 
static ns3::Ptr< QMapCompose (const std::vector< ns3::Ptr< QMap > > &maps)
 Compose a sequence of QMaps into one sequential composite QMap.
 
static ns3::Ptr< QMapFromLambda (std::function< void(QNode &, std::shared_ptr< Qubit > &)> f)
 Build a QMap from a simple lambda.
 
static ns3::Ptr< QMapFromLambda (std::function< void(QNode &, std::shared_ptr< Qubit > &, ns3::Ptr< ns3::UniformRandomVariable >, const QMapContext &)> f)
 Build a QMap from an advanced lambda.
 
static double RateToProb (double rate_per_s, const ns3::Time &t)
 Convert a Poisson rate and elapsed time into an event probability.
 

Additional Inherited Members

- Protected Member Functions inherited from q2ns::QMap
double GetProb_ (const QMapContext &ctx) const
 Return the effective application probability for this transmission.
 
bool Bernoulli_ (ns3::Ptr< ns3::UniformRandomVariable > u, const QMapContext &ctx) const
 Perform one Bernoulli trial using the effective probability.
 
- Static Protected Member Functions inherited from q2ns::QMap
static void SetLost_ (Qubit &q)
 Mark a qubit lost through the standard registry-backed location path.
 
- Protected Attributes inherited from q2ns::QMap
double p_ = 0.0
 Direct per-transmission probability.
 
double rate_ = 0.0
 Poisson event rate in 1/s. Overrides p_ when positive.
 

Detailed Description

Dephasing noise model that applies Z with probability p.

Definition at line 331 of file q2ns-qmap.h.

Member Function Documentation

◆ GetTypeId()

ns3::TypeId q2ns::DephasingQMap::GetTypeId ( )
static

Get the ns-3 TypeId.

Returns
TypeId for q2ns::DephasingQMap.

Definition at line 251 of file q2ns-qmap.cc.

◆ Sample()

QMapInstance q2ns::DephasingQMap::Sample ( ns3::Ptr< ns3::UniformRandomVariable >  u,
const QMapContext ctx = QMapContext{} 
) const
overridevirtual

Sample a per-transmission QMapInstance.

Parameters
uUniform random source.
ctxPer-transmission context.
Returns
Sampled dephasing instance.

Implements q2ns::QMap.

Definition at line 261 of file q2ns-qmap.cc.

References q2ns::QNode::Apply(), q2ns::QMap::Bernoulli_(), and q2ns::gates::Z().

Here is the call graph for this function:

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