Template Function Pennylane::LightningQubit::Gates::callControlledMatrixOp

Function Documentation

template<class PrecisionT>
inline void Pennylane::LightningQubit::Gates::callControlledMatrixOp(ControlledMatrixFuncPtrT<PrecisionT> func, std::complex<PrecisionT> *data, std::size_t num_qubits, const std::complex<PrecisionT*> matrix, const std::vector<std::size_t> &controlled_wires, const std::vector<bool> &controlled_values, const std::vector<std::size_t> &wires, bool adj)

Call a controlled matrix operation.

Template Parameters

PrecisionT – Floating point type for the state-vector.

Parameters
  • func – Function pointer for the gate operation.

  • data – Data pointer the gate is applied to

  • num_qubits – The number of qubits of the state-vector.

  • matrix – The matrix the gate applies.

  • controlled_wires – Wires controlling the gate.

  • controlled_values – Values of the control wires.

  • wires – Wires the gate applies to.

  • adj – If true, we apply the adjoint of the gate.