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
Not sure if an issue, so tagging as question for now. If I'm saying nonsense, an explanation would be enough to close this issue (even if I don't understand it).
When creating an initializer with single-qubit states, I would expect that the decomposition turns into single qubits gates/instructions. In this case1 I want to initialize two qubits in |1>:
┌──────────────┐┌───┐┌───────────────┐┌───┐
q_0: ─|0>─┤ U3(pi/2,0,0) ├┤ X ├┤ U3(-pi/2,0,0) ├┤ X ├
└┬────────────┬┘└─┬─┘└───────────────┘└─┬─┘
q_1: ─|0>──┤ U3(pi,0,0) ├───■─────────────────────■──
└────────────┘
I understand that synthesis is something hard you want to keep general and probably we dont want to handle too many "special cases" (or do we?). To this end, would it help to support something likeInitialize('11') (a la Statevector.from_label)?
In summary,
should we "aid" Initialize to decompose into single-qubit instructions when possible?
If No,
should Initialize synthesis be smarter and minimize/avoid multi-qubit gates when possible?
should the transpiler do the leg work here?
If Yes,
should we support something like Initialize('11'), Initialize('+l'), and the other labels from Statevector.from_label?
should we keep the labels when a Statevector is created from labels and allow Initialize(Statevector.from_label('11'))2?
Footnotes: 1 This issue is inspired by a question in stack exchange 2 Supporting Statevector as Initializeparameter seems intuitive to me in any case. Currently an unexpected .data needs to be added Initialize(Statevector.from_label('11').data)
The text was updated successfully, but these errors were encountered:
Not sure if an issue, so tagging as
question
for now. If I'm saying nonsense, an explanation would be enough to close this issue (even if I don't understand it).When creating an initializer with single-qubit states, I would expect that the decomposition turns into single qubits gates/instructions. In this case1 I want to initialize two qubits in
|1>
:The result of decomposing it, I think, should be something along these lines:
However, it results in a circuit with CNOTs:
I understand that synthesis is something hard you want to keep general and probably we dont want to handle too many "special cases" (or do we?). To this end, would it help to support something like
Initialize('11')
(a laStatevector.from_label
)?In summary,
Initialize
to decompose into single-qubit instructions when possible?Initialize
synthesis be smarter and minimize/avoid multi-qubit gates when possible?Initialize('11')
,Initialize('+l')
, and the other labels fromStatevector.from_label
?Statevector
is created from labels and allowInitialize(Statevector.from_label('11'))
2?Footnotes:
1 This issue is inspired by a question in stack exchange
2 Supporting
Statevector
asInitialize
parameter seems intuitive to me in any case. Currently an unexpected.data
needs to be addedInitialize(Statevector.from_label('11').data)
The text was updated successfully, but these errors were encountered: