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

Rename test_simplify_with_adjoint_not_defined in test_pow_ops.py #6388

Merged
merged 3 commits into from
Oct 11, 2024

Conversation

willjmax
Copy link
Contributor

This PR renames test_simplify_with_adjoint_not_defined to test_simplify_with_pow_not_defined in the test_pow_ops.py file. The test is given by the following code.

    def test_simplify_with_adjoint_not_defined(self):
        """Test the simplify method with an operator that has not defined the op.pow method."""
        op = Pow(qml.U2(1, 1, 0), z=3)
        simplified_op = op.simplify()
        assert isinstance(simplified_op, Pow)
        assert op.data == simplified_op.data
        assert op.wires == simplified_op.wires
        assert op.arithmetic_depth == simplified_op.arithmetic_depth

Note the function name says adjoint is not defined, but the docstring says that pow is not defined. The docstring is correct, since qml.U2 defines the adjoint method.

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.

Copy link
Contributor

@albi3ro albi3ro left a comment

Choose a reason for hiding this comment

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

Don't think this needs a changelog entry, but I'm fine leaving it in anyway.

Thanks for catching this.

@willjmax willjmax enabled auto-merge (squash) October 11, 2024 21:00
Copy link

codecov bot commented Oct 11, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 99.39%. Comparing base (38a5140) to head (204d06a).
Report is 321 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #6388   +/-   ##
=======================================
  Coverage   99.39%   99.39%           
=======================================
  Files         448      448           
  Lines       42464    42466    +2     
=======================================
+ Hits        42209    42211    +2     
  Misses        255      255           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@willjmax willjmax merged commit 9ac2504 into master Oct 11, 2024
38 checks passed
@willjmax willjmax deleted the pow-test branch October 11, 2024 21:53
austingmhuang pushed a commit that referenced this pull request Oct 23, 2024
…6388)

This PR renames `test_simplify_with_adjoint_not_defined` to
`test_simplify_with_pow_not_defined` in the `test_pow_ops.py` file. The
test is given by the following code.
```
    def test_simplify_with_adjoint_not_defined(self):
        """Test the simplify method with an operator that has not defined the op.pow method."""
        op = Pow(qml.U2(1, 1, 0), z=3)
        simplified_op = op.simplify()
        assert isinstance(simplified_op, Pow)
        assert op.data == simplified_op.data
        assert op.wires == simplified_op.wires
        assert op.arithmetic_depth == simplified_op.arithmetic_depth
```
Note the function name says `adjoint` is not defined, but the docstring
says that `pow` is not defined. The docstring is correct, since `qml.U2`
defines the `adjoint` method.
mudit2812 pushed a commit that referenced this pull request Nov 11, 2024
…6388)

This PR renames `test_simplify_with_adjoint_not_defined` to
`test_simplify_with_pow_not_defined` in the `test_pow_ops.py` file. The
test is given by the following code.
```
    def test_simplify_with_adjoint_not_defined(self):
        """Test the simplify method with an operator that has not defined the op.pow method."""
        op = Pow(qml.U2(1, 1, 0), z=3)
        simplified_op = op.simplify()
        assert isinstance(simplified_op, Pow)
        assert op.data == simplified_op.data
        assert op.wires == simplified_op.wires
        assert op.arithmetic_depth == simplified_op.arithmetic_depth
```
Note the function name says `adjoint` is not defined, but the docstring
says that `pow` is not defined. The docstring is correct, since `qml.U2`
defines the `adjoint` method.
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