Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Fusion variations #1110

Merged
merged 10 commits into from
Mar 10, 2021
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