-
Notifications
You must be signed in to change notification settings - Fork 51
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
Refactor phase gradient bloq dtypes #1191
Refactor phase gradient bloq dtypes #1191
Conversation
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.
this lgtm. the library changes seem minimal and the test changes -- splitting into more specific unit tests is always appreciated
@pytest.mark.parametrize( | ||
'bloq', | ||
[ | ||
pytest.param(bloq, marks=pytest.mark.slow if bloq.num_qubits() > 12 else ()) |
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.
bloq2 is still getting executed on my machine (7 seconds) despite it looking like it should be 4+9=13 qubits
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.
consider using bloq.signature.n_qubits, which is explicit about how it handles left/right registers
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.
About bloq2, my guess would be that because AddIntoPhaseGrad
doesn't define a decomposition, but only a classical action, and cirq.unitary is much faster for classical gates.
splitting #1142, part 1.
dtype
properties to all bloqs and use them in signatures