diff --git a/scaluq/gate/gate_matrix.hpp b/scaluq/gate/gate_matrix.hpp index c34d673a..b8d46772 100644 --- a/scaluq/gate/gate_matrix.hpp +++ b/scaluq/gate/gate_matrix.hpp @@ -104,6 +104,8 @@ class TwoTargetMatrixGateImpl : public GateBase { class SparseMatrixGateImpl : public GateBase { SparseMatrix _matrix; + +public: SparseMatrixGateImpl(UINT target_mask, UINT control_mask, const SparseComplexMatrix& mat) : GateBase(target_mask, control_mask), _matrix(SparseMatrix(mat)) {} @@ -139,6 +141,7 @@ class DenseMatrixGateImpl : public GateBase { Matrix _matrix; bool _is_unitary; +public: DenseMatrixGateImpl(UINT target_mask, UINT control_mask, const ComplexMatrix& mat,