|
libqasm
library for handling cQASM files
|
Defines primitive types for use in trees generated by tree-gen. More...
Go to the source code of this file.
Classes | |
| class | cqasm::v1::primitives::Matrix< T > |
| Two-dimensional matrix of some kind of type. More... | |
Namespaces | |
| cqasm | |
| Toplevel namespace with entry points for the new API. | |
| cqasm::v1 | |
| Namespace for the "new" cQASM 1.x API. | |
| cqasm::v1::primitives | |
| Namespace for the primitive types used in trees generated by tree-gen. | |
Typedefs | |
| using | cqasm::v1::primitives::Str = std::string |
| String primitive used within the AST and semantic trees. More... | |
| using | cqasm::v1::primitives::Bool = bool |
| Boolean primitive used within the semantic trees. More... | |
| using | cqasm::v1::primitives::Int = std::int64_t |
| Integer primitive used within the AST and semantic trees. More... | |
| using | cqasm::v1::primitives::Real = double |
| Real number primitive used within the AST and semantic trees. More... | |
| using | cqasm::v1::primitives::Complex = std::complex< double > |
| Complex number primitive used within the semantic trees. More... | |
| using | cqasm::v1::primitives::RMatrix = Matrix< Real > |
| Matrix of real numbers. More... | |
| using | cqasm::v1::primitives::CMatrix = Matrix< Complex > |
| Matrix of complex numbers. More... | |
| using | cqasm::v1::primitives::Version = version::Version |
| Version number primitive used within the AST and semantic trees. More... | |
Enumerations | |
| enum | cqasm::v1::primitives::Axis { cqasm::v1::primitives::Axis::X, cqasm::v1::primitives::Axis::Y, cqasm::v1::primitives::Axis::Z } |
| Axis primitive used within the semantic trees. More... | |
Functions | |
| template<class T > | |
| T | cqasm::v1::primitives::initialize () |
| Generates a default value for the given primitive type. More... | |
| template<typename T > | |
| void | cqasm::v1::primitives::serialize (const T &obj, ::tree::cbor::MapWriter &map) |
| Serializes the given primitive object to CBOR. More... | |
| template<typename T > | |
| T | cqasm::v1::primitives::deserialize (const ::tree::cbor::MapReader &map) |
| Deserializes the given primitive object from CBOR. More... | |
| template<> | |
| Str | cqasm::v1::primitives::initialize< Str > () |
| template<> | |
| void | cqasm::v1::primitives::serialize (const Str &obj, ::tree::cbor::MapWriter &map) |
| template<> | |
| Str | cqasm::v1::primitives::deserialize (const ::tree::cbor::MapReader &map) |
| Deserializes the given primitive object from CBOR. More... | |
| template<> | |
| Bool | cqasm::v1::primitives::initialize< Bool > () |
| template<> | |
| void | cqasm::v1::primitives::serialize (const Bool &obj, ::tree::cbor::MapWriter &map) |
| template<> | |
| Bool | cqasm::v1::primitives::deserialize (const ::tree::cbor::MapReader &map) |
| Deserializes the given primitive object from CBOR. More... | |
| template<> | |
| Axis | cqasm::v1::primitives::initialize< Axis > () |
| template<> | |
| void | cqasm::v1::primitives::serialize (const Axis &obj, ::tree::cbor::MapWriter &map) |
| template<> | |
| Axis | cqasm::v1::primitives::deserialize (const ::tree::cbor::MapReader &map) |
| Deserializes the given primitive object from CBOR. More... | |
| template<> | |
| Int | cqasm::v1::primitives::initialize< Int > () |
| template<> | |
| void | cqasm::v1::primitives::serialize (const Int &obj, ::tree::cbor::MapWriter &map) |
| template<> | |
| Int | cqasm::v1::primitives::deserialize (const ::tree::cbor::MapReader &map) |
| Deserializes the given primitive object from CBOR. More... | |
| template<> | |
| Real | cqasm::v1::primitives::initialize< Real > () |
| template<> | |
| void | cqasm::v1::primitives::serialize (const Real &obj, ::tree::cbor::MapWriter &map) |
| template<> | |
| Real | cqasm::v1::primitives::deserialize (const ::tree::cbor::MapReader &map) |
| Deserializes the given primitive object from CBOR. More... | |
| template<> | |
| void | cqasm::v1::primitives::serialize (const Complex &obj, ::tree::cbor::MapWriter &map) |
| template<> | |
| Complex | cqasm::v1::primitives::deserialize (const ::tree::cbor::MapReader &map) |
| Deserializes the given primitive object from CBOR. More... | |
| template<> | |
| void | cqasm::v1::primitives::serialize (const RMatrix &obj, ::tree::cbor::MapWriter &map) |
| template<> | |
| RMatrix | cqasm::v1::primitives::deserialize (const ::tree::cbor::MapReader &map) |
| Deserializes the given primitive object from CBOR. More... | |
| template<> | |
| void | cqasm::v1::primitives::serialize (const CMatrix &obj, ::tree::cbor::MapWriter &map) |
| template<> | |
| CMatrix | cqasm::v1::primitives::deserialize (const ::tree::cbor::MapReader &map) |
| Deserializes the given primitive object from CBOR. More... | |
| template<> | |
| void | cqasm::v1::primitives::serialize (const Version &obj, ::tree::cbor::MapWriter &map) |
| template<> | |
| Version | cqasm::v1::primitives::deserialize (const ::tree::cbor::MapReader &map) |
| Deserializes the given primitive object from CBOR. More... | |
| std::ostream & | cqasm::v1::primitives::operator<< (std::ostream &os, const Axis &axis) |
| Stream << overload for axis nodes. More... | |
| template<typename T > | |
| std::ostream & | cqasm::v1::primitives::operator<< (std::ostream &os, const Matrix< T > &mat) |
| Stream << overload for matrix nodes. More... | |
Defines primitive types for use in trees generated by tree-gen.
Definition in file cqasm-v1-primitives.hpp.
#include <string>#include <cstdint>#include <complex>#include <vector>#include "cqasm-version.hpp"#include "tree-cbor.hpp"

1.8.13