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

Fix custom operator imports in tests #318

Merged
merged 2 commits into from
Feb 8, 2021
Merged

Conversation

stavros11
Copy link
Member

This fixes the issue of importing custom operators when the non-custom tensorflow operators are used on a machine that cannot compile custom operators. Particularly I identified two issues:

  1. Custom operators were indeed imported by some gates that are only defined in cgates.py and not in gates.py (eg. the measurement gate). This was easy to fix because these gates do not actually use the custom operators.
  2. The non-custom initial_state was not properly implemented when is_matrix=True.

@codecov
Copy link

codecov bot commented Feb 8, 2021

Codecov Report

❗ No coverage uploaded for pull request base (detachcustom@c7f9754). Click here to learn what that means.
The diff coverage is n/a.

Impacted file tree graph

@@               Coverage Diff               @@
##             detachcustom     #318   +/-   ##
===============================================
  Coverage                ?   99.86%           
===============================================
  Files                   ?       68           
  Lines                   ?    11563           
  Branches                ?        0           
===============================================
  Hits                    ?    11547           
  Misses                  ?       16           
  Partials                ?        0           
Flag Coverage Δ
unittests 99.86% <0.00%> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.


Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update c7f9754...79a06f4. Read the comment docs.

Copy link
Member

@scarrazza scarrazza left a comment

Choose a reason for hiding this comment

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

Perfect, thanks!

@scarrazza scarrazza merged commit cf23363 into detachcustom Feb 8, 2021
@scarrazza scarrazza deleted the fixdetachcustom branch March 6, 2021 09:26
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.

2 participants