![]() |
Q2NS dev
ns-3 module
|
Namespaces | |
| namespace | analysis |
| namespace | anonymous_namespace{q2ns-qmap.cc} |
| namespace | gates |
Classes | |
| class | AllAtOncePolicy |
| class | ConditionalQMap |
| QMap wrapper that conditionally applies another QMap. More... | |
| class | CongestionHelper |
| struct | CreateStateResult |
| Result of creating a new backend state. More... | |
| struct | CtrlHeader |
| class | DephasingQMap |
| Dephasing noise model that applies Z with probability p. More... | |
| class | DepolarizingQMap |
| Trajectory-style depolarizing model that applies a random Pauli from {X, Y, Z} with probability p. More... | |
| class | EntanglementSwapHelper |
| class | ISwapPolicy |
| class | LambdaQMap |
| QMap implementation that wraps a user-provided lambda. More... | |
| struct | LinkSpec |
| struct | Location |
| Current tracked location of a qubit. More... | |
| class | LossQMap |
| Erasure model that marks the qubit lost with probability p. More... | |
| class | NetController |
| Main user-facing facade for creating and configuring a quantum network. More... | |
| struct | NodeSpec |
| class | QChannel |
| Duplex quantum channel with configurable delay, jitter, and transit maps. More... | |
| class | QGate |
| Lightweight gate descriptor used by QState backends. More... | |
| struct | QLinkSpec |
| class | QMap |
| Abstract base class for channel map models. More... | |
| struct | QMapContext |
| Optional per-sample context passed to QMaps. More... | |
| class | QNetDevice |
| Minimal quantum net device that bridges a QChannel and a QNetworker. More... | |
| class | QNetworker |
| Internal helper owned by QNode for node-local quantum networking. More... | |
| class | QNode |
| Main user-facing per-node API for quantum operations and transmission. More... | |
| class | QProcessor |
| Internal helper owned by a QNode to handle local quantum operations. More... | |
| class | QState |
| Backend-agnostic interface for a quantum state object. More... | |
| class | QStateDM |
| Density-matrix concrete QState backend using qpp::cmat. More... | |
| class | QStateKet |
| Ket-based concrete QState backend using qpp. More... | |
| class | QStateRegistry |
| Internal registry that owns backend states and tracks qubit membership and location. More... | |
| class | QStateStab |
| Stabilizer concrete QState backend using stab::AffineState. More... | |
| class | Qubit |
| Lightweight handle for one qubit inside a registry-managed state. More... | |
| class | RandomGateQMap |
| QMap that samples one gate from a weighted distribution and applies it. More... | |
| class | RandomUnitaryQMap |
| QMap that applies one Haar-random single-qubit SU(2) unitary. More... | |
| struct | RoundsConfig |
| struct | SessionSpec |
| class | SwapApp |
| struct | SwapSessionSpec |
| struct | SwapTopologySpec |
| class | TeleportationApp |
| class | TeleportationHelper |
| struct | TopologySpec |
| struct | TrafficFlow |
| struct | TrafficSpec |
Typedefs | |
| using | Complex = std::complex< double > |
| Complex scalar type used by matrix-based backends. | |
| using | Matrix = Eigen::MatrixXcd |
| Dynamic complex matrix type used for custom gates and matrix-based states. | |
| using | Index = std::size_t |
| Generic qubit index type within a backend state. | |
| using | StateId = std::uint64_t |
| Stable identifier for a registered backend state. | |
| using | QubitId = std::uint64_t |
| Stable identifier for a registered qubit handle. | |
| using | QMapInstance = std::function< void(QNode &, std::shared_ptr< Qubit > &)> |
| Per-transmission quantum map callable applied to a received qubit. | |
| using | RecvCallback = ns3::Callback< void, std::shared_ptr< Qubit > > |
| Callback invoked when a qubit is successfully received at a node. | |
Enumerations | |
| enum class | QGateKind { QGateKind::Custom , QGateKind::I , QGateKind::X , QGateKind::Y , QGateKind::Z , QGateKind::H , QGateKind::S , QGateKind::SDG , QGateKind::CNOT , QGateKind::CZ , QGateKind::SWAP } |
| Enumerates built-in gate kinds. More... | |
| enum class | Basis { Basis::Z , Basis::X , Basis::Y } |
| Measurement basis for single-qubit projective measurement. More... | |
| enum class | QStateBackend { QStateBackend::Ket , QStateBackend::DM , QStateBackend::Stab } |
| Backend family used when creating new quantum states. More... | |
| enum class | LocationType { LocationType::Node , LocationType::Channel , LocationType::Lost , LocationType::Unset } |
| Kind of simulated qubit location. More... | |
Functions | |
| Matrix | MakeMatrix (std::initializer_list< std::initializer_list< Complex > > rows) |
| Build a Matrix from nested initializer lists. | |
| const Matrix & | MatrixI () |
| Return the 1-qubit identity matrix. | |
| const Matrix & | MatrixX () |
| Return the Pauli-X matrix. | |
| const Matrix & | MatrixY () |
| Return the Pauli-Y matrix. | |
| const Matrix & | MatrixZ () |
| Return the Pauli-Z matrix. | |
| const Matrix & | MatrixH () |
| Return the Hadamard matrix. | |
| const Matrix & | MatrixS () |
| Return the phase gate matrix S = diag(1, i). | |
| const Matrix & | MatrixSDG () |
| Return the inverse phase gate matrix SDG = diag(1, -i). | |
| const Matrix & | MatrixCNOT () |
| Return the CNOT matrix with control qubit 0 and target qubit 1. | |
| const Matrix & | MatrixCZ () |
| Return the CZ matrix. | |
| const Matrix & | MatrixSWAP () |
| Return the SWAP matrix. | |
| const Matrix & | MatrixOf (QGateKind k) |
| Return the built-in matrix for a non-custom gate kind. | |
| QStateBackend | BackendFromString (std::string_view s) |
| Convert a backend name string to a QStateBackend enum value. | |
| std::ostream & | operator<< (std::ostream &os, const QState &s) |
| Stream insertion for a QState reference. | |
| std::ostream & | operator<< (std::ostream &os, const std::shared_ptr< QState > &s) |
| Stream insertion for a shared QState pointer. | |
| struct q2ns::CtrlHeader | __attribute__ ((packed)) |
| std::vector< QStateBackend > | AllQStateBackends () |
| Return all supported backend enum values. | |
| Location | MakeUnsetLocation () |
| Construct an Unset location value. | |
| static ns3::Ptr< ns3::Ipv4 > | GetIpv4 (ns3::Ptr< ns3::Node > node) |
| static ns3::Ipv4Address | GetFirstNonLoopback (ns3::Ptr< ns3::Node > node) |
| struct q2ns::CtrlHeader q2ns::__attribute__ | ( | (packed) | ) |
|
static |
Definition at line 134 of file q2ns-teleportation-helper.cc.
References GetIpv4().
Referenced by q2ns::TeleportationHelper::InstallSessionApps().
|
static |
Definition at line 130 of file q2ns-teleportation-helper.cc.
Referenced by GetFirstNonLoopback().
Build a Matrix from nested initializer lists.
| rows | Matrix rows. |
Definition at line 155 of file q2ns-qgate.h.
Referenced by main(), MatrixCNOT(), MatrixCZ(), MatrixH(), MatrixI(), MatrixS(), MatrixSDG(), MatrixSWAP(), MatrixX(), MatrixY(), and MatrixZ().
|
inline |
Return the CNOT matrix with control qubit 0 and target qubit 1.
Basis ordering is |00>, |01>, |10>, |11>.
Definition at line 261 of file q2ns-qgate.h.
References CNOT, and MakeMatrix().
Referenced by MatrixOf().
|
inline |
Return the CZ matrix.
Definition at line 277 of file q2ns-qgate.h.
References CZ, and MakeMatrix().
Referenced by MatrixOf().
|
inline |
Return the Hadamard matrix.
Definition at line 221 of file q2ns-qgate.h.
References H, and MakeMatrix().
Referenced by main(), and MatrixOf().
|
inline |
Return the 1-qubit identity matrix.
Definition at line 177 of file q2ns-qgate.h.
References I, and MakeMatrix().
Referenced by MatrixOf().
Return the built-in matrix for a non-custom gate kind.
| k | Built-in gate kind. |
Definition at line 313 of file q2ns-qgate.h.
References CNOT, CZ, H, I, MatrixCNOT(), MatrixCZ(), MatrixH(), MatrixI(), MatrixS(), MatrixSDG(), MatrixSWAP(), MatrixX(), MatrixY(), MatrixZ(), S, SDG, SWAP, X, Y, and Z.
Referenced by q2ns::QStateDM::Apply(), and q2ns::QStateKet::Apply().
|
inline |
Return the phase gate matrix S = diag(1, i).
Definition at line 233 of file q2ns-qgate.h.
References MakeMatrix(), and S.
Referenced by main(), and MatrixOf().
|
inline |
Return the inverse phase gate matrix SDG = diag(1, -i).
Definition at line 244 of file q2ns-qgate.h.
References MakeMatrix(), and SDG.
Referenced by MatrixOf().
|
inline |
Return the SWAP matrix.
Basis ordering is |00>, |01>, |10>, |11>.
Definition at line 296 of file q2ns-qgate.h.
References MakeMatrix(), and SWAP.
Referenced by MatrixOf().
|
inline |
Return the Pauli-X matrix.
Definition at line 188 of file q2ns-qgate.h.
References MakeMatrix(), and X.
Referenced by MatrixOf().
|
inline |
Return the Pauli-Y matrix.
Definition at line 199 of file q2ns-qgate.h.
References MakeMatrix(), and Y.
Referenced by MatrixOf().
|
inline |
Return the Pauli-Z matrix.
Definition at line 210 of file q2ns-qgate.h.
References MakeMatrix(), and Z.
Referenced by MatrixOf().
|
inline |
Stream insertion for a QState reference.
| os | Output stream. |
| s | State reference. |
Definition at line 279 of file q2ns-qstate.h.
References q2ns::QState::Print().
|
inline |
Stream insertion for a shared QState pointer.
| os | Output stream. |
| s | Shared state pointer. |
Definition at line 290 of file q2ns-qstate.h.