Quantum++  v1.0-rc4
A modern C++11 quantum computing library
qpp::experimental::Bit_circuit Class Reference

#include <experimental/experimental.h>

Inheritance diagram for qpp::experimental::Bit_circuit:
Collaboration diagram for qpp::experimental::Bit_circuit:

Classes

struct  Gate_count
 

Public Member Functions

Bit_circuitX (idx pos)
 
Bit_circuitNOT (idx pos)
 
Bit_circuitCNOT (const std::vector< idx > &pos)
 
Bit_circuitTOF (const std::vector< idx > &pos)
 
Bit_circuitSWAP (const std::vector< idx > &pos)
 
Bit_circuitFRED (const std::vector< idx > &pos)
 
Bit_circuitreset () noexcept
 
- Public Member Functions inherited from qpp::experimental::Dynamic_bitset
 Dynamic_bitset (idx N)
 Constructor, initializes all bits to false (zero) More...
 
const storage_typedata () 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_bitsetset (idx pos, bool value=true)
 
Dynamic_bitsetset () noexcept
 
Dynamic_bitsetrand (idx pos, double p=0.5)
 
Dynamic_bitsetrand (double p=0.5)
 
Dynamic_bitsetreset (idx pos)
 
Dynamic_bitsetreset () noexcept
 
Dynamic_bitsetflip (idx pos)
 
Dynamic_bitsetflip () 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

- Public Types inherited from qpp::experimental::Dynamic_bitset
using value_type = unsigned int
 Type of the storage elements. More...
 
using storage_type = std::vector< value_type >
 Type of the storage. More...
 
- Protected Member Functions inherited from qpp::experimental::Dynamic_bitset
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...
 
- Protected Attributes inherited from qpp::experimental::Dynamic_bitset
idx storage_size_
 Storage size. More...
 
idx N_
 Number of bits. More...
 
std::vector< value_typev_
 Storage space. More...
 

Member Function Documentation

◆ CNOT()

Bit_circuit& qpp::experimental::Bit_circuit::CNOT ( const std::vector< idx > &  pos)
inline

◆ FRED()

Bit_circuit& qpp::experimental::Bit_circuit::FRED ( const std::vector< idx > &  pos)
inline

◆ NOT()

Bit_circuit& qpp::experimental::Bit_circuit::NOT ( idx  pos)
inline

◆ reset()

Bit_circuit& qpp::experimental::Bit_circuit::reset ( )
inlinenoexcept

◆ SWAP()

Bit_circuit& qpp::experimental::Bit_circuit::SWAP ( const std::vector< idx > &  pos)
inline

◆ TOF()

Bit_circuit& qpp::experimental::Bit_circuit::TOF ( const std::vector< idx > &  pos)
inline

◆ X()

Bit_circuit& qpp::experimental::Bit_circuit::X ( idx  pos)
inline

Member Data Documentation

◆ gate_count

struct qpp::experimental::Bit_circuit::Gate_count qpp::experimental::Bit_circuit::gate_count

The documentation for this class was generated from the following file: