|
| Bit_circuit (const Dynamic_bitset &dynamic_bitset) |
| Conversion constructor, used to initialize a qpp::Bit_circuit with a qpp::Dynamic_bitset. More...
|
|
Bit_circuit & | X (idx pos) |
| Bit flip. More...
|
|
Bit_circuit & | NOT (idx pos) |
| Bit flip. More...
|
|
Bit_circuit & | CNOT (const std::vector< idx > &pos) |
| Controlled-NOT. More...
|
|
Bit_circuit & | TOF (const std::vector< idx > &pos) |
| Toffoli gate. More...
|
|
Bit_circuit & | SWAP (const std::vector< idx > &pos) |
| Swap bits. More...
|
|
Bit_circuit & | FRED (const std::vector< idx > &pos) |
| Fredkin gate (Controlled-SWAP) More...
|
|
Bit_circuit & | reset () noexcept |
| Reset the circuit all zero, clear all gates. More...
|
|
| 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 noexcept |
| Number of bits stored in the bitset. More...
|
|
idx | storage_size () const noexcept |
| Size of the underlying storage space (in units of value_type, unsigned int by default) More...
|
|
idx | count () const noexcept |
| Number of bits set to one in the bitset (Hamming weight) More...
|
|
bool | get (idx pos) const noexcept |
| The value of the bit at position pos. More...
|
|
bool | none () const noexcept |
| Checks whether none of the bits are set. More...
|
|
bool | all () const noexcept |
| Checks whether all bits are set. More...
|
|
bool | any () const noexcept |
| Checks whether any bit is set. More...
|
|
Dynamic_bitset & | set (idx pos, bool value=true) |
| Sets the bit at position pos. More...
|
|
Dynamic_bitset & | set () noexcept |
| Set all bits to true. More...
|
|
Dynamic_bitset & | rand (idx pos, double p=0.5) |
| Sets the bit at position pos according to a Bernoulli(p) distribution. More...
|
|
Dynamic_bitset & | rand (double p=0.5) |
| Sets all bits according to a Bernoulli(p) distribution. More...
|
|
Dynamic_bitset & | reset (idx pos) |
| Sets the bit at position pos to false. More...
|
|
Dynamic_bitset & | reset () noexcept |
| Sets all bits to false. More...
|
|
Dynamic_bitset & | flip (idx pos) |
| Flips the bit at position pos. More...
|
|
Dynamic_bitset & | flip () noexcept |
| Flips all bits. More...
|
|
bool | operator== (const Dynamic_bitset &rhs) const noexcept |
| Equality operator. More...
|
|
bool | operator!= (const Dynamic_bitset &rhs) const noexcept |
| Inequality operator. More...
|
|
idx | operator- (const Dynamic_bitset &rhs) const noexcept |
| Number of places the two bitsets differ (Hamming distance) More...
|
|
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 |
| String representation. More...
|
|
| IDisplay ()=default |
| Default constructor. More...
|
|
| IDisplay (const IDisplay &)=default |
| Default copy constructor. More...
|
|
| IDisplay (IDisplay &&)=default |
| Default move constructor. More...
|
|
IDisplay & | operator= (const IDisplay &)=default |
| Default copy assignment operator. More...
|
|
IDisplay & | operator= (IDisplay &&)=default |
| Default move assignment operator. More...
|
|
virtual | ~IDisplay ()=default |
| Default virtual destructor. More...
|
|
Classical reversible circuit simulator.