Quantum++
v1.0-rc4
A modern C++11 quantum computing library
|
#include <experimental/experimental.h>
Classes | |
struct | Gate_count |
Public Member Functions | |
Bit_circuit & | X (idx pos) |
Bit_circuit & | NOT (idx pos) |
Bit_circuit & | CNOT (const std::vector< idx > &pos) |
Bit_circuit & | TOF (const std::vector< idx > &pos) |
Bit_circuit & | SWAP (const std::vector< idx > &pos) |
Bit_circuit & | FRED (const std::vector< idx > &pos) |
Bit_circuit & | reset () noexcept |
![]() | |
Dynamic_bitset (idx N) | |
Constructor, initializes all bits to false (zero) More... | |
const storage_type & | data () const |
Raw storage space of the bitset. More... | |
idx | size () const |
Number of bits stored in the bitset. More... | |
idx | storage_size () const |
Size of the underlying storage space (in units of value_type, unsigned int by default) More... | |
idx | count () const noexcept |
bool | get (idx pos) const |
bool | none () const noexcept |
bool | all () const noexcept |
bool | any () const noexcept |
Dynamic_bitset & | set (idx pos, bool value=true) |
Dynamic_bitset & | set () noexcept |
Dynamic_bitset & | rand (idx pos, double p=0.5) |
Dynamic_bitset & | rand (double p=0.5) |
Dynamic_bitset & | reset (idx pos) |
Dynamic_bitset & | reset () noexcept |
Dynamic_bitset & | flip (idx pos) |
Dynamic_bitset & | flip () noexcept |
bool | operator== (const Dynamic_bitset &rhs) const noexcept |
bool | operator!= (const Dynamic_bitset &rhs) const noexcept |
template<class CharT = char, class Traits = std::char_traits<CharT>, class Allocator = std::allocator<CharT>> | |
std::basic_string< CharT, Traits, Allocator > | to_string (CharT zero=CharT('0'), CharT one=CharT('1')) const |
Public Attributes | |
struct qpp::experimental::Bit_circuit::Gate_count | gate_count |
Additional Inherited Members | |
![]() | |
using | value_type = unsigned int |
Type of the storage elements. More... | |
using | storage_type = std::vector< value_type > |
Type of the storage. More... | |
![]() | |
idx | index_ (idx pos) const |
Index of the pos bit in the storage space. More... | |
idx | offset_ (idx pos) const |
Offset of the pos bit in the storage space relative to its index. More... | |
![]() | |
idx | storage_size_ |
Storage size. More... | |
idx | N_ |
Number of bits. More... | |
std::vector< value_type > | v_ |
Storage space. More... | |
|
inline |
|
inline |
|
inline |
|
inlinenoexcept |
|
inline |
|
inline |
|
inline |
struct qpp::experimental::Bit_circuit::Gate_count qpp::experimental::Bit_circuit::gate_count |