|
Maestro 0.2.11
Unified interface for quantum circuit simulation
|
The controlled y rotation gate. More...
#include <QuantumGates.h>
Public Member Functions | |
| CRyGate (Types::qubit_t ctrl=0, Types::qubit_t target=1, double theta=0, Time delay=0) | |
| CRyGate constructor. | |
| virtual std::vector< size_t > | AffectedBits () const |
| Returns the affected bits. | |
| Types::qubits_vector | AffectedQubits () const override |
| Get the qubits the quantum gate is applied to. | |
| virtual bool | CanAffectQuantumState () const |
| Find if the operation can affect the quantum state. | |
| std::shared_ptr< IOperation< Time > > | Clone () const override |
| Get a shared pointer to a clone of this object. | |
| void | Execute (const std::shared_ptr< Simulators::ISimulator > &sim, OperationState &state) const override |
| Execute the quantum gate. | |
| Types::time_type | GetDelay () const |
| Get the delay of the operation. | |
| QuantumGateType | GetGateType () const override |
| Get the type of the quantum gate. | |
| unsigned int | GetNumQubits () const override |
| Get the number of qubits the quantum gate is applied to. | |
| std::vector< double > | GetParams () const override |
| Get the gate parameters. | |
| std::shared_ptr< IOperation< Types::time_type > > | getptr () |
| Get a shared pointer to this object. | |
| Types::qubit_t | GetQubit (unsigned int index=0) const override |
| Get the qubit the quantum gate is applied to. | |
| double | GetTheta () const |
| Get the theta angle for the controlled rotation gate. | |
| OperationType | GetType () const override |
| Get the type of the operation. | |
| bool | IsBranching () const override |
| Checks if the operation is a branching one. | |
| virtual bool | IsClifford () const |
| Checks if the operation is a Clifford one. | |
| virtual bool | IsConditional () const |
| Find if the operation is a conditional operation. | |
| virtual bool | NeedsEntanglementForDistribution () const |
| Find if the operation needs entanglement for distribution. | |
| std::shared_ptr< IOperation< Types::time_type > > | Remap (const std::unordered_map< Types::qubit_t, Types::qubit_t > &qubitsMap, const std::unordered_map< Types::qubit_t, Types::qubit_t > &bitsMap={}) const override |
| Get a shared pointer to a remapped operation. | |
| void | SetDelay (Types::time_type d) |
| Set the delay of the operation. | |
| void | SetQubit (Types::qubit_t q, unsigned long index=0) override |
| Set the qubit the quantum gate is applied to. | |
| void | SetTheta (double t) |
| Set the theta angle for the controlled rotation gate. | |
The controlled y rotation gate.
The controlled y rotation gate.
| Time | The type of the execution delay. |
Definition at line 2366 of file QuantumGates.h.
|
inline |
CRyGate constructor.
Constructs the controlled y rotation gate object. If specified, the delay is the time the quantum gate takes to execute.
| ctrl | The control qubit the quantum gate is applied to. |
| target | The target qubit the quantum gate is applied to. |
| theta | The theta angle for the controlled rotation gate. |
| delay | The time the quantum gate takes to execute. |
Definition at line 2379 of file QuantumGates.h.
References Circuits::ControlledRotationGate< Types::time_type >::ControlledRotationGate().
|
inlinevirtualinherited |
Returns the affected bits.
Returns the affected classical bits.
Definition at line 478 of file Operations.h.
|
inlineoverrideinherited |
Get the qubits the quantum gate is applied to.
Returns the qubits the quantum gate is applied to, in this case two qubits.
Definition at line 291 of file QuantumGates.h.
|
inlinevirtualinherited |
Find if the operation can affect the quantum state.
Returns true if the operation can affect the quantum state, false otherwise.
Definition at line 429 of file Operations.h.
|
inlineoverridevirtual |
Get a shared pointer to a clone of this object.
Returns a shared pointer to a copy of this object.
Implements Circuits::IOperation< Types::time_type >.
Definition at line 2417 of file QuantumGates.h.
References Circuits::IOperation< Time >::GetDelay(), Circuits::TwoQubitsGate< Time >::GetQubit(), and Circuits::ControlledRotationGate< Time >::GetTheta().
|
inlineoverridevirtual |
Execute the quantum gate.
Executes the quantum gate on the given simulator with the given classical state.
| sim | The simulator to execute the quantum gate on. |
| state | The classical state to execute the quantum gate with. |
Implements Circuits::IOperation< Types::time_type >.
Definition at line 2393 of file QuantumGates.h.
References Circuits::TwoQubitsGate< Time >::GetQubit(), and Circuits::ControlledRotationGate< Time >::GetTheta().
|
inlineinherited |
Get the delay of the operation.
Returns the delay due of the execution time of the operation.
Definition at line 497 of file Operations.h.
|
inlineoverridevirtual |
Get the type of the quantum gate.
Returns the type of the quantum gate.
Implements Circuits::IQuantumGate< Types::time_type >.
Definition at line 2407 of file QuantumGates.h.
References Circuits::kCRyGateType.
|
inlineoverrideinherited |
Get the number of qubits the quantum gate is applied to.
Returns the number of qubits the quantum gate is applied to, in this case 2.
Definition at line 250 of file QuantumGates.h.
|
inlineoverridevirtualinherited |
Get the gate parameters.
Returns the parameters of the gate.
Reimplemented from Circuits::IQuantumGate< Types::time_type >.
Definition at line 2274 of file QuantumGates.h.
|
inlineinherited |
Get a shared pointer to this object.
Returns a shared pointer to this object. The object needs to be already wrapped in a shared pointer.
Definition at line 487 of file Operations.h.
|
inlineoverrideinherited |
Get the qubit the quantum gate is applied to.
Returns the qubit the quantum gate is applied to. Either specify zero or one for the index or leave it default (0). If anything else is used, it will return UINT_MAX.
| index | The index of the qubit to get (0 or 1, default value 0). |
Definition at line 276 of file QuantumGates.h.
|
inlineinherited |
Get the theta angle for the controlled rotation gate.
Returns the theta angle for the controlled rotation gate.
Definition at line 2266 of file QuantumGates.h.
|
inlineoverrideinherited |
Get the type of the operation.
Get the type of the operation, in this case, gate.
Definition at line 631 of file Operations.h.
|
inlineoverridevirtual |
Checks if the operation is a branching one.
Checks if the operation is a branching one, meaning that it can lead to splitting paths (relevant for the path integral simulator).
Reimplemented from Circuits::IOperation< Types::time_type >.
Definition at line 2431 of file QuantumGates.h.
|
inlinevirtualinherited |
Checks if the operation is a Clifford one.
Checks if the operation is a Clifford one, allowing to be simulated in a stabilizers simulator.
Definition at line 516 of file Operations.h.
|
inlinevirtualinherited |
Find if the operation is a conditional operation.
Returns true if the operation is conditional, false otherwise.
Definition at line 458 of file Operations.h.
|
inlinevirtualinherited |
Find if the operation needs entanglement for distribution.
Returns true if the operation needs entanglement for distribution, false otherwise.
Definition at line 446 of file Operations.h.
|
inlineoverrideinherited |
Get a shared pointer to a remapped operation.
Returns a shared pointer to a copy of the operation with qubits and classical bits changed according to the provided maps.
| qubitsMap | The map of qubits to remap. |
| bitsMap | The map of classical bits to remap. |
Definition at line 305 of file QuantumGates.h.
|
inlineinherited |
Set the delay of the operation.
Sets the delay due of the execution time of the operation.
| d | The delay of the operation. |
Definition at line 505 of file Operations.h.
|
inlineoverrideinherited |
Set the qubit the quantum gate is applied to.
Sets the qubit the quantum gate is applied to. Either specify zero or one for the index or leave it default (0).
| q | The qubit the quantum gate is applied to. |
| index | The index of the qubit to set (0 or 1, default value 0). |
Definition at line 260 of file QuantumGates.h.
|
inlineinherited |
Set the theta angle for the controlled rotation gate.
Sets the theta angle for the controlled rotation gate.
| t | The theta angle for the controlled rotation gate. |
Definition at line 2258 of file QuantumGates.h.