![]() |
Q2NS dev
ns-3 module
|
Internal QMap implementation for sequential composition. More...
Public Member Functions | |
| CompositeQMap ()=default | |
| void | SetMaps (const std::vector< ns3::Ptr< QMap > > &maps) |
| 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 () |
Static Public Member Functions inherited from q2ns::QMap | |
| static ns3::TypeId | GetTypeId () |
| Get the ns-3 TypeId. | |
| static ns3::Ptr< QMap > | Compose (const ns3::Ptr< QMap > &a, const ns3::Ptr< QMap > &b) |
| Compose two QMaps into one sequential composite QMap. | |
| static ns3::Ptr< QMap > | Compose (const std::vector< ns3::Ptr< QMap > > &maps) |
| Compose a sequence of QMaps into one sequential composite QMap. | |
| static ns3::Ptr< QMap > | FromLambda (std::function< void(QNode &, std::shared_ptr< Qubit > &)> f) |
| Build a QMap from a simple lambda. | |
| static ns3::Ptr< QMap > | FromLambda (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. | |
Private Attributes | |
| std::vector< ns3::Ptr< QMap > > | maps_ |
| Component maps in left-to-right order. | |
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. | |
Internal QMap implementation for sequential composition.
This type is intentionally hidden from users. It samples each component map once for the current transmission and later executes the sampled instances left to right at the receiver.
Definition at line 69 of file q2ns-qmap.cc.
|
default |
|
inlinestatic |
Definition at line 71 of file q2ns-qmap.cc.
|
inlineoverridevirtual |
Sample a per-transmission QMapInstance.
The returned callable is later executed at the receiving node after the qubit has become local there.
| u | Uniform random source to use for sampling. |
| ctx | Optional per-transmission context. |
Implements q2ns::QMap.
Definition at line 89 of file q2ns-qmap.cc.
|
inline |
Definition at line 83 of file q2ns-qmap.cc.
|
private |
Component maps in left-to-right order.
Definition at line 113 of file q2ns-qmap.cc.