QuISP
Loading...
Searching...
No Matches
TestComponentProviderStrategy.h
Go to the documentation of this file.
1#pragma once
2
4#include <modules/QNIC.h>
9
10#include "Logger.h"
11#include "Simulation.h"
12
13namespace quisp_test {
14namespace strategy {
15
27
33
35 public:
37 TestComponentProviderStrategy(std::vector<QNicSpec> specs) : qnic_specs(specs) {}
39 virtual cModule *getQNode() override { return nullptr; };
40 virtual cModule *getNode() override { return nullptr; };
41 virtual cModule *getNeighborNode(cModule *qnic) override { return nullptr; };
42 virtual int getNodeAddr() override { return -1; };
43 virtual bool isQNodeType(const cModuleType *const type) override { return false; };
44 virtual bool isBSANodeType(const cModuleType *const type) override { return false; };
45 virtual bool isEPPSNodeType(const cModuleType *const type) override { return false; };
46 virtual IStationaryQubit *getStationaryQubit(int qnic_index, int qubit_index, QNIC_type qnic_type) override { return nullptr; };
47 virtual cModule *getQNIC(int qnic_index, QNIC_type qnic_type) override { return nullptr; };
48 virtual IRoutingDaemon *getRoutingDaemon() override { return nullptr; };
49 virtual IHardwareMonitor *getHardwareMonitor() override { return nullptr; };
50 virtual IRealTimeController *getRealTimeController() override { return nullptr; };
51 virtual IQuantumBackend *getQuantumBackend() override { return nullptr; };
52 virtual ILogger *getLogger() override { return new TestLogger(); };
53 virtual SharedResource *getSharedResource() override { return nullptr; };
54 std::vector<QNicSpec> qnic_specs;
55 virtual int getNumQubits(int qnic_index, QNIC_type qnic_type) override {
56 for (auto spec : qnic_specs) {
57 if (spec.qnic_index == qnic_index && spec.type == qnic_type) {
58 return spec.num_qubits;
59 }
60 }
61 return 0;
62 };
63};
64
65} // namespace strategy
66} // namespace quisp_test
QNIC.
The abstract interface for a quantum backend.
Definition IQuantumBackend.h:19
Definition IHardwareMonitor.h:74
Definition IRealTimeController.h:10
Definition IRoutingDaemon.h:9
Definition IStationaryQubit.h:20
Interface of Logger class. Logger class that inherits ILogger is responsible for logging simulation r...
Definition ILogger.h:22
Definition IComponentProviderStrategy.h:9
Definition Logger.h:6
Definition Simulation.h:11
Definition TestComponentProviderStrategy.h:34
virtual cModule * getQNIC(int qnic_index, QNIC_type qnic_type) override
Definition TestComponentProviderStrategy.h:47
virtual bool isBSANodeType(const cModuleType *const type) override
Definition TestComponentProviderStrategy.h:44
virtual IHardwareMonitor * getHardwareMonitor() override
Definition TestComponentProviderStrategy.h:49
virtual bool isEPPSNodeType(const cModuleType *const type) override
Definition TestComponentProviderStrategy.h:45
TestComponentProviderStrategy()
Definition TestComponentProviderStrategy.h:36
TestComponentProviderStrategy(std::vector< QNicSpec > specs)
Definition TestComponentProviderStrategy.h:37
virtual cModule * getQNode() override
Definition TestComponentProviderStrategy.h:39
virtual IStationaryQubit * getStationaryQubit(int qnic_index, int qubit_index, QNIC_type qnic_type) override
Definition TestComponentProviderStrategy.h:46
virtual ILogger * getLogger() override
Definition TestComponentProviderStrategy.h:52
virtual IRealTimeController * getRealTimeController() override
Definition TestComponentProviderStrategy.h:50
virtual cModule * getNeighborNode(cModule *qnic) override
Definition TestComponentProviderStrategy.h:41
virtual int getNumQubits(int qnic_index, QNIC_type qnic_type) override
Definition TestComponentProviderStrategy.h:55
virtual ~TestComponentProviderStrategy()
Definition TestComponentProviderStrategy.h:38
virtual bool isQNodeType(const cModuleType *const type) override
Definition TestComponentProviderStrategy.h:43
virtual IQuantumBackend * getQuantumBackend() override
Definition TestComponentProviderStrategy.h:51
virtual IRoutingDaemon * getRoutingDaemon() override
Definition TestComponentProviderStrategy.h:48
virtual cModule * getNode() override
Definition TestComponentProviderStrategy.h:40
virtual int getNodeAddr() override
Definition TestComponentProviderStrategy.h:42
virtual SharedResource * getSharedResource() override
Definition TestComponentProviderStrategy.h:53
std::vector< QNicSpec > qnic_specs
Definition TestComponentProviderStrategy.h:54
QNIC_type
Definition QNIC.h:18
Definition test.h:15
Definition TestComponentProviderStrategy.h:28
int num_qubits
Definition TestComponentProviderStrategy.h:31
QNIC_type type
Definition TestComponentProviderStrategy.h:29
int qnic_index
Definition TestComponentProviderStrategy.h:30