|
Maestro 0.1.0
Unified interface for quantum circuit simulation
|
The network interface. More...
#include <Network.h>
Public Types | |
| using | ExecuteResults = typename Circuits::Circuit<Time>::ExecuteResults |
| using | SimulatorPair |
| using | SimulatorsSet |
Public Member Functions | |
| virtual | ~INetwork ()=default |
| Destroy the INetwork object. | |
| virtual size_t | GetNumberOfGatesDistributedOrCut (const std::shared_ptr< Circuits::Circuit< Time > > &circuit) const =0 |
| Get the number of gates that span more than one host. | |
| virtual void | Execute (const std::shared_ptr< Circuits::Circuit< Time > > &circuit)=0 |
| Execute the circuit on the network. | |
| virtual void | ExecuteOnHost (const std::shared_ptr< Circuits::Circuit< Time > > &circuit, size_t hostId)=0 |
| Execute the circuit on the specified host. | |
| virtual std::vector< double > | ExecuteExpectations (const std::shared_ptr< Circuits::Circuit< Time > > &circuit, const std::vector< std::string > &paulis)=0 |
| Execute the circuit on the network and return the expectation values for the specified Pauli strings. | |
| virtual std::vector< double > | ExecuteOnHostExpectations (const std::shared_ptr< Circuits::Circuit< Time > > &circuit, size_t hostId, const std::vector< std::string > &paulis)=0 |
| Execute the circuit on the specified host and return the expectation values for the specified Pauli strings. | |
| virtual ExecuteResults | RepeatedExecute (const std::shared_ptr< Circuits::Circuit< Time > > &circuit, size_t shots=1000)=0 |
| Execute the circuit on the network, repeatedly. | |
| ExecuteResults | RepeatedExecuteCircuit (const Schedulers::ExecuteCircuit< Time > &executeCircuit) |
| Execute the circuit on the network, repeatedly. | |
| virtual ExecuteResults | RepeatedExecuteOnHost (const std::shared_ptr< Circuits::Circuit< Time > > &circuit, size_t hostId, size_t shots=1000)=0 |
| Execute the circuit on the specified host, repeatedly. | |
| ExecuteResults | RepeatedExecuteCircuitOnHost (const Schedulers::ExecuteCircuit< Time > &executeCircuit, size_t hostId) |
| Execute the circuit on the specified host, repeatedly. | |
| virtual std::vector< ExecuteResults > | ExecuteScheduled (const std::vector< Schedulers::ExecuteCircuit< Time > > &circuits)=0 |
| Schedule and execute circuits on the network. | |
| virtual void | CreateSimulator (Simulators::SimulatorType simType=Simulators::SimulatorType::kQCSim, Simulators::SimulationType simExecType=Simulators::SimulationType::kMatrixProductState, size_t nrQubits=0)=0 |
| Create the simulator for the network. | |
| virtual std::shared_ptr< Simulators::ISimulator > | GetSimulator () const =0 |
| Get the simulator for the network. | |
| virtual void | Configure (const char *key, const char *value)=0 |
| Configures the network. | |
| virtual void | CreateScheduler (SchedulerType schType=SchedulerType::kNoEntanglementQubitsParallel)=0 |
| Create the scheduler for the network. | |
| virtual std::shared_ptr< Schedulers::IScheduler< Time > > | GetScheduler () const =0 |
| Get the scheduler for the network. | |
| virtual const std::shared_ptr< IHost< Time > > | GetHost (size_t hostId) const =0 |
| Get the host with the specified id. | |
| virtual const std::shared_ptr< IController< Time > > | GetController () const =0 |
| Get the controller for the network. | |
| virtual Circuits::OperationState & | GetState ()=0 |
| Get the classical state of the network. | |
| virtual size_t | GetNumHosts () const =0 |
| Get the number of hosts in the network. | |
| virtual size_t | GetNumQubits () const =0 |
| Get the number of qubits in the network. | |
| virtual size_t | GetNumQubitsForHost (size_t hostId) const =0 |
| Get the number of qubits in the network for the specified host. | |
| virtual size_t | GetNumNetworkEntangledQubits () const =0 |
| Get the number of qubits used for entanglement between hosts. | |
| virtual size_t | GetNumNetworkEntangledQubitsForHost (size_t hostId) const =0 |
| Get the number of qubits used for entanglement between hosts for the specified host. | |
| virtual size_t | GetNumClassicalBits () const =0 |
| Get the number of classical bits in the network. | |
| virtual size_t | GetNumClassicalBitsForHost (size_t hostId) const =0 |
| Get the number of classical bits in the network for the specified host. | |
| virtual bool | AreQubitsOnSameHost (size_t qubitId1, size_t qubitId2) const =0 |
| Check if the specified qubits are on the same host. | |
| virtual bool | AreClassicalBitsOnSameHost (size_t bitId1, size_t bitId2) const =0 |
| Check if the specified classical bits are on the same host. | |
| virtual bool | AreQubitAndClassicalBitOnSameHost (size_t qubitId, size_t bitId) const =0 |
| Check if the specified qubit and classical bit are on the same host. | |
| virtual size_t | GetHostIdForQubit (size_t qubitId) const =0 |
| Get the host id for the specified qubit. | |
| virtual size_t | GetHostIdForEntangledQubit (size_t qubitId) const =0 |
| Get the host id for the specified qubit used for entanglement between hosts. | |
| virtual size_t | GetHostIdForAnyQubit (size_t qubitId) const =0 |
| Get the host id for the specified qubit. | |
| virtual size_t | GetHostIdForClassicalBit (size_t classicalBitId) const =0 |
| Get the host id for the specified classical bit. | |
| virtual std::vector< size_t > | GetQubitsIds (size_t hostId) const =0 |
| Get the qubit ids for the specified host. | |
| virtual std::vector< size_t > | GetNetworkEntangledQubitsIds (size_t hostId) const =0 |
| Get the qubit ids used for entanglement between hosts for the specified host. | |
| virtual std::vector< size_t > | GetClassicalBitsIds (size_t hostId) const =0 |
| Get the classical bit ids for the specified host. | |
| virtual std::vector< size_t > | GetEntangledQubitMeasurementBitIds (size_t hostId) const =0 |
| Get the classical bit ids used for measurement of entanglement qubits between the hosts for the specified host. | |
| virtual bool | IsNetworkEntangledQubit (size_t qubitId) const =0 |
| Check if the specified qubit id is for a qubit used for entanglement between hosts. | |
| virtual bool | IsLocalOperation (const std::shared_ptr< Circuits::IOperation< Time > > &op) const =0 |
| Check if the circuit operation is local. | |
| virtual bool | IsDistributedOperation (const std::shared_ptr< Circuits::IOperation< Time > > &op) const =0 |
| Check if the circuit operation is distributed. | |
| virtual bool | OperatesWithNetworkEntangledQubit (const std::shared_ptr< Circuits::IOperation< Time > > &op) const =0 |
| Check if the circuit operation operates on the entanglement qubits between hosts. | |
| virtual bool | SendPacket (size_t fromHostId, size_t toHostId, const std::vector< uint8_t > &packet)=0 |
| Sends a packet between two hosts. | |
| virtual bool | IsEntanglingGate (const std::shared_ptr< Circuits::IOperation< Time > > &op) const =0 |
| Checks if a gate is an entangling gate. | |
| virtual bool | ExpectsClassicalBitFromOtherHost (const std::shared_ptr< Circuits::IOperation< Time > > &op) const =0 |
| Checks if a gate expects a classical bit from another host. | |
| virtual size_t | GetHostIdForClassicalControl (const std::shared_ptr< Circuits::IOperation< Time > > &op) const =0 |
| Get the host id where the classical control bit resides for a conditioned gate. | |
| virtual bool | IsEntanglementQubitBusy (size_t qubitId) const =0 |
| Check if the specified qubit used for entanglement between hosts is busy. | |
| virtual bool | AreEntanglementQubitsBusy (size_t qubitId1, size_t qubitId2) const =0 |
| Check if any of the two specified qubits used for entanglement between hosts are busy. | |
| virtual void | MarkEntangledQubitsBusy (size_t qubitId1, size_t qubitId2)=0 |
| Mark the pair of the specified qubits used for entanglement between hosts as busy. | |
| virtual void | MarkEntangledQubitFree (size_t qubitId)=0 |
| Mark the specified qubit used for entanglement between hosts as free. | |
| virtual void | ClearEntanglements ()=0 |
| Clear all entanglements between hosts in the network. | |
| std::shared_ptr< INetwork< Time > > | getptr () |
| Get a shared pointer to this object. | |
| virtual NetworkType | GetType () const =0 |
| Get the type of the network. | |
| virtual std::shared_ptr< INetwork< Time > > | Clone () const =0 |
| Clone the network. | |
| virtual std::shared_ptr< Circuits::Circuit< Time > > | GetDistributedCircuit () const =0 |
| Get the distributed circuit. | |
| virtual void | SetOptimizeSimulator (bool optimize=true)=0 |
| Allows using an optimized simulator. | |
| virtual bool | GetOptimizeSimulator () const =0 |
| Returns the 'optimize' flag. | |
| virtual Simulators::SimulatorType | GetLastSimulatorType () const =0 |
| Get the last used simulator type. | |
| virtual Simulators::SimulationType | GetLastSimulationType () const =0 |
| Get the last used simulation type. | |
| virtual const SimulatorsSet & | GetSimulatorsSet () const =0 |
| Get the optimizations simulators set. | |
| virtual void | AddOptimizationSimulator (Simulators::SimulatorType type, Simulators::SimulationType kind)=0 |
| Adds a simulator to the simulators optimization set. | |
| virtual void | RemoveOptimizationSimulator (Simulators::SimulatorType type, Simulators::SimulationType kind)=0 |
| Removes a simulator from the simulators optimization set. | |
| virtual void | RemoveAllOptimizationSimulatorsAndAdd (Simulators::SimulatorType type, Simulators::SimulationType kind)=0 |
| Removes all simulators from the simulators optimization set and adds the one specified. | |
| virtual bool | OptimizationSimulatorExists (Simulators::SimulatorType type, Simulators::SimulationType kind) const =0 |
| Checks if a simulator exists in the optimization set. | |
| virtual size_t | GetMaxSimulators () const =0 |
| Get the maximum number of simulators that can be used in the network. | |
| virtual void | SetMaxSimulators (size_t maxSimulators)=0 |
| Set the maximum number of simulators that can be used in the network. | |
| virtual std::vector< std::vector< std::string > > | GetSubroutinesTextCode () const |
| Get the text code that is executed on the hosts. | |
| virtual std::shared_ptr< Simulators::ISimulator > | ChooseBestSimulator (const std::shared_ptr< Circuits::Circuit< Time > > &dcirc, size_t &counts, size_t nrQubits, size_t nrCbits, size_t nrResultCbits, Simulators::SimulatorType &simType, Simulators::SimulationType &method, std::vector< bool > &executed, bool multithreading=false, bool dontRunCircuitStart=false) const =0 |
| Choose the best simulator for the given circuit. | |
The network interface.
The network interface. Must be derived from by the particular network implementations.
| Time | The time type used for execution times. |
| using Network::INetwork< Time >::ExecuteResults = typename Circuits::Circuit<Time>::ExecuteResults |
| using Network::INetwork< Time >::SimulatorPair |
| using Network::INetwork< Time >::SimulatorsSet |
|
virtualdefault |
|
pure virtual |
Adds a simulator to the simulators optimization set.
Adds a simulator (if not already present) to the simulators optimization set.
| type | The type of the simulator to add. |
| kind | The kind of the simulation to add. |
Implemented in Network::SimpleDisconnectedNetwork< Time, Controller >.
|
pure virtual |
Check if the specified classical bits are on the same host.
Check if the specified classical are on the same host. This does not include the classical bits used for measuring the qubits used for entanglement between the hosts.
Implemented in Network::SimpleDisconnectedNetwork< Time, Controller >.
|
pure virtual |
Check if any of the two specified qubits used for entanglement between hosts are busy.
Check if any of the two specified qubits used for entanglement between hosts are busy. This is used to check if the qubits are free in order to use them for creating an entanglement between hosts.
| qubitId1 | The id of the first qubit to check. |
| qubitId2 | The id of the second qubit to check. |
Implemented in Network::SimpleDisconnectedNetwork< Time, Controller >.
|
pure virtual |
Check if the specified qubit and classical bit are on the same host.
Check if the specified qubit and classical bit are on the same host. This does not include the qubits used for entanglement between the hosts and the classical bits used for their measurement.
Implemented in Network::SimpleDisconnectedNetwork< Time, Controller >.
|
pure virtual |
Check if the specified qubits are on the same host.
Check if the specified qubits are on the same host. This does not include the qubits used for entanglement between the hosts.
Implemented in Network::SimpleDisconnectedNetwork< Time, Controller >.
|
pure virtual |
Choose the best simulator for the given circuit.
Choose the best simulator for the given circuit, based on the number of qubits, number of classical bits, number of result classical bits and number of shots. The choice is made from the optimization simulators set.
| dcirc | The distributed circuit to choose the simulator for. |
| counts | The number of shots to be executed. |
| nrQubits | The number of qubits in the circuit. |
| nrCbits | The number of classical bits in the circuit. |
| nrResultCbits | The number of result classical bits in the circuit. |
| simType | The type of the chosen simulator. |
| method | The kind of simulation of the chosen simulator. |
| executed | A vector of bools marking the executed gates from the circuit (some of them might be executed when picking up the simulator - usually the gates from the beginning up to the measurements/resets). |
| multithreading | If true, allows simulators to support multithreading (default is false). Multithreading will be set to false if multithreading is implemented at a higher level (multiple simulators in parallel). |
|
pure virtual |
Clear all entanglements between hosts in the network.
Clear all entanglements between hosts in the network. This marks all qubits used for entanglement between hosts as free. If the entanglements are explicitely coordinated in the network, all pairs of entangled qubits are released.
Implemented in Network::SimpleDisconnectedNetwork< Time, Controller >.
|
pure virtual |
Clone the network.
Clone the network in a pristine state.
Implemented in Network::SimpleDisconnectedNetwork< Time, Controller >.
|
pure virtual |
Configures the network.
This function is called to configure the network (for example the simulator(s) used by the network.
| key | The key of the configuration option. |
| value | The value of the configuration. |
Implemented in Network::SimpleDisconnectedNetwork< Time, Controller >.
|
pure virtual |
Create the scheduler for the network.
Creates the scheduler for the network. Call this only after the network topology has been set up. Should create the scheduler and set the network for it and any other necessary parameters.
| simType | The type of the scheduler to create. |
Implemented in Network::SimpleDisconnectedNetwork< Time, Controller >.
|
pure virtual |
Create the simulator for the network.
Creates the simulator for the network. Call this only after the network topology has been set up. Should create the simulator with the proper number of qubits for the whole network and also set up a 'classical state' for the whole network and distribute the qubits and cbits to the hosts. The nrQubits parameter is used internally to allocate a simulator for a single host only - if a circuit is executed on a single host. Let it to the default value - 0 - to allocate the number of qubits for the whole network.
| simType | The type of the simulator to create. |
| simExecType | The type of the simulation - statevector, composite, matrix product state, stabilizer, tensor network... |
| nrQubits | The number of qubits to allocate for the simulator. Default is 0 - allocate the number of qubits for the whole network. |
Implemented in Network::SimpleDisconnectedNetwork< Time, Controller >.
|
pure virtual |
Execute the circuit on the network.
Execute the circuit on the network, using the controller for distributing the operations to the hosts. The base class functionality is used for circuit distribution, but then the distributed circuit is converted to netqasm. Ensure the quantum computing simulator and the netqasm virtual machines have been created before calling this.
| circuit | The circuit to execute. |
|
pure virtual |
Execute the circuit on the network and return the expectation values for the specified Pauli strings.
Execute the circuit on the network, using the controller for distributing the operations to the hosts and return the expectation values for the specified Pauli strings. The base class functionality is used for circuit distribution, but then the distributed circuit is converted to netqasm. Ensure the quantum computing simulator and the netqasm virtual machines have been created before calling this.
| circuit | The circuit to execute. |
| paulis | The Pauli strings to measure the expectations for. |
|
pure virtual |
Execute the circuit on the specified host.
Execute the circuit on the specified host. The circuit must fit on the host, otherwise an exception is thrown. The circuit will be mapped on the specified host, if its qubits start with indexing from 0 (if already mapped, the qubits won't be altered).
| circuit | The circuit to execute. |
| hostId | The id of the host to execute the circuit on. |
|
pure virtual |
Execute the circuit on the specified host and return the expectation values for the specified Pauli strings.
Execute the circuit on the specified host and return the expectation values for the specified Pauli strings. The circuit must fit on the host, otherwise an exception is thrown. The circuit will be mapped on the specified host, if its qubits start with indexing from 0 (if already mapped, the qubits won't be altered).
| circuit | The circuit to execute. |
| hostId | The id of the host to execute the circuit on. |
| paulis | The Pauli strings to measure the expectations for. |
|
pure virtual |
Schedule and execute circuits on the network.
Execute the circuits on the network, scheduling their execution and distributing the operations to the hosts. The way the circuits are distributed to the hosts depends on the specific interface implementations. The way they are scheduled depends on the network scheduler and parametrization.
| circuits | The circuits to execute, along with the number of shots. |
|
pure virtual |
Checks if a gate expects a classical bit from another host.
It must be a conditional gate, conditioned on a classical bit from another host. Use it on already distributed gates, not on the original circuit.
| op | The operation to check. |
|
pure virtual |
Get the classical bit ids for the specified host.
Get the classical bit ids for the specified host, excluding the one(s) used for measurement of entanglemen qubits between the hosts.
| hostId | The id of the host to get the classical bit ids for. |
Implemented in Network::SimpleDisconnectedNetwork< Time, Controller >.
|
pure virtual |
Get the controller for the network.
Gets a smart pointer to the controller for the network.
Implemented in Network::SimpleDisconnectedNetwork< Time, Controller >.
|
pure virtual |
Get the distributed circuit.
Get the distributed circuit. Execute() must be called first, otherwise the return would be nullptr.
Implemented in Network::SimpleDisconnectedNetwork< Time, Controller >.
|
pure virtual |
Get the classical bit ids used for measurement of entanglement qubits between the hosts for the specified host.
Get the classical bit ids used for measurement of entanglement qubits between the hosts for the specified host.
| hostId | The id of the host to get the classical bit ids for. |
Implemented in Network::SimpleDisconnectedNetwork< Time, Controller >.
|
pure virtual |
Get the host with the specified id.
Get a smart pointer to the host that has the specified id.
| hostId | The id of the host to get. |
Implemented in Network::SimpleDisconnectedNetwork< Time, Controller >.
|
pure virtual |
Get the host id for the specified qubit.
Get the host id for the squbit, including the qubits used for entanglement between hosts.
| qubitId | The id of the qubit to get the host id for. |
Implemented in Network::SimpleDisconnectedNetwork< Time, Controller >.
|
pure virtual |
Get the host id for the specified classical bit.
Get the host id for the specified classical bit, including the one(s) used for measurement of entanglement qubits between the hosts.
| classicalBitId | The id of the classical bit to get the host id for. |
Implemented in Network::SimpleDisconnectedNetwork< Time, Controller >.
|
pure virtual |
Get the host id where the classical control bit resides for a conditioned gate.
It must be a conditional gate, conditioned on a qubit from another host. Use it on already distributed gates, not on the original circuit.
| op | The operation to find the host of the control bit. |
|
pure virtual |
Get the host id for the specified qubit used for entanglement between hosts.
Get the host id for the specified qubit used for entanglement between hosts.
| qubitId | The id of qubit the used for entanglement between hosts to get the host id for. |
Implemented in Network::SimpleDisconnectedNetwork< Time, Controller >.
|
pure virtual |
Get the host id for the specified qubit.
Get the host id for the specified qubit, excluding the qubits used for entanglement between hosts.
| qubitId | The id of the qubit to get the host id for. |
Implemented in Network::SimpleDisconnectedNetwork< Time, Controller >.
|
pure virtual |
Get the last used simulation type.
Get the last used simulation type.
Implemented in Network::SimpleDisconnectedNetwork< Time, Controller >.
|
pure virtual |
Get the last used simulator type.
Get the last used simulator type.
Implemented in Network::SimpleDisconnectedNetwork< Time, Controller >.
|
pure virtual |
Get the maximum number of simulators that can be used in the network.
Get the maximum number of simulators that can be used in the network. This is used to limit the number of simulators (and corresponding threads) that can be used in the network.
Implemented in Network::SimpleDisconnectedNetwork< Time, Controller >.
|
pure virtual |
Get the qubit ids used for entanglement between hosts for the specified host.
Get the qubit ids used for entanglement between hosts for the specified host.
| hostId | The id of the host to get the qubit ids for. |
Implemented in Network::SimpleDisconnectedNetwork< Time, Controller >.
|
pure virtual |
Get the number of gates that span more than one host.
Get the number of gates that span more than one host for the given circuit.
| circuit | The circuit to check. |
|
pure virtual |
Get the number of classical bits in the network.
Get the number of classical bits in the network, excluding the classical bits used for measurement of entanglement qubits between the hosts.
Implemented in Network::SimpleDisconnectedNetwork< Time, Controller >.
|
pure virtual |
Get the number of classical bits in the network for the specified host.
Get the number of classical bits in the network for the specified host, excluding the classical bits used for measurement of entanglement qubits between the hosts.
| hostId | The id of the host to get the number of classical bits for. |
Implemented in Network::SimpleDisconnectedNetwork< Time, Controller >.
|
pure virtual |
Get the number of hosts in the network.
Get the number of hosts in the network, excluding the controller.
Implemented in Network::SimpleDisconnectedNetwork< Time, Controller >.
|
pure virtual |
Get the number of qubits used for entanglement between hosts.
Get the number of qubits used for entanglement between hosts in the network.
Implemented in Network::SimpleDisconnectedNetwork< Time, Controller >.
|
pure virtual |
Get the number of qubits used for entanglement between hosts for the specified host.
Get the number of qubits used for entanglement between hosts in the network for the specified host. Usually it's a single qubit.
| hostId | The id of the host to get the number of qubits used for entanglement between hosts for. |
Implemented in Network::SimpleDisconnectedNetwork< Time, Controller >.
|
pure virtual |
Get the number of qubits in the network.
Get the number of qubits in the network, excluding the qubits used for entanglement between the hosts.
Implemented in Network::SimpleDisconnectedNetwork< Time, Controller >.
|
pure virtual |
Get the number of qubits in the network for the specified host.
Get the number of qubits in the network for the specified host, excluding the qubits used for entanglement between the hosts.
| hostId | The id of the host to get the number of qubits for. |
Implemented in Network::SimpleDisconnectedNetwork< Time, Controller >.
|
pure virtual |
Returns the 'optimize' flag.
Returns the flag set by SetOptimizeSimulator().
Implemented in Network::SimpleDisconnectedNetwork< Time, Controller >.
|
inline |
|
pure virtual |
Get the qubit ids for the specified host.
Get the qubit ids for the specified host.
| hostId | The id of the host to get the qubit ids for. |
Implemented in Network::SimpleDisconnectedNetwork< Time, Controller >.
|
pure virtual |
Get the scheduler for the network.
Get the scheduler for the network.
Implemented in Network::SimpleDisconnectedNetwork< Time, Controller >.
|
pure virtual |
Get the simulator for the network.
Get the simulator for the network.
Implemented in Network::SimpleDisconnectedNetwork< Time, Controller >.
|
pure virtual |
Get the optimizations simulators set.
Get the optimization simulators set. To be used internally, will not be exposed from the library.
Implemented in Network::SimpleDisconnectedNetwork< Time, Controller >.
|
pure virtual |
Get the classical state of the network.
Gets a reference to the classical state of the network.
Implemented in Network::SimpleDisconnectedNetwork< Time, Controller >.
|
inlinevirtual |
Get the text code that is executed on the hosts.
Get the text code that is executed on the hosts, if available. The circuit might be converted to code to be executed (example: netqasm). If that's the case, the text code is returned in an array, each element of the array being the code for a host. Each host might have multiple subroutines, so each element of the array is an array of strings, each string being a subroutine.
|
pure virtual |
Get the type of the network.
Get the type of the network.
Implemented in Network::SimpleDisconnectedNetwork< Time, Controller >.
|
pure virtual |
Check if the circuit operation is distributed.
Check if the specified circuit operation is distributed. A distributed operation is an operation that is executed on multiple hosts. This does not include the operations that also operate on the entanglement qubits between hosts.
| op | The operation to check. |
|
pure virtual |
Check if the specified qubit used for entanglement between hosts is busy.
Check if the specified qubit used for entanglement between hosts is busy.
| qubitId | The id of the qubit to check. |
Implemented in Network::SimpleDisconnectedNetwork< Time, Controller >.
|
pure virtual |
Checks if a gate is an entangling gate.
An entangling gate is a gate that operates on two qubits that are used for entanglement between hosts.
| op | The operation to check. |
|
pure virtual |
Check if the circuit operation is local.
Check if the specified circuit operation is local. A local operation is an operation that is executed on a single host. This does not include the operations that also operate on the entanglement qubits between hosts.
| op | The operation to check. |
|
pure virtual |
Check if the specified qubit id is for a qubit used for entanglement between hosts.
Check if the specified qubit id is for a qubit used for entanglement between hosts.
| qubitId | The id of the qubit to check. |
Implemented in Network::SimpleDisconnectedNetwork< Time, Controller >.
|
pure virtual |
Mark the specified qubit used for entanglement between hosts as free.
Mark the specified qubit used for entanglement between hosts as free. This is used to mark the qubits as free when they are not used anymore for an entanglement between hosts.
| qubitId | The id of the qubit to mark as free. |
Implemented in Network::SimpleDisconnectedNetwork< Time, Controller >.
|
pure virtual |
Mark the pair of the specified qubits used for entanglement between hosts as busy.
Mark the pair of the specified qubits used for entanglement between hosts as busy. This is used to mark the qubits as busy when they are used for creating an entanglement between hosts.
| qubitId1 | The id of the first qubit to mark as busy. |
| qubitId2 | The id of the second qubit to mark as busy. |
Implemented in Network::SimpleDisconnectedNetwork< Time, Controller >.
|
pure virtual |
Check if the circuit operation operates on the entanglement qubits between hosts.
Check if the specified circuit operation operates on the entanglement qubits between hosts.
| op | The operation to check. |
|
pure virtual |
Checks if a simulator exists in the optimization set.
Checks if a simulator exists in the optimization set.
| type | The type of the simulator to check. |
| kind | The kind of the simulation to check. |
Implemented in Network::SimpleDisconnectedNetwork< Time, Controller >.
|
pure virtual |
Removes all simulators from the simulators optimization set and adds the one specified.
Removes all simulators from the simulators optimization set and adds the one specified.
| type | The type of the simulator to add. |
| kind | The kind of the simulation to add. |
Implemented in Network::SimpleDisconnectedNetwork< Time, Controller >.
|
pure virtual |
Removes a simulator from the simulators optimization set.
Removes a simulator from the simulators optimization set, if it exists.
| type | The type of the simulator to remove. |
| kind | The kind of the simulation to remove. |
Implemented in Network::SimpleDisconnectedNetwork< Time, Controller >.
|
pure virtual |
Execute the circuit on the network, repeatedly.
Execute the circuit on the network, distributing the operations to the hosts, repeating the execution 'shots' times. The way the circuit is distributed to the hosts depends on the specific interface implementations.
| circuit | The circuit to execute. |
| shots | The number of times to repeat the execution. |
|
inline |
Execute the circuit on the network, repeatedly.
Execute the circuit on the network, distributing the operations to the hosts, repeating the execution 'shots' times. The way the circuit is distributed to the hosts depends on the specific interface implementations.
| executeCircuit | The circuit to execute, together with the number of shots. |
|
inline |
Execute the circuit on the specified host, repeatedly.
Execute the circuit on the specified host, repeating the execution 'shots' times. The circuit must fit on the host, otherwise an exception is thrown. The circuit will be mapped on the specified host, if its qubits start with indexing from 0 (if already mapped, the qubits won't be altered).
| executeCircuit | The circuit to execute, together with the number of shots. |
| hostId | The id of the host to execute the circuit on. |
|
pure virtual |
Execute the circuit on the specified host, repeatedly.
Execute the circuit on the specified host, repeating the execution 'shots' times. The circuit must fit on the host, otherwise an exception is thrown. The circuit will be mapped on the specified host, if its qubits start with indexing from 0 (if already mapped, the qubits won't be altered).
| circuit | The circuit to execute. |
| hostId | The id of the host to execute the circuit on. |
| shots | The number of times to repeat the execution. |
|
pure virtual |
Sends a packet between two hosts.
Sends a packet between the two specified hosts.
| fromHostId | The id of the host to send the packet from. |
| toHostId | The id of the host to send the packet to. |
| packet | The packet to send. |
Implemented in Network::SimpleDisconnectedNetwork< Time, Controller >.
|
pure virtual |
Set the maximum number of simulators that can be used in the network.
Set the maximum number of simulators that can be used in the network. This is used to limit the number of simulators (and corresponding threads) that can be used in the network.
| maxSimulators | The maximum number of simulators that can be used in the network. |
Implemented in Network::SimpleDisconnectedNetwork< Time, Controller >.
|
pure virtual |
Allows using an optimized simulator.
If set, allows changing the simulator with an optimized one. States/amplitudes are not available in such a case, disable if you need them.
| optimize | If true, the simulator will be optimized if possible. |
Implemented in Network::SimpleDisconnectedNetwork< Time, Controller >.