|
Maestro 0.1.0
Unified interface for quantum circuit simulation
|
Condition that checks if the bits are equal to a given value. More...
#include <Conditional.h>
Public Member Functions | |
| EqualCondition (const std::vector< size_t > &ind, const std::vector< bool > &b) | |
| Construct a new EqualCondition object. | |
| bool | IsConditionMet (OperationState &state) const override |
| Check if the condition is met. | |
| const std::vector< bool > & | GetAllBits () const |
| Get the values to compare the bits to. | |
| void | SetBits (const std::vector< bool > &b) |
| Set the values to compare the bits to. | |
| std::shared_ptr< ICondition > | Clone () const override |
| Get a shared pointer to a clone of this object. | |
| std::shared_ptr< ICondition > | Remap (const std::unordered_map< Types::qubit_t, Types::qubit_t > &bitsMap={}) const override |
| Get a shared pointer to a remapped condition. | |
| Public Member Functions inherited from Circuits::ICondition | |
| ICondition (const std::vector< size_t > &ind) | |
| Construct a new ICondition object. | |
| virtual | ~ICondition ()=default |
| Virtual destructor. | |
| const std::vector< size_t > & | GetBitsIndices () const |
| Get the indices of the bits used in the condition. | |
| void | SetBitsIndices (const std::vector< size_t > &ind) |
| Set the indices of the bits used in the condition. | |
| std::shared_ptr< ICondition > | getptr () |
| Get a shared pointer to this object. | |
Condition that checks if the bits are equal to a given value.
Condition that checks if the bits are equal to a given value.
| Time | The type of the time parameter that is used for operations timing. |
Definition at line 126 of file Conditional.h.
|
inline |
Construct a new EqualCondition object.
Construct a new EqualCondition object with the given classical bits indices and classical bits values.
| ind | The indices of the bits that are used in the condition. |
| b | The values to compare the bits to. |
Definition at line 136 of file Conditional.h.
|
inlineoverridevirtual |
Get a shared pointer to a clone of this object.
Returns a shared pointer to a copy of this object.
Implements Circuits::ICondition.
Definition at line 172 of file Conditional.h.
|
inline |
Get the values to compare the bits to.
Get the values to compare the classical bits to.
Definition at line 156 of file Conditional.h.
|
inlineoverridevirtual |
Check if the condition is met.
Check if the condition is met on the given classical state.
| state | The state to check the condition against. |
Implements Circuits::ICondition.
Definition at line 146 of file Conditional.h.
|
inlineoverridevirtual |
Get a shared pointer to a remapped condition.
Returns a shared pointer to a copy of the condition with classical bits changed according to the provided map.
| bitsMap | The map of classical bits to remap. |
Implements Circuits::ICondition.
Definition at line 186 of file Conditional.h.
|
inline |
Set the values to compare the bits to.
Set the values to compare the classical bits to.
| b | The values to compare the bits to. |
Definition at line 164 of file Conditional.h.