Template Class NoisyQureg¶
Defined in File NoisyQureg.hpp
Inheritance Relationships¶
Base Type¶
public QubitRegister< Type >
(Template Class QubitRegister)
Class Documentation¶
-
template<class
Type
= ComplexDP>
classNoisyQureg
: public QubitRegister<Type>¶ Class that expand
QubitRegister
states by adding noise between “logical” gates.- Parameters
num_qubit
: is the number of qubits When we refer to ``experimental’’ gates, it means that noise gates are excluded. For the simulation to be faithful (i.e. with one-to-one correspondence with the experimental gates), we include among the experimental gates both the gates for the algorithm and those to schedule it according to the connectivity of the specific hardware.
Public Functions
-
NoisyQureg
(unsigned num_qubits, unsigned RNG_seed = 12345, BaseType T1 = 2000, BaseType T2 = 1000)¶ Constructor.
-
~NoisyQureg
()¶ Default destructor.
-
void
Initialize
(std::string style, std::size_t base_index)¶
-
void
ResetTimeForAllQubits
()¶ Reset to zero the time elapsed for each and every qubit in the register.
-
void
ApplyNoiseGatesOnAllQubits
()¶ Apply the noise gates on each and every qubit. Then reset to time counter.
This is useful, for example, at the end of a circuit before measuring the quantities of interest: One has to apply the noise corresponding to the idle evolution between the last logical gate and the final time. The time from last logical gate is then resetted to zero for every qubit.
-
void
SetDecoherenceTime
(BaseType, BaseType)¶ Set the decoherence time in terms of T_1 and T_2 values (in accordance to the new noise model).
-
void
SetGateDurations
(BaseType, BaseType)¶ Update the duration of single- and two- qubit gates.
-
unsigned
GetTotalExperimentalGateCount
()¶ Return the current number of (experimental) 1- and 2-qubit gates.
-
unsigned
GetOneQubitExperimentalGateCount
()¶ Return the current number of (experimental) single-qubit gates.
-
unsigned
GetTwoQubitExperimentalGateCount
()¶ Return the current number of (experimental) two-qubit gates.
-
std::vector<unsigned>
GetExperimentalGateCount
(unsigned q1)¶ Return the number of (experimental) gates involving qubit q.
-
unsigned
GetExperimentalGateCount
(unsigned q1, unsigned q2)¶ Return the number of (experimental) gates involving qubits q1,q2.
-
void
AddNoiseOneQubitGate
(unsigned const)¶ Include and execute the noise gate corresponding to the idle time of a single qubit.
-
void
AddNoiseTwoQubitGate
(unsigned const, unsigned const)¶ Include and execute the noise gate corresponding to the idle time of two qubits.
-
void
NoiseGate
(unsigned const)¶ Noise gate corresponding to single-qubit rotation with appropriate (stochastic) angle.
Each noise gate is the product of three rotations around X,Y,Z axis (by a small angle each). We compute their product before applying it to the quantum register.
-
void
NoiseGate_OLD
(unsigned const)¶ Noise gate corresponding to single-qubit rotation with appropriate (stochastic) angle.
** OLD OLD OLD OLD OLD OLD **
Kept for historical reasons, it shouldy be deletead.
To obtain a single rotation around an arbitrary axis we use the relations: | a b c | | h-f | R = | d e f | > u = | c-g | > abs(u) = 2 sin( ‘angle’ ) | g h i | | d-b | > u/abs(u) = rotation axis
-
void
Apply1QubitGate
(unsigned const, qhipster::TinyMatrix<Type, 2, 2, 32>)¶
-
void
ApplyHadamard
(unsigned const)¶
-
void
ApplyRotationX
(unsigned const, BaseType)¶
-
void
ApplyRotationY
(unsigned const, BaseType)¶
-
void
ApplyRotationZ
(unsigned const, BaseType)¶
-
void
ApplyCPauliX
(unsigned const, unsigned const)¶
-
void
ApplyControlled1QubitGate
(unsigned const, unsigned const, qhipster::TinyMatrix<Type, 2, 2, 32>)¶