78 std::string
get_name()
const override;
81 std::unique_ptr<IDensityOperation>
clone()
const override;
int get_control_qbit() const
Get control qubit index (-1 if not a controlled gate)
Header file for a class for the representation of general gate operations.
std::unique_ptr< IDensityOperation > clone() const override
Create a deep copy of this operation.
int get_parameter_num() const override
Get number of free parameters this operation requires.
GateOperation & operator=(const GateOperation &)=delete
Gate * get_gate() const
Get the underlying gate (for inspection)
bool is_unitary() const override
Check if this is a unitary operation (gate) or non-unitary (noise)
Wraps an existing Gate for density matrix operations.
Quantum density matrix Ï for mixed-state representation.
int get_target_qbit() const
Get target qubit index.
void apply_to_density(const double *params, int param_count, DensityMatrix &rho) override
Apply gate to density matrix using optimized local kernel.
Base class for the representation of general gate operations.
std::string get_name() const override
Get operation name for debugging/display.
~GateOperation() override
Destructor - deletes gate if owns_gate was true.
Interface for any operation that can be applied to a density matrix.
GateOperation(Gate *gate, bool owns_gate=true)
Wrap an existing gate.