|
#define | DQCSIM_LOG(level, fmt, ...) |
| Convenience macro for calling log() with automatically determined filename and line number, but a dynamic loglevel (first argument). More...
|
|
#define | DQCSIM_TRACE(fmt, ...) DQCSIM_LOG(::dqcsim::wrap::Loglevel::Trace, fmt, ##__VA_ARGS__) |
| Convenience macro for calling log() with trace loglevel and automatically determined filename and line number. More...
|
|
#define | DQCSIM_DEBUG(fmt, ...) DQCSIM_LOG(::dqcsim::wrap::Loglevel::Debug, fmt, ##__VA_ARGS__) |
| Convenience macro for calling log() with debug loglevel and automatically determined filename and line number. More...
|
|
#define | DQCSIM_INFO(fmt, ...) DQCSIM_LOG(::dqcsim::wrap::Loglevel::Info, fmt, ##__VA_ARGS__) |
| Convenience macro for calling log() with info loglevel and automatically determined filename and line number. More...
|
|
#define | DQCSIM_NOTE(fmt, ...) DQCSIM_LOG(::dqcsim::wrap::Loglevel::Note, fmt, ##__VA_ARGS__) |
| Convenience macro for calling log() with note loglevel and automatically determined filename and line number. More...
|
|
#define | DQCSIM_WARN(fmt, ...) DQCSIM_LOG(::dqcsim::wrap::Loglevel::Warn, fmt, ##__VA_ARGS__) |
| Convenience macro for calling log() with warn loglevel and automatically determined filename and line number. More...
|
|
#define | DQCSIM_WARNING(fmt, ...) DQCSIM_LOG(::dqcsim::wrap::Loglevel::Warn, fmt, ##__VA_ARGS__) |
| Convenience macro for calling log() with warn loglevel and automatically determined filename and line number. More...
|
|
#define | DQCSIM_ERROR(fmt, ...) DQCSIM_LOG(::dqcsim::wrap::Loglevel::Error, fmt, ##__VA_ARGS__) |
| Convenience macro for calling log() with error loglevel and automatically determined filename and line number. More...
|
|
#define | DQCSIM_FATAL(fmt, ...) DQCSIM_LOG(::dqcsim::wrap::Loglevel::Fatal, fmt, ##__VA_ARGS__) |
| Convenience macro for calling log() with fatal loglevel and automatically determined filename and line number. More...
|
|
#define | ARB_BUILDER_SUBCLASS ArbData |
| Helper macro to prevent code repetition; not visible outside of the header.
|
|
#define | ARB_BUILDER_SUBCLASS ArbCmd |
| Helper macro to prevent code repetition; not visible outside of the header.
|
|
#define | ARB_BUILDER_SUBCLASS Gate |
| Helper macro to prevent code repetition; not visible outside of the header.
|
|
#define | ARB_BUILDER_SUBCLASS Measurement |
| Helper macro to prevent code repetition; not visible outside of the header.
|
|
#define | TRACE DQCSIM_TRACE |
| Convenience macro for calling log() with trace loglevel and automatically determined filename and line number. More...
|
|
#define | DEBUG DQCSIM_DEBUG |
| Convenience macro for calling log() with debug loglevel and automatically determined filename and line number. More...
|
|
#define | INFO DQCSIM_INFO |
| Convenience macro for calling log() with info loglevel and automatically determined filename and line number. More...
|
|
#define | NOTE DQCSIM_NOTE |
| Convenience macro for calling log() with note loglevel and automatically determined filename and line number. More...
|
|
#define | WARN DQCSIM_WARN |
| Convenience macro for calling log() with warn loglevel and automatically determined filename and line number. More...
|
|
#define | WARNING DQCSIM_WARNING |
| Convenience macro for calling log() with warn loglevel and automatically determined filename and line number. More...
|
|
#define | ERROR DQCSIM_ERROR |
| Convenience macro for calling log() with error loglevel and automatically determined filename and line number. More...
|
|
#define | FATAL DQCSIM_FATAL |
| Convenience macro for calling log() with fatal loglevel and automatically determined filename and line number. More...
|
|
#define | LOG DQCSIM_LOG |
| Convenience macro for calling log() with automatically determined filename and line number, but a dynamic loglevel (first argument). More...
|
|
|
using | dqcsim::wrap::HandleIndex = raw::dqcs_handle_t |
| C++-styled type name for raw::dqcs_handle_t . More...
|
|
using | dqcsim::wrap::QubitIndex = raw::dqcs_qubit_t |
| C++-styled type name for raw::dqcs_qubit_t . More...
|
|
using | dqcsim::wrap::Cycle = raw::dqcs_cycle_t |
| C++-styled type name for raw::dqcs_cycle_t . More...
|
|
using | dqcsim::wrap::complex = std::complex< double > |
| Typedef for the complex numbers used within the gate matrices.
|
|
typedef Callback< void, PluginState &, ArbCmdQueue && > | dqcsim::wrap::callback::Initialize |
| Callback wrapper specialized for the initialize callback.
|
|
typedef Callback< void, PluginState & > | dqcsim::wrap::callback::Drop |
| Callback wrapper specialized for the drop callback.
|
|
typedef Callback< ArbData, RunningPluginState &, ArbData && > | dqcsim::wrap::callback::Run |
| Callback wrapper specialized for the run callback.
|
|
typedef Callback< void, PluginState &, QubitSet &&, ArbCmdQueue && > | dqcsim::wrap::callback::Allocate |
| Callback wrapper specialized for the allocate callback.
|
|
typedef Callback< void, PluginState &, QubitSet && > | dqcsim::wrap::callback::Free |
| Callback wrapper specialized for the allocate callback.
|
|
typedef Callback< MeasurementSet, PluginState &, Gate && > | dqcsim::wrap::callback::Gate |
| Callback wrapper specialized for the gate callback.
|
|
typedef Callback< MeasurementSet, UpstreamPluginState &, Measurement && > | dqcsim::wrap::callback::ModifyMeasurement |
| Callback wrapper specialized for the modify_measurement callback.
|
|
typedef Callback< void, PluginState &, Cycle > | dqcsim::wrap::callback::Advance |
| Callback wrapper specialized for the advance callback.
|
|
typedef Callback< ArbData, PluginState &, ArbCmd > | dqcsim::wrap::callback::Arb |
| Callback wrapper specialized for the *_arb callbacks.
|
|
typedef Callback< void, std::string && > | dqcsim::wrap::callback::SpawnPlugin |
| Callback wrapper specialized for the manual plugin spawning callback.
|
|
typedef Callback< void, std::string &&, std::string &&, Loglevel, std::string &&, std::string &&, uint32_t, std::chrono::system_clock::time_point &&, uint32_t, uint64_t > | dqcsim::wrap::callback::Log |
| Callback wrapper specialized for the simulation logging callback. More...
|
|
|
enum | dqcsim::wrap::HandleType {
dqcsim::wrap::HandleType::ArbData = 100,
dqcsim::wrap::HandleType::ArbCmd = 101,
dqcsim::wrap::HandleType::ArbCmdQueue = 102,
dqcsim::wrap::HandleType::QubitSet = 103,
dqcsim::wrap::HandleType::Gate = 104,
dqcsim::wrap::HandleType::Measurement = 105,
dqcsim::wrap::HandleType::MeasurementSet = 106,
dqcsim::wrap::HandleType::Matrix = 107,
dqcsim::wrap::HandleType::GateMap = 108,
dqcsim::wrap::HandleType::FrontendProcessConfig = 200,
dqcsim::wrap::HandleType::OperatorProcessConfig = 201,
dqcsim::wrap::HandleType::BackendProcessConfig = 203,
dqcsim::wrap::HandleType::FrontendThreadConfig = 204,
dqcsim::wrap::HandleType::OperatorThreadConfig = 205,
dqcsim::wrap::HandleType::BackendThreadConfig = 206,
dqcsim::wrap::HandleType::SimulationConfig = 207,
dqcsim::wrap::HandleType::Simulation = 208,
dqcsim::wrap::HandleType::FrontendDefinition = 300,
dqcsim::wrap::HandleType::OperatorDefinition = 301,
dqcsim::wrap::HandleType::BackendDefinition = 302,
dqcsim::wrap::HandleType::PluginJoinHandle = 303
} |
| Represents the type of a raw handle. More...
|
|
enum | dqcsim::wrap::Loglevel {
dqcsim::wrap::Loglevel::Off = 0,
dqcsim::wrap::Loglevel::Fatal = 1,
dqcsim::wrap::Loglevel::Error = 2,
dqcsim::wrap::Loglevel::Warn = 3,
dqcsim::wrap::Loglevel::Note = 4,
dqcsim::wrap::Loglevel::Info = 5,
dqcsim::wrap::Loglevel::Debug = 6,
dqcsim::wrap::Loglevel::Trace = 7,
dqcsim::wrap::Loglevel::Pass = 8
} |
| Represents the loglevel of a message, a loglevel filter level, or one of the possible actions to take when a message is received from a plugin through stdout or stderr . More...
|
|
enum | dqcsim::wrap::MeasurementValue { dqcsim::wrap::MeasurementValue::Zero = 0,
dqcsim::wrap::MeasurementValue::One = 1,
dqcsim::wrap::MeasurementValue::Undefined = 2
} |
| Represents the result of a qubit measurement. More...
|
|
enum | dqcsim::wrap::PathStyle { dqcsim::wrap::PathStyle::Keep = 0,
dqcsim::wrap::PathStyle::Relative = 1,
dqcsim::wrap::PathStyle::Absolute = 2
} |
| Represents the possible options for dealing with paths when writing a reproduction file. More...
|
|
enum | dqcsim::wrap::PluginType { dqcsim::wrap::PluginType::Frontend = 0,
dqcsim::wrap::PluginType::Operator = 1,
dqcsim::wrap::PluginType::Backend = 2
} |
| Enumeration of the three types of plugins. More...
|
|
enum | dqcsim::wrap::GateType { dqcsim::wrap::GateType::Unitary = 1,
dqcsim::wrap::GateType::Measurement = 2,
dqcsim::wrap::GateType::Prep = 3,
dqcsim::wrap::GateType::Custom = 4
} |
| Enumeration of gate types supported by DQCsim. More...
|
|
enum | dqcsim::wrap::PauliBasis { dqcsim::wrap::PauliBasis::X = 1,
dqcsim::wrap::PauliBasis::Y = 2,
dqcsim::wrap::PauliBasis::Z = 3
} |
| Enumeration of Pauli bases. More...
|
|
enum | dqcsim::wrap::PredefinedGate {
dqcsim::wrap::PredefinedGate::I = 100,
dqcsim::wrap::PredefinedGate::X = 101,
dqcsim::wrap::PredefinedGate::Y = 102,
dqcsim::wrap::PredefinedGate::Z = 103,
dqcsim::wrap::PredefinedGate::H = 104,
dqcsim::wrap::PredefinedGate::S = 105,
dqcsim::wrap::PredefinedGate::S_DAG = 106,
dqcsim::wrap::PredefinedGate::T = 107,
dqcsim::wrap::PredefinedGate::T_DAG = 108,
dqcsim::wrap::PredefinedGate::RX_90 = 109,
dqcsim::wrap::PredefinedGate::RX_M90 = 110,
dqcsim::wrap::PredefinedGate::RX_180 = 111,
dqcsim::wrap::PredefinedGate::RY_90 = 112,
dqcsim::wrap::PredefinedGate::RY_M90 = 113,
dqcsim::wrap::PredefinedGate::RY_180 = 114,
dqcsim::wrap::PredefinedGate::RZ_90 = 115,
dqcsim::wrap::PredefinedGate::RZ_M90 = 116,
dqcsim::wrap::PredefinedGate::RZ_180 = 117,
dqcsim::wrap::PredefinedGate::RX = 150,
dqcsim::wrap::PredefinedGate::RY = 151,
dqcsim::wrap::PredefinedGate::RZ = 152,
dqcsim::wrap::PredefinedGate::PhaseK = 153,
dqcsim::wrap::PredefinedGate::Phase = 154,
dqcsim::wrap::PredefinedGate::U1 = 190,
dqcsim::wrap::PredefinedGate::R = 191,
dqcsim::wrap::PredefinedGate::Swap = 200,
dqcsim::wrap::PredefinedGate::SqSwap = 201,
dqcsim::wrap::PredefinedGate::U2 = 290,
dqcsim::wrap::PredefinedGate::U3 = 390
} |
| Enumeration of unitary gates defined by DQCsim. More...
|
|
|
void | dqcsim::wrap::check (raw::dqcs_return_t code) |
| Checks a dqcs_return_t return value; if failure, throws a runtime error with DQCsim's error message. More...
|
|
bool | dqcsim::wrap::check (raw::dqcs_bool_return_t code) |
| Checks a dqcs_bool_return_t return value; if failure, throws a runtime error with DQCsim's error message. More...
|
|
unsigned long long | dqcsim::wrap::check (unsigned long long handle) |
| Checks a dqcs_handle_t or dqcs_qubit_t return value; if failure, throws a runtime error with DQCsim's error message. More...
|
|
Cycle | dqcsim::wrap::check (Cycle cycle) |
| Checks a dqcs_cycle_t return value; if failure, throws a runtime error with DQCsim's error message. More...
|
|
size_t | dqcsim::wrap::check (ssize_t size) |
| Checks a size return value; if failure, throws a runtime error with DQCsim's error message. More...
|
|
double | dqcsim::wrap::check (double value) |
| Checks a double return value from dqcs_pcfg_*_timeout_get() ; if failure, throws a runtime error with DQCsim's error message. More...
|
|
raw::dqcs_handle_type_t | dqcsim::wrap::to_raw (HandleType type) noexcept |
| Converts a HandleType to its raw C enum. More...
|
|
HandleType | dqcsim::wrap::check (raw::dqcs_handle_type_t type) |
| Checks a dqcs_handle_type_t return value and converts it to its C++ enum representation; if failure, throws a runtime error with DQCsim's error message. More...
|
|
raw::dqcs_loglevel_t | dqcsim::wrap::to_raw (Loglevel loglevel) noexcept |
| Converts a Loglevel to its raw C enum. More...
|
|
Loglevel | dqcsim::wrap::check (raw::dqcs_loglevel_t loglevel) |
| Checks a dqcs_loglevel_t return value and converts it to its C++ enum representation; if failure, throws a runtime error with DQCsim's error message. More...
|
|
raw::dqcs_measurement_t | dqcsim::wrap::to_raw (MeasurementValue measurement) noexcept |
| Converts a MeasurementValue to its raw C enum. More...
|
|
MeasurementValue | dqcsim::wrap::check (raw::dqcs_measurement_t measurement) |
| Checks a dqcs_measurement_t return value and converts it to its C++ enum representation; if failure, throws a runtime error with DQCsim's error message. More...
|
|
raw::dqcs_path_style_t | dqcsim::wrap::to_raw (PathStyle style) noexcept |
| Converts a PathStyle to its raw C enum. More...
|
|
PathStyle | dqcsim::wrap::check (raw::dqcs_path_style_t style) |
| Checks a dqcs_path_style_t return value and converts it to its C++ enum representation; if failure, throws a runtime error with DQCsim's error message. More...
|
|
raw::dqcs_plugin_type_t | dqcsim::wrap::to_raw (PluginType type) noexcept |
| Converts a PluginType to its raw C enum. More...
|
|
PluginType | dqcsim::wrap::check (raw::dqcs_plugin_type_t type) |
| Checks a dqcs_plugin_type_t return value and converts it to its C++ enum representation; if failure, throws a runtime error with DQCsim's error message. More...
|
|
raw::dqcs_gate_type_t | dqcsim::wrap::to_raw (GateType type) noexcept |
| Converts a GateType to its raw C enum. More...
|
|
GateType | dqcsim::wrap::check (raw::dqcs_gate_type_t type) |
| Checks a dqcs_gate_type_t return value and converts it to its C++ enum representation; if failure, throws a runtime error with DQCsim's error message. More...
|
|
raw::dqcs_basis_t | dqcsim::wrap::to_raw (PauliBasis type) noexcept |
| Converts a PauliBasis to its raw C enum. More...
|
|
PauliBasis | dqcsim::wrap::check (raw::dqcs_basis_t type) |
| Checks a dqcs_basis_t return value and converts it to its C++ enum representation; if failure, throws a runtime error with DQCsim's error message. More...
|
|
raw::dqcs_predefined_gate_t | dqcsim::wrap::to_raw (PredefinedGate type) noexcept |
| Converts a PredefinedGate to its raw C enum. More...
|
|
PredefinedGate | dqcsim::wrap::check (raw::dqcs_predefined_gate_t type) |
| Checks a dqcs_predefined_gate_t return value and converts it to its C++ enum representation; if failure, throws a runtime error with DQCsim's error message. More...
|
|
template<typename T > |
T * | dqcsim::wrap::check (T *pointer) |
| Checks a pointer return value; if failure, throws a runtime error with DQCsim's error message. More...
|
|
template<typename... Args> |
void | dqcsim::wrap::log (wrap::Loglevel level, const std::string &module, const std::string &file, unsigned int line_nr, const std::string &format, Args... args) noexcept |
| Shim around the dqcs_log_format C API using std::string for the strings. More...
|
|
bool | dqcsim::wrap::log_raw (wrap::Loglevel level, const std::string &module, const std::string &file, unsigned int line_nr, const std::string &message) noexcept |
| Shim around the dqcs_log_raw C API using std::string for the strings. More...
|
|
QubitRef | dqcsim::wrap::operator""_q (unsigned long long int qubit) |
| Literal operator for qubits, so for instance 15_q returns qubit 15.
|
|
PluginConfigurationBuilder | dqcsim::wrap::Frontend (const std::string &name="") noexcept |
| Shorthand for constructing a frontend plugin configuration builder. More...
|
|
PluginConfigurationBuilder | dqcsim::wrap::Operator (const std::string &name="") noexcept |
| Shorthand for constructing an operator plugin configuration builder. More...
|
|
PluginConfigurationBuilder | dqcsim::wrap::Backend (const std::string &name="") noexcept |
| Shorthand for constructing a backend plugin configuration builder. More...
|
|
Provides DQCsim's entire C++ API.
This is the main file you should be including in pure C++ projects:
It should be installed into /usr/include
by installing the DQCsim Python module using pip
as root. If you're pulling DQCsim in through CMake instead, the appropriate include path should be added to your project automatically.
Definition in file dqcsim.