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

Remove dead code branch from Optimize1qDecomposition Python code #13188

Merged
merged 1 commit into from
Sep 19, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -222,18 +222,12 @@ def run(self, dag):
def _error(self, circuit, qubit):
"""
Calculate a rough error for a `circuit` that runs on a specific
`qubit` of `target` (`circuit` can either be an OneQubitGateSequence
from Rust or a list of DAGOPNodes).
`qubit` of `target` (`circuit` is a list of DAGOPNodes).

Use basis errors from target if available, otherwise use length
of circuit as a weak proxy for error.
"""
if isinstance(circuit, euler_one_qubit_decomposer.OneQubitGateSequence):
return euler_one_qubit_decomposer.compute_error_one_qubit_sequence(
circuit, qubit, self.error_map
)
else:
return euler_one_qubit_decomposer.compute_error_list(circuit, qubit, self.error_map)
return euler_one_qubit_decomposer.compute_error_list(circuit, qubit, self.error_map)


def _possible_decomposers(basis_set):
Expand Down
Loading