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

Multiplier Operators Quantum Arithmetic #6112

Merged
merged 70 commits into from
Aug 23, 2024
Merged

Conversation

gmlejarza
Copy link
Collaborator

@gmlejarza gmlejarza commented Aug 16, 2024

Before submitting

  • Add a new entry to the doc/releases/changelog-dev.md file, summarizing the
    change, and including a link back to the PR.

Context:

Adding Multiplier templates for Quantum Arithmetic.

Description of the Change:

Adding Multiplier and OutMultiplier templates to perform arithmetic operations between quantum registers.

Benefits:

Users can implement arithmetic operations in an easy and efficient way.

Related GitHub Issues: [sc-71592]

Copy link
Contributor

Hello. You may have forgotten to update the changelog!
Please edit doc/releases/changelog-dev.md with:

  • A one-to-two sentence description of the change. You may include a small working example for new features.
  • A link back to this PR.
  • Your name (or GitHub username) in the contributors section.

@gmlejarza gmlejarza marked this pull request as draft August 16, 2024 18:30
@gmlejarza gmlejarza changed the title [WIP] Multiplier Operators Quantum Arithmetic Multiplier Operators Quantum Arithmetic Aug 20, 2024
@gmlejarza gmlejarza changed the title Multiplier Operators Quantum Arithmetic [WIP] Multiplier Operators Quantum Arithmetic Aug 20, 2024
@gmlejarza gmlejarza marked this pull request as ready for review August 20, 2024 14:51
@gmlejarza gmlejarza marked this pull request as draft August 20, 2024 15:19
Copy link
Contributor

@KetpuntoG KetpuntoG left a comment

Choose a reason for hiding this comment

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

Nice, it's looking good!

In the tests remember to apply the changes requested in qml.Adder as well:

  • merge test_operation_result_args_None with the previous test.
  • remove comment from jax.jit
  • import auxiliary function from file

Remember also to include the templates in the __init__ file so we can call them as qml.Multiplier directly.

pennylane/templates/subroutines/multiplier.py Outdated Show resolved Hide resolved
pennylane/templates/subroutines/multiplier.py Outdated Show resolved Hide resolved
pennylane/templates/subroutines/multiplier.py Outdated Show resolved Hide resolved
pennylane/templates/subroutines/multiplier.py Outdated Show resolved Hide resolved
pennylane/templates/subroutines/multiplier.py Outdated Show resolved Hide resolved
pennylane/templates/subroutines/out_multiplier.py Outdated Show resolved Hide resolved
pennylane/templates/subroutines/out_multiplier.py Outdated Show resolved Hide resolved
pennylane/templates/subroutines/multiplier.py Outdated Show resolved Hide resolved
pennylane/templates/subroutines/out_multiplier.py Outdated Show resolved Hide resolved
pennylane/templates/subroutines/out_multiplier.py Outdated Show resolved Hide resolved
Copy link
Contributor

@KetpuntoG KetpuntoG left a comment

Choose a reason for hiding this comment

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

Looks good! 🚀

Base automatically changed from in_arithmetics to master August 23, 2024 15:02
Copy link
Contributor

@soranjh soranjh left a comment

Choose a reason for hiding this comment

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

Thanks @gmlejarza, looks great!

@soranjh soranjh enabled auto-merge (squash) August 23, 2024 17:22
@soranjh soranjh added this to the v0.38 milestone Aug 23, 2024
@soranjh soranjh merged commit 63fa071 into master Aug 23, 2024
40 checks passed
@soranjh soranjh deleted the multipliers_arithmetic branch August 23, 2024 18:03
mudit2812 pushed a commit that referenced this pull request Sep 10, 2024
### Before submitting

- [ ] Add a new entry to the `doc/releases/changelog-dev.md` file,
summarizing the
      change, and including a link back to the PR.


------------------------------------------------------------------------------------------------------------

**Context:**

Adding Multiplier templates for Quantum Arithmetic.

**Description of the Change:**

Adding Multiplier and OutMultiplier templates to perform arithmetic
operations between quantum registers.

**Benefits:**

Users can implement arithmetic operations in an easy and efficient way.

**Related GitHub Issues:** [sc-71592]

---------

Co-authored-by: KetpuntoG <65235481+KetpuntoG@users.noreply.github.com>
Co-authored-by: soranjh <soran.jahangiri@gmail.com>
Co-authored-by: soranjh <40344468+soranjh@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants