|
Maestro 0.1.0
Unified interface for quantum circuit simulation
|
The host interface. More...
#include <Host.h>
Inheritance diagram for Network::IHost< Time >:
Collaboration diagram for Network::IHost< Time >:Public Member Functions | |
| virtual | ~IHost ()=default |
| The destructor. | |
| virtual size_t | GetId () const =0 |
| Get the host id. | |
| virtual size_t | GetNumQubits () const =0 |
| Get the number of qubits. | |
| virtual size_t | GetNumNetworkEntangledQubits () const =0 |
| Get the number of network entangled qubits. | |
| virtual size_t | GetNumClassicalBits () const =0 |
| Get the number of classical bits. | |
| virtual bool | IsQubitOnHost (size_t qubitId) const =0 |
| Check if a qubit is in the host. | |
| virtual bool | AreQubitsOnSameHost (size_t qubitId1, size_t qubitId2) const =0 |
| Check if two qubits are in the same host. | |
| virtual bool | IsClassicalBitOnHost (size_t cbitId) const =0 |
| Check if a classical bit is in the host. | |
| virtual bool | AreCbitsOnSameHost (size_t cbitId1, size_t cbitId2) const =0 |
| Check if two classical bits are in the same host. | |
| virtual bool | IsEntangledQubitOnHost (size_t qubitId) const =0 |
| Check if a qubit used for entanglement between hosts is in the host. | |
| virtual std::vector< size_t > | GetQubitsIds () const =0 |
| Get the ids of the qubits in the host. | |
| virtual std::vector< size_t > | GetClassicalBitsIds () const =0 |
| Get the ids of the classical bits in the host. | |
| virtual std::vector< size_t > | GetNetworkEntangledQubitsIds () const =0 |
| Get the ids of the qubits used for entanglement between hosts in the host. | |
| virtual std::vector< size_t > | GetEntangledQubitMeasurementBitIds () const =0 |
| Get the ids of the classical bits used for measurement of the qubits used for entanglement between hosts present in the host. | |
| virtual bool | SendPacketToHost (size_t hostId, const std::vector< uint8_t > &packet)=0 |
| Send a packet to a host. | |
| virtual bool | RecvPacketFromHost (size_t hostId, const std::vector< uint8_t > &packet)=0 |
| Receive a packet from a host. | |
| virtual size_t | GetStartQubitId () const =0 |
| Get the id of the first qubit assigned to the host. | |
| virtual size_t | GetStartClassicalBitId () const =0 |
| Get the id of the first classical bit assigned to the host. | |
| std::shared_ptr< IHost< Time > > | getptr () |
| Get a shared pointer to this object. | |
The host interface.
The interface for the hosts in the network. Must be derived from by the particular host implementations. Most of the hosts will be quantum computers but classical computers are also possible. One that is possible is a controller, a classical computer responsible with the network management, circuit distribution and so on.
| Time | The time type for the execution time. |
|
virtualdefault |
The destructor.
The destructor. Virtual since this is an interface.
|
pure virtual |
Check if two classical bits are in the same host.
Checks if two classical bits with the specified ids are in the same host.
Implemented in Network::SimpleHost< Time >, and Network::SimpleController< Time >.
|
pure virtual |
Check if two qubits are in the same host.
Checks if two qubits with the specified ids are in the same host, excluding the one(s) used only for entanglement with other hosts.
Implemented in Network::SimpleController< Time >, and Network::SimpleHost< Time >.
|
pure virtual |
Get the ids of the classical bits in the host.
Obtain the ids of the classical bits in the host.
Implemented in Network::SimpleController< Time >, and Network::SimpleHost< Time >.
|
pure virtual |
Get the ids of the classical bits used for measurement of the qubits used for entanglement between hosts present in the host.
Obtain the ids of the classical bits used for measurement of the qubits used for entanglement between hosts present in the host.
Implemented in Network::SimpleController< Time >, and Network::SimpleHost< Time >.
|
pure virtual |
Get the host id.
Obtain a host id used to identify the host in the network.
Implemented in Network::SimpleController< Time >, and Network::SimpleHost< Time >.
|
pure virtual |
Get the ids of the qubits used for entanglement between hosts in the host.
Obtain the ids of the qubits used for entanglement between hosts in the host.
Implemented in Network::SimpleController< Time >, and Network::SimpleHost< Time >.
|
pure virtual |
Get the number of classical bits.
Obtain the number of classical bits in the host. This does not include the bits used for measurement of the network entangled qubits.
Implemented in Network::SimpleController< Time >, and Network::SimpleHost< Time >.
|
pure virtual |
Get the number of network entangled qubits.
Obtain the number of qubits in the host used for entanglement with other hosts.
Implemented in Network::SimpleController< Time >, and Network::SimpleHost< Time >.
|
pure virtual |
Get the number of qubits.
Obtain the number of qubits in the host, excluding the one(s) used only for entanglement with other hosts.
Implemented in Network::SimpleController< Time >, and Network::SimpleHost< Time >.
|
inline |
|
pure virtual |
Get the ids of the qubits in the host.
Obtain the ids of the qubits in the host, excluding the one(s) used only for entanglement with other hosts.
Implemented in Network::SimpleController< Time >, and Network::SimpleHost< Time >.
|
pure virtual |
Get the id of the first classical bit assigned to the host.
Obtain the id of the first classical bit assigned to the host, the other ones are assigned contiquously.
Implemented in Network::SimpleController< Time >, and Network::SimpleHost< Time >.
|
pure virtual |
Get the id of the first qubit assigned to the host.
Obtain the id of the first qubit assigned to the host, the other ones are assigned contiquously.
Implemented in Network::SimpleController< Time >, and Network::SimpleHost< Time >.
|
pure virtual |
Check if a classical bit is in the host.
Checks if a classical bit with the specified id is in the host.
Implemented in Network::SimpleHost< Time >, and Network::SimpleController< Time >.
|
pure virtual |
Check if a qubit used for entanglement between hosts is in the host.
Checks if a qubit used for entanglement between hosts with the specified id is in the host.
Implemented in Network::SimpleController< Time >, and Network::SimpleHost< Time >.
|
pure virtual |
Check if a qubit is in the host.
Checks if a qubit with the specified id is in the host, excluding the one(s) used only for entanglement with other hosts.
Implemented in Network::SimpleController< Time >, and Network::SimpleHost< Time >.
|
pure virtual |
Receive a packet from a host.
Receive a packet from a host. Usually called by the network implementation.
| hostId | The id of the host to receive the packet from. |
| packet | The packet to receive. |
Implemented in Network::SimpleController< Time >, and Network::SimpleHost< Time >.
|
pure virtual |
Send a packet to a host.
Send a packet to a host. Usually called by the host implementation or perhaps in some cases by the network implementation.
| hostId | The id of the host to send the packet to. |
| packet | The packet to send. |
Implemented in Network::SimpleController< Time >, and Network::SimpleHost< Time >.