17#include "ns3/q2ns-types.h"
48class Qubit :
public std::enable_shared_from_this<Qubit> {
Abstract base class for channel map models.
Internal helper owned by QNode for node-local quantum networking.
Internal helper owned by a QNode to handle local quantum operations.
Internal registry that owns backend states and tracks qubit membership and location.
Lightweight handle for one qubit inside a registry-managed state.
QubitId GetQubitId() const
Get the stable qubit id.
std::string label_
Optional human-readable label.
void SetLabel(std::string label)
Set the application-level label.
void SetLocationLost()
Mark this qubit as lost.
Location GetLocation() const
Return the registry-tracked current location of this qubit.
void SetIndexInState(unsigned int index)
Update the current index within the backend state.
StateId GetStateId() const
Get the current backend state id.
unsigned int indexInState_
Current zero-based index within the state.
void Rebind(StateId newStateId, std::size_t newIndex)
Rebind this handle to a different state id and index.
unsigned int GetIndexInState() const
Get the current index within the backend state.
QubitId qubitId_
Stable qubit id assigned by the registry.
const std::string & GetLabel() const
Get the application-level label.
void SetLocationNode(uint32_t nodeId)
Mark this qubit as local to a node.
void SetQubitId(QubitId id)
Assign the stable qubit id.
void SetStateId(StateId stateId)
Update the current backend state id.
void SetLocationChannel(uint32_t channelId)
Mark this qubit as in transit on a channel.
QStateRegistry & registry_
Backing state registry.
StateId stateId_
Current backend state id.
std::uint64_t QubitId
Stable identifier for a registered qubit handle.
std::uint64_t StateId
Stable identifier for a registered backend state.
Current tracked location of a qubit.