Closed 1ucian0 closed 11 months ago
I'm not sure here what's expected. It could be either:
a: ──■──
│
b: ──■──
│
c: ──o──
┌─┴─┐
return: ┤ X ├
└───┘
or
c: ──o──
│
b: ──■──
│
a: ──■──
┌─┴─┐
return: ┤ X ├
└───┘
Tweedledum seems to prefer the first option.
What do we expect the function signature to look like: def oracle(q_0, q_1, q_2)
or def oracle(q_2, q_1, q_0)
? It seems the "Qiskit way" would be q_2, q_1, q_0
so the top labelling in your example would seem correct to me 🙂
You could argue either way - def oracle(q_0, q_1, q_2)
satisfies *args
where args[0] == q_0
and so on, so the indexing matches the actual usage, whereas def oracle(q_2, q_1, q_0)
just looks kind of like how bitstrings are printed. The former is probably better, because it matches the semantics when passing qargs
in a list to things like QuantumCircuit.append
.
Environment
What is happening?
In https://github.com/Qiskit/qiskit-terra/pull/9337#discussion_r1067055542 @Cryoris noticed that
classical_function
synthesis labels the qubits in the reversed order.How can we reproduce the issue?
:
What should happen?
in that example, the open control is on
c
, not ona
.Any suggestions?
No response