-
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
Adding global_phase gate in qiskit-terra #9251
Conversation
I have added the test case for that! Thanks for the suggestion. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks like you've had some problems with merge conflicts in the places I've highlighted here - are you able to fix them yourself, or do you need a hand?
<<<<<<< HEAD | ||
======= | ||
Standard gates | ||
>>>>>>> 5672c70649b4f83a6c7146c68a6a543d4a3908fd | ||
======= | ||
>>>>>>> 57939ba279d95b5e3f56a08e186f5e1459c3c44f |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for looking at this. I've just got a couple of book-keeping comments, nothing meaningful about your new gate itself. If you're able to get these changes fixed in the next week, we'll release this as part of Qiskit Terra 0.24 soon!
If you need a hand / don't have time, don't worry - just let me know and I'll fix up the last few things myself and merge it.
I've also made #9962 to track the issue of the visualisation that we discussed above. That doesn't need solving for this PR, it's just so we don't forget (as easily). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for all the work on this! I've fixed up the merge conflict that had just arisen, and I'll tag this for merge now. There's nothing more you need to do - the PR will update itself and merge when it reaches the head of the queue.
Pull Request Test Coverage Report for Build 4721851712
💛 - Coveralls |
Please add a test that controlling a GlobalPhaseGate behaves correctly, as described in this comment. |
I would say that we don't 100% need to ensure that |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great, thanks!
* created gphase.py file * completed glbalphase file & test_gate_defin * adding GphaseGate in @DaTa in test_gate_defn * added reno add-global-phase * added inv and matrix test in test_exten * test_gphase_inv * tox lint edit * renamed GLobalPhaseGate to Global_Phase_Gate * Changed the name to more competable GlobalPhaseGate class * # pylint: disable=E1101 * # pylint: disable=no-member * # pylint: error fixed * including phase in super * changed float to ParameterExp * modified test_globalphaseGate * phase to params[0] * renamed global_phase.py to gphase * test gphase new in extentions_std * debug 1 * debug 2 * debug 3 instructions set * debug 4 * debug 5 * debug 6 * debug 6 instructions set * debug 7 * debug 7 * added gphase in quantumcircuit.py * added method gphase in quantumcircuit.py * test_gphase_inv * gphase debug1 * gphase debug2 * gphase debug3 * inverse mtd in gphase.py * added _array in gphase.py * gphase.py array debug1 * test_matrix gphase complex dtype * test_matrix in @DDT * test_gphase_matrix * changed gphase to global_phase * removed extra comma l871 * typo in reno fixed * modified reno * Delete .vs directory Deleted .vs directory * Added test to check compatibility of gate with qc.attri * debugged pylint error1 * debugged pylint error2 * debugged pylint error2a * debugged -epy error debug1 * debugged -epy error debug 1 * debugged -epy error debug 2 * restored test_gate_definations * Revert "restored test_gate_definations" This reverts commit 642877b. * reverted mistakely edited the file on Github * Delete .vs directory Deleted .vs directory * restored test_gate_definations * Revert "restored test_gate_definations" This reverts commit 642877b. * reverted mistakely edited the file on Github * retrived test_gate_definitions * PR modifications new * commit feb 13 * range in append * [] in append * [0] in append * [0]->[] * [0] * [] * Operator(qc) * fixed test_ex_std * resolved changes suggested by Cryolis * Update global_phase.py Typo in year * Added transpiler consistancy test * restored the docstring * prevented cyclic imports and other changes * Fix spacing in docs * Fix lint * Add test of controlling global phase --------- Co-authored-by: Jake Lishman <jake.lishman@ibm.com>
Summary
Added global phase gate (
global_phase
) which can be applied to a:class:~qiskit.circuit.QuantumCircuit
This PR fixes Global phase gate #8236 issue.
Details and comments