Commit 163f25d0 authored by Nguyen, Thien Minh's avatar Nguyen, Thien Minh
Browse files

Fixed IQFT circuit gen



We inversed the gate sequence but didn't inverse the rotation angle of CPhase gates.
Signed-off-by: Nguyen, Thien Minh's avatarThien Nguyen <nguyentm@ornl.gov>
parent eed479a3
......@@ -38,6 +38,11 @@ bool InverseQFT::expand(const xacc::HeterogeneousMap &runtimeOptions) {
// Add them to the return function
for (auto i : instructions) {
// If it is a parametric CPhase gate,
// we need to inverse the angle.
if (i->name() == "CPhase") {
i->setParameter(0, -i->getParameter(0).as<double>());
}
addInstruction(i);
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment