Template Class QubitRegister¶
Defined in File qureg.hpp
Inheritance Relationships¶
Derived Types¶
public NoisyQureg< Type >
(Template Class NoisyQureg)public QubitRegisterMetric< Type >
(Template Class QubitRegisterMetric)
Class Documentation¶
-
template<class
Type
= ComplexDP>
classQubitRegister
¶ Subclassed by NoisyQureg< Type >, QubitRegisterMetric< Type >
Public Functions
-
QubitRegister
()¶
-
QubitRegister
(std::size_t num_qubits, std::string style = "", std::size_t base_index = 0, std::size_t tmp_spacesize_ = 0)¶
-
QubitRegister
(const QubitRegister &in)¶
-
~QubitRegister
()¶
-
void
AllocateAdditionalQubit
()¶
-
void
Allocate
(std::size_t new_num_qubits, std::size_t tmp_spacesize_)¶
-
void
Initialize
(std::size_t new_num_qubits, std::size_t tmp_spacesize_)¶
-
void
Initialize
(std::string style, std::size_t base_index)¶
-
std::size_t
LocalSize
() const¶
-
std::size_t
GlobalSize
() const¶
-
void
Resize
(std::size_t new_num_amplitudes)¶
-
std::size_t
size
() const¶
-
std::size_t
NumQubits
() const¶
-
size_t
TmpSize
() const¶
-
bool
check_bit
(std::size_t variable, std::size_t position) const¶
-
std::size_t
set_bit
(std::size_t variable, std::size_t position) const¶
-
std::size_t
clear_bit
(std::size_t variable, std::size_t position) const¶
-
void
EnableStatistics
()¶
-
void
GetStatistics
()¶
-
void
DisableStatistics
()¶
-
void
ResetStatistics
()¶
-
void
Permute
(std::vector<std::size_t> permutation_new_vec)¶
-
bool
Apply1QubitGate_helper
(unsigned qubit, TM2x2<Type> const &m, std::size_t sstate_ind, std::size_t estate_ind)¶
-
bool
ApplyControlled1QubitGate_helper
(unsigned control_qubit, unsigned target_qubit, TM2x2<Type> const &m, std::size_t sind, std::size_t eind)¶
-
void
ApplyControlled1QubitGate
(unsigned control_qubit, unsigned target_qubit, TM2x2<Type> const &m)¶
-
void
ApplySwap
(unsigned qubit1, unsigned qubit2)¶
-
void
ApplyISwap
(unsigned qubit1, unsigned qubit2)¶
-
void
Apply4thRootISwap
(unsigned qubit1, unsigned qubit2)¶
-
void
ApplySqrtISwap
(unsigned qubit1, unsigned qubit2)¶
-
void
Swap
(unsigned b1, unsigned b2)¶
-
void
ApplyPauliX
(unsigned const qubit)¶
-
void
ApplyPauliY
(unsigned const qubit)¶
-
void
ApplyPauliZ
(unsigned const qubit)¶
-
void
ApplyPauliSqrtX
(unsigned const qubit)¶
-
void
ApplyPauliSqrtY
(unsigned const qubit)¶
-
void
ApplyPauliSqrtZ
(unsigned const qubit)¶
-
void
ApplyT
(unsigned const qubit)¶
-
void
ApplyToffoli
(unsigned const qubit1, unsigned const qubit2, unsigned const qubit3)¶
-
void
ApplyHadamard
(unsigned const qubit)¶
-
void
ApplyCPauliX
(unsigned const control_qubit, unsigned const target_qubit)¶
-
void
ApplyCPauliY
(unsigned const control_qubit, unsigned const target_qubit)¶
-
void
ApplyCPauliZ
(unsigned const control_qubit, unsigned const target_qubit)¶
-
void
ApplyCPauliSqrtZ
(unsigned const control_qubit, unsigned const target_qubit)¶
-
void
ApplyCHadamard
(unsigned const control_qubit, unsigned const target_qubit)¶
-
void
TurnOnFusion
(unsigned log2llc = 20)¶
-
void
TurnOffFusion
()¶
-
bool
IsFusionEnabled
()¶
-
void
ApplyFusedGates
()¶
-
void
TurnOnSpecialize
()¶
-
void
TurnOffSpecialize
()¶
-
void
CollapseQubit
(unsigned qubit, bool value)¶
-
BaseType
ExpectationValue
(std::vector<unsigned> &qubits, std::vector<unsigned> &observables, BaseType coeff = 1.)¶
-
bool
operator==
(const QubitRegister &rhs)¶
-
BaseType
MaxAbsDiff
(QubitRegister &x, Type sfactor = Type(1.0, 0.))¶
-
BaseType
MaxL2NormDiff
(QubitRegister &x)¶
-
void
dumpbin
(std::string fn)¶
-
double
Entropy
()¶
-
std::vector<double>
GoogleStats
()¶
-
void
Normalize
()¶
-
Type
ComputeOverlap
(QubitRegister<Type> &psi)¶
-
void
Print
(std::string x, std::vector<std::size_t> qbits = {})¶
-
qhipster::RandomNumberGenerator<BaseType> *
GetRngPtr
()¶
-
void
ResetRngPtr
()¶
-
void
SetRngPtr
(qhipster::RandomNumberGenerator<BaseType> *rng_ptr)¶
-
void
SetSeedRngPtr
(std::size_t seed)¶
Public Members
-
std::size_t
num_qubits
¶
-
std::vector<Type, qhipster::AlignedAllocator<Type, 256>>
state_storage
¶
-
Permutation *
permutation
¶
-
GateCounter *
gate_counter
¶
-
std::size_t
llc_watermarkbit
¶
-
bool
imported_state
¶
-
bool
specialize
¶
-
bool
fusion
¶
-
unsigned
log2llc
¶
Public Static Functions
-
void
SetDoPrintExtraInfo
(bool value)¶
-