Base class for all noise models, derive your particular noise model.
More...
#include <classes/noise.h>
|
template<typename U = noise_type> |
| NoiseBase (const std::vector< cmat > &Ks, typename std::enable_if< std::is_same< NoiseType::StateDependent, U >::value >::type *=nullptr) |
| Constructs a noise instance for StateDependent noise type. More...
|
|
template<typename U = noise_type> |
| NoiseBase (const std::vector< cmat > &Ks, const std::vector< double > &probs, typename std::enable_if< std::is_same< NoiseType::StateIndependent, U >::value >::type *=nullptr) |
| Constructs a noise instance for StateIndependent noise type. More...
|
|
virtual | ~NoiseBase ()=default |
| Default virtual destructor. More...
|
|
idx | get_d () const noexcept |
| Qudit dimension. More...
|
|
std::vector< cmat > | get_Ks () const |
| Vector of noise operators. More...
|
|
std::vector< double > | get_probs () const |
| Vector of probabilities corresponding to each noise operator. More...
|
|
idx | get_last_idx () const |
| Index of the last occurring noise element. More...
|
|
double | get_last_p () const |
| Probability of the last occurring noise element. More...
|
|
cmat | get_last_K () const |
| Last occurring noise element. More...
|
|
virtual cmat | operator() (const cmat &state) const |
| Function invocation operator, applies the underlying noise model on the state vector or density matrix state. More...
|
|
virtual cmat | operator() (const cmat &state, idx target) const |
| Function invocation operator, applies the underlying noise model on qudit target of the multi-partite state vector or density matrix state. More...
|
|
virtual cmat | operator() (const cmat &state, const std::vector< idx > &target) const |
| Function invocation operator, applies the underlying correlated noise model on qudits specified by target of the multi-partite state vector or density matrix state. More...
|
|
|
void | compute_probs_ (const cmat &state, const std::vector< idx > &target) const |
| Compute probability outcomes for StateDependent noise type, otherwise returns without performing any operation (no-op) More...
|
|
cmat | compute_state_ (const cmat &state, const std::vector< idx > &target) const |
| Compute the resulting state after the noise was applied. More...
|
|
template<class T>
class qpp::NoiseBase< T >
Base class for all noise models, derive your particular noise model.
◆ noise_type
◆ NoiseBase() [1/2]
template<class T>
template<typename U = noise_type>
Constructs a noise instance for StateDependent noise type.
- Note
- SFINAEd-out for StateIndependent noise
- Parameters
-
A | Eigen expression (state vector or density matrix) |
Ks | Vector of noise (Kraus) operators that specify the noise |
d | Subsystem dimension |
◆ NoiseBase() [2/2]
template<class T>
template<typename U = noise_type>
Constructs a noise instance for StateIndependent noise type.
- Note
- SFINAEd-out for StateDependent noise
- Parameters
-
A | Eigen expression (state vector or density matrix) |
Ks | Vector of noise (Kraus) operators that specify the noise |
d | Subsystem dimension |
◆ ~NoiseBase()
Default virtual destructor.
◆ compute_probs_()
Compute probability outcomes for StateDependent noise type, otherwise returns without performing any operation (no-op)
- Parameters
-
state | State vector or density matrix |
target | Qudit indexes where the noise is applied |
◆ compute_state_()
Compute the resulting state after the noise was applied.
- Parameters
-
state | State vector or density matrix |
target | Qudit indexes where the noise is applied |
- Returns
- Resulting state after the noise was applied
◆ get_d()
Qudit dimension.
- Returns
- Qudit dimension
◆ get_Ks()
Vector of noise operators.
- Returns
- Vector of noise operators
◆ get_last_idx()
Index of the last occurring noise element.
- Returns
- Index of the last occurring noise element
◆ get_last_K()
Last occurring noise element.
- Returns
- Last occurring noise element
◆ get_last_p()
Probability of the last occurring noise element.
- Returns
- Probability of the last occurring noise element
◆ get_probs()
Vector of probabilities corresponding to each noise operator.
- Returns
- Probability vector
◆ operator()() [1/3]
Function invocation operator, applies the underlying noise model on the state vector or density matrix state.
- Parameters
-
state | State vector or density matrix |
- Returns
- Resulting state vector or density matrix
◆ operator()() [2/3]
Function invocation operator, applies the underlying noise model on qudit target of the multi-partite state vector or density matrix state.
- Parameters
-
state | Multi-partite state vector or density matrix |
target | Qudit index where the noise is applied |
- Returns
- Resulting state vector or density matrix
◆ operator()() [3/3]
Function invocation operator, applies the underlying correlated noise model on qudits specified by target of the multi-partite state vector or density matrix state.
- Parameters
-
state | Multi-partite state vector or density matrix |
target | Qudit indexes where the correlated noise is applied |
- Returns
- Resulting state vector or density matrix
◆ d_
◆ generated_
invoked, or if the noise is state-independent
set to true after compute_state_() is
◆ i_
index of the last occurring noise element
◆ Ks_
◆ probs_
The documentation for this class was generated from the following file: