-
Notifications
You must be signed in to change notification settings - Fork 2.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add ctrl_state to MCMT gate #10698
Comments
I think this would be a nice feature to add. Willing to help implement it if looking for help. |
This is awesome, for any help, I'm here too! |
Hi! I am interested in working on this issue. Can this be assigned to me? .I would like to make my first contribution to qiskit terra. |
Yeah man, if @diemilio and @Marsmmz also agree, you can do this! And if during your task you find some issues, please tell us and we may help you😁 |
Sure! I had volunteered to take care of this a little while back cause I had the time, but I never got it assigned. |
@diemilio Thanks for the opportunity. I have started working on the issue following the contribution guide. |
Sorry for getting here late, I'll try my best to help! |
@Marsmmz I have a question. Does MCMT controls need to be custom state?. Meaning should user given freedom to specify whether the state of control is 0 or 1 or mix like '01...' control state targeting q_k number of qubits. If yes what's best way to take that input from user, dictionary or list?? |
I personally think users should have the freedom to specify the control state. Like if a 2-C-2-T gate is needed, users can specify which of '00', '01', '10', '11' they want to be the control state. Perhaps taking a 01 binary string as input is enough? What do you think?@ShashiQubit @diemilio @Dpbm |
@Marsmmz @diemilio @Dpbm I want feed back on this modified implementation of control function from source code of MCMT gate:
In this version, if the ctrl_state is '0', X gates are applied to all the control qubits both before and after the MCMT gate, so we have a "0-controlled" MCMT. If ctrl_state is '1', the MCMT gate is implemented directly without any extra X gates, meaning it's a regular "1-controlled" MCMT. If ctrl_state is a string containing '0's and '1's, X gates are applied before and after the MCMT gate to the qubits corresponding to '0's in ctrl_state. Also what additional test cases are needed apart from the default ones already present for MCMT ? One that I could think is to check length of ctrl_state string matches the length of control qubits if ctrl_state is not None. |
Close by #13150. |
What should we add?
Add ctrl_state to multi-control multi-target gates
The text was updated successfully, but these errors were encountered: