Skip to content

Commit

Permalink
Add Fusion variations (#1110)
Browse files Browse the repository at this point in the history
Co-authored-by: Victor Villar <vvilpas@gmail.com>
  • Loading branch information
hhorii and vvilpas authored Mar 10, 2021
1 parent acd216d commit 1994b35
Show file tree
Hide file tree
Showing 3 changed files with 863 additions and 240 deletions.
13 changes: 13 additions & 0 deletions src/framework/operations.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -283,6 +283,19 @@ inline Op make_unitary(const reg_t &qubits, cmatrix_t &&mat, std::string label =
return op;
}

inline Op make_diagonal(const reg_t &qubits, cvector_t &&vec, std::string label = "") {
Op op;
op.type = OpType::diagonal_matrix;
op.name = "diagonal";
op.qubits = qubits;
op.params = std::move(vec);

if (label != "")
op.string_params = {label};

return op;
}

inline Op make_superop(const reg_t &qubits, const cmatrix_t &mat) {
Op op;
op.type = OpType::superop;
Expand Down
Loading

0 comments on commit 1994b35

Please sign in to comment.