QuISP
Loading...
Searching...
No Matches
QNicRecord.h
Go to the documentation of this file.
1#pragma once
2
3#include <memory>
4
6#include <modules/QNIC.h>
9#include "IQNicRecord.h"
10
12
14
15class QNicRecord : public IQNicRecord {
16 public:
17 QNicRecord(utils::ComponentProvider& provider, int index, QNIC_type type, Logger::ILogger* logger = nullptr);
19
20 int countNumFreeQubits() override;
21 int takeFreeQubitIndex() override;
22 void setQubitBusy(int qubit_index, bool is_busy) override;
23 qrsa::IQubitRecord* getQubit(int qubit_index) override;
24
25 const int index;
27
28 protected:
29 // QNicRecord class has the ownership of the QubitRecords.
30 // if QNicRecord is destroyed, all QubitRecords will be destroyed automatically.
31 std::vector<std::unique_ptr<IQubitRecord>> qubits;
32};
33
34} // namespace quisp::modules::qnic_record
QNIC.
Interface of Logger class. Logger class that inherits ILogger is responsible for logging simulation r...
Definition ILogger.h:22
Interface for QNIC record.
Definition IQNicRecord.h:14
Definition QNicRecord.h:15
const QNIC_type type
Definition QNicRecord.h:26
const int index
Definition QNicRecord.h:25
qrsa::IQubitRecord * getQubit(int qubit_index) override
Definition QNicRecord.cc:34
int takeFreeQubitIndex() override
Definition QNicRecord.cc:25
int countNumFreeQubits() override
Definition QNicRecord.cc:15
~QNicRecord()
Definition QNicRecord.h:18
void setQubitBusy(int qubit_index, bool is_busy) override
Definition QNicRecord.cc:41
QNicRecord(utils::ComponentProvider &provider, int index, QNIC_type type, Logger::ILogger *logger=nullptr)
Definition QNicRecord.cc:8
std::vector< std::unique_ptr< IQubitRecord > > qubits
Definition QNicRecord.h:31
The QubitRecord interface.
Definition IQubitRecord.h:17
ComponentProvider class provides a way to access other quisp other modules.
Definition ComponentProvider.h:22
Definition IQNicRecord.h:6
QNIC_type
Definition QNIC.h:18