Skip to content

Commit ccaf44d

Browse files
author
Keefe Huang
committed
Rename control and target for addCrz
1 parent c39c6cc commit ccaf44d

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/zx/FunctionalityConstruction.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -331,13 +331,13 @@ void FunctionalityConstruction::addCcz(ZXDiagram& diag, const Qubit ctrl0,
331331

332332
void FunctionalityConstruction::addCrz(ZXDiagram& diag,
333333
const PiExpression& phase,
334-
const Qubit control, const Qubit target,
334+
const Qubit target, const Qubit control,
335335
std::vector<Vertex>& qubits) {
336336
// CRZ decomposition uses reversed CNOT direction
337-
addCnot(diag, target, control, qubits);
338-
addZSpider(diag, control, qubits, -phase / 2);
339-
addZSpider(diag, target, qubits, phase / 2);
340-
addCnot(diag, target, control, qubits);
337+
addCnot(diag, control, target, qubits);
338+
addZSpider(diag, target, qubits, -phase / 2);
339+
addZSpider(diag, control, qubits, phase / 2);
340+
addCnot(diag, control, target, qubits);
341341
}
342342

343343
void FunctionalityConstruction::addMcrz(ZXDiagram& diag,

0 commit comments

Comments
 (0)