Skip to content
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 MCRX, MCRY and MCRZ gates to the circuit library #12289

Open
wants to merge 25 commits into
base: main
Choose a base branch
from

Conversation

king-p3nguin
Copy link
Contributor

@king-p3nguin king-p3nguin commented Apr 21, 2024

Summary

Resolve #12048

Details and comments

@king-p3nguin king-p3nguin requested a review from a team as a code owner April 21, 2024 22:21
@qiskit-bot qiskit-bot added the Community PR PRs from contributors that are not 'members' of the Qiskit repo label Apr 21, 2024
@qiskit-bot
Copy link
Collaborator

Thank you for opening a new pull request.

Before your PR can be merged it will first need to pass continuous integration tests and be reviewed. Sometimes the review process can be slow, so please be patient.

While you're waiting, please feel free to review other open PRs. While only a subset of people are authorized to approve pull requests for merging, everyone is encouraged to review open pull requests. Doing reviews helps reduce the burden on the core team and helps make the project's code better for everyone.

One or more of the the following people are requested to review this:

  • @Cryoris
  • @Qiskit/terra-core
  • @ajavadia
  • @mtreinish
  • @nkanazawa1989

@coveralls
Copy link

coveralls commented Apr 21, 2024

Pull Request Test Coverage Report for Build 9011841055

Details

  • 322 of 352 (91.48%) changed or added relevant lines in 7 files are covered.
  • 14 unchanged lines in 3 files lost coverage.
  • Overall coverage decreased (-0.004%) to 89.623%

Changes Missing Coverage Covered Lines Changed/Added Lines %
qiskit/circuit/library/standard_gates/ry.py 79 80 98.75%
qiskit/circuit/library/standard_gates/rx.py 135 142 95.07%
qiskit/circuit/library/standard_gates/multi_control_rotation_gates.py 0 8 0.0%
qiskit/circuit/quantumcircuit.py 54 68 79.41%
Files with Coverage Reduction New Missed Lines %
qiskit/transpiler/passes/synthesis/unitary_synthesis.py 3 88.02%
crates/qasm2/src/lex.rs 5 92.88%
qiskit/circuit/library/standard_gates/multi_control_rotation_gates.py 6 0.0%
Totals Coverage Status
Change from base Build 9004289325: -0.004%
Covered Lines: 62323
Relevant Lines: 69539

💛 - Coveralls

@ShellyGarion ShellyGarion self-assigned this Apr 22, 2024
@ShellyGarion ShellyGarion added the Changelog: New Feature Include in the "Added" section of the changelog label Apr 22, 2024
@ShellyGarion ShellyGarion added the mod: circuit Related to the core of the `QuantumCircuit` class or the circuit library label Apr 22, 2024
Copy link
Member

@ShellyGarion ShellyGarion left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for your contribution @king-p3nguin.
I have a few preliminary questions and comments.

  1. I don't understand why there are so many new classes.
    MCRXGate, MCRXPUCXBasis, MCRYGate, MCRYPUCXBasis, MCRYVChain, MCRZGate, MCRZPUCXBasis ?
    Isn't it enough to have one class for each rotation direction? see the code of MCPhaseGate.

  2. There are several copypasting misprints in the classes docstrings that are a bit confusing.

  3. I'm not sure if the imports through qiskit/circuit/library/standard_gates/multi_control_rotation_gates.py should be deprecated, since the way that these are used today are via QuantumCircuit.mcrx, QuantumCircuit.mcry and QuantumCircuit.mcrz .

  4. Instead of changing the logic of _mcsu2_real_diagonal to solve Controlled UGate with a parameterized angle fails with 4 or more controls #12135, perhaps you can handle the two cases of ParameterValueType and float separately as a preliminary solution?
    see the code of MCPhaseGate.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Changelog: New Feature Include in the "Added" section of the changelog Community PR PRs from contributors that are not 'members' of the Qiskit repo mod: circuit Related to the core of the `QuantumCircuit` class or the circuit library
Projects
Status: No status
Development

Successfully merging this pull request may close these issues.

Add MCRX, MCRY and MCRZ gates to the circuit library
4 participants