Closed pedrorrivero closed 8 months ago
Totals | |
---|---|
Change from base Build 8031993973: | 0.0% |
Covered Lines: | 19 |
Relevant Lines: | 19 |
I'm a little bit unsure about this. Let's have some discussion about pros and cons. My feeling is that if we do this for every single small function we'll end up with a huge baggage of tests.
Separate issue to clarify, if the corresponding notebook ends up on the learning platform, how are these functions retrieved?
Thanks @miamico
Yeah, this function started being significantly larger because it was applied to specific circuits but I ended up narrowing it down a lot in clean up. At this point I think we could/should add it to the notebook directly. Nonetheless, I'd still like to keep the construct in the available tooling for ease of reference in the future.
I think it is also a great simple example for the team on how to write tests. But let's talk offline if you want.
To retrieve this function (not sure exactly what you mean) you would do
from quantum_enablement.circuits import compute_uncompute
Thanks @miamico
Yeah, this function started being significantly larger because it was applied to specific circuits but I ended up narrowing it down a lot in clean up. At this point I think we could/should add it to the notebook directly. Nonetheless, I'd still like to keep the construct in the available tooling for ease of reference in the future.
I think it is also a great simple example for the team on how to write tests. But let's talk offline if you want.
To retrieve this function (not sure exactly what you mean) you would do
from quantum_enablement.circuits import compute_uncompute
I agree that the testing framework is hashed out nicely for this function and it is worth to keep the example around for reference. What I meant by "retrieve" is that when we run a notebook on the learning platform, does that notebook have access to the quantum_enablement repo?
What I meant by "retrieve" is that when we run a notebook on the learning platform, does that notebook have access to the quantum_enablement repo?
Not yet, but it could be configured if we needed to and got approval. Great point!
Summary
Adds new
compute_uncompute
function to automatically implement this strategy in any given input circuit (i.e. $U \rightarrow U^\dagger U$).Details and comments