You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As per documentation, Isometry instruction can be used for state preparation.
On the other hand, Initialize instruction does its work by first resetting the qubits to |0⟩ followed by an state preparing unitary.
That means circ.initialize is equivalent to circ.reset + circ.iso.
However, I noticed that using Isometry almost always results in a circuit with much less number of CNOTs.
Isometry and Initialize use two different algorithms to construct the circuits. Rather than replace one with the other I think it would be better to keep synthesis part of Initialize (i.e. without the initial resets) in some class in Qiskit but have QuantumCircuit.initialize use the more efficient isometry instead.
What is the expected enhancement?
As per documentation,
Isometry
instruction can be used for state preparation.On the other hand,
Initialize
instruction does its work by first resetting the qubits to|0⟩
followed by an state preparing unitary.That means
circ.initialize
is equivalent tocirc.reset
+circ.iso
.However, I noticed that using
Isometry
almost always results in a circuit with much less number of CNOTs.The result is something like that:
So, I suggest to use
Isometry
to implementInitialize
instruction. This should lead to a better end result with less code to maintain.The text was updated successfully, but these errors were encountered: