QuISP
Loading...
Searching...
No Matches
StationaryQubit.h
Go to the documentation of this file.
1
7#pragma once
8
9#include <PhotonicQubit_m.h>
10#include <backends/Backends.h>
13#include "IStationaryQubit.h"
14#include "QubitId.h"
16
17namespace quisp::modules {
18
19#define STATIONARYQUBIT_PULSE_BEGIN 0x01
20#define STATIONARYQUBIT_PULSE_END 0x02
21#define STATIONARYQUBIT_PULSE_BOUND (STATIONARYQUBIT_PULSE_BEGIN | STATIONARYQUBIT_PULSE_END)
22
32
34 protected:
36
37 public:
39 void setFree(bool consumed) override;
40 /*In use. E.g. waiting for purification result.*/
41 void Lock(unsigned long rs_id, int rule_id, int action_id) override;
42 void Unlock() override;
43 bool isLocked() override;
44
49 void emitPhoton(int pulse) override;
50
51 virtual types::EigenvalueResult measureX() override;
52 virtual types::EigenvalueResult measureY() override;
53 virtual types::EigenvalueResult measureZ() override;
55
56 void gateCNOT(IStationaryQubit *target_qubit) override;
57 void gateHadamard() override;
58 void gateX() override;
59 void gateZ() override;
60 void gateY() override;
61 void gateS() override;
62 void gateSdg() override;
63
64 backends::IQubit *getBackendQubitRef() const override;
65
67
68 bool locked;
69 unsigned long locked_ruleset_id;
70 unsigned long locked_rule_id;
71
72 protected:
73 void initialize() override;
74 void finish() override;
75 void handleMessage(omnetpp::cMessage *msg) override;
76 messages::PhotonicQubit *generateEntangledPhoton();
77 void setBusy();
78
85 std::unique_ptr<IConfiguration> prepareBackendQubitConfiguration(bool overwrite);
86
87 // this is for debugging. class internal use only.
88 // and it's different from QubitRecord's one.
89 bool is_busy;
90 // photon emitted at
91 omnetpp::simtime_t emitted_time = -1;
92 // Standard deviation
97
100};
101
102} // namespace quisp::modules
just an interface for the configuration to the backend
Definition IConfiguration.h:9
The abstract interface for a quantum backend.
Definition IQuantumBackend.h:19
Definition IQubit.h:30
Definition IStationaryQubit.h:20
StationaryQubit. https://arxiv.org/abs/1908.10758.
Definition StationaryQubit.h:33
void gateZ() override
Definition StationaryQubit.cc:147
std::unique_ptr< IConfiguration > prepareBackendQubitConfiguration(bool overwrite)
Definition StationaryQubit.cc:64
void handleMessage(omnetpp::cMessage *msg) override
handle PhotonicQubit generated by StatinoryQubit itself
Definition StationaryQubit.cc:121
void setFree(bool consumed) override
Definition StationaryQubit.cc:168
void initialize() override
Initialize StationaryQubit.
Definition StationaryQubit.cc:38
IBackendQubit * qubit_ref
Definition StationaryQubit.h:35
void gateS() override
Definition StationaryQubit.cc:151
void Unlock() override
Definition StationaryQubit.cc:204
bool isLocked() override
Definition StationaryQubit.cc:215
void gateSdg() override
Definition StationaryQubit.cc:153
virtual types::EigenvalueResult measureX() override
Definition StationaryQubit.cc:137
void Lock(unsigned long rs_id, int rule_id, int action_id) override
Definition StationaryQubit.cc:190
StationaryQubit()
Definition StationaryQubit.cc:30
double emission_jittering_standard_deviation
Definition StationaryQubit.h:93
int qnic_address
Definition StationaryQubit.h:96
unsigned long locked_ruleset_id
Definition StationaryQubit.h:69
virtual types::MeasurementOutcome measureRandomPauliBasis() override
Definition StationaryQubit.cc:255
void setBusy()
Definition StationaryQubit.cc:158
void finish() override
Definition StationaryQubit.cc:114
virtual types::EigenvalueResult measureY() override
Definition StationaryQubit.cc:139
void gateHadamard() override
Definition StationaryQubit.cc:143
void emitPhoton(int pulse) override
Emit photon.
Definition StationaryQubit.cc:238
void gateCNOT(IStationaryQubit *target_qubit) override
Definition StationaryQubit.cc:155
int stationary_qubit_address
Definition StationaryQubit.h:94
omnetpp::simtime_t emitted_time
Definition StationaryQubit.h:91
void gateY() override
Definition StationaryQubit.cc:149
messages::PhotonicQubit * generateEntangledPhoton()
Generate photon entangled with the memory.
Definition StationaryQubit.cc:221
double emission_success_probability
Definition StationaryQubit.h:66
unsigned long locked_rule_id
Definition StationaryQubit.h:70
bool locked
Definition StationaryQubit.h:68
utils::ComponentProvider provider
Definition StationaryQubit.h:98
virtual types::EigenvalueResult measureZ() override
Definition StationaryQubit.cc:141
int node_address
Definition StationaryQubit.h:95
IQuantumBackend * backend
Definition StationaryQubit.h:99
bool is_busy
Definition StationaryQubit.h:89
void gateX() override
Definition StationaryQubit.cc:145
backends::IQubit * getBackendQubitRef() const override
Definition StationaryQubit.cc:253
ComponentProvider class provides a way to access other quisp other modules.
Definition ComponentProvider.h:22
EigenvalueResult
Definition IQubit.h:17
Definition Application.cc:16