Skip to content

Commit

Permalink
fix constructor
Browse files Browse the repository at this point in the history
  • Loading branch information
Glacialte committed Sep 3, 2024
1 parent b1787f2 commit f38fe79
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions scaluq/gate/gate_matrix.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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)) {}

Expand Down Expand Up @@ -139,6 +141,7 @@ class DenseMatrixGateImpl : public GateBase {
Matrix _matrix;
bool _is_unitary;

public:
DenseMatrixGateImpl(UINT target_mask,
UINT control_mask,
const ComplexMatrix& mat,
Expand Down

0 comments on commit f38fe79

Please sign in to comment.