Closed krneta closed 1 month ago
Sorry, will this break things for pure Julia users? Could we make the check an ||
(or)?
Sorry, will this break things for pure Julia users? Could we make the check an
||
(or)?
If it doesn't find "braket." it should just be a no-op, right?
Yes, but you can also get rid of the repeated replace
. https://docs.julialang.org/en/v1/base/strings/#Base.replace-Tuple{IO,%20AbstractString,%20Vararg{Pair}} Multiple patterns are supported in one call.
Yes, but you can also get rid of the repeated
replace
. https://docs.julialang.org/en/v1/base/strings/#Base.replace-Tuple{IO,%20AbstractString,%20Vararg{Pair}} Multiple patterns are supported in one call.
Oh, you're right! I was afraid I would need to use a regex.
Issue #, if available:
Description of changes:
The DM simulator would always output the warning that there was no noise in the circuit (even when there is). This seems to be because when we get the types from the circuit instructions they are all prefixed with "braket.". I've removed the prefix.
Testing done:
Tested with noisy circuit to verify the warning message is no longer output.
Merge Checklist
Put an
x
in the boxes that apply. You can also fill these out after creating the PR. If you're unsure about any of them, don't hesitate to ask. We're here to help! This is simply a reminder of what we are going to look for before merging your pull request.General
Tests
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.