Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Nov 14, 2024
1 parent b5ada02 commit 5c8003e
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions convert.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,13 +60,15 @@ def channel(qubit: str, type_: str, gate: Optional[str] = None) -> str:
kind = (
"flux"
if type_ == "qf" or type_ == "coupler"
else "probe"
if gate == "MZ"
else "acquisition"
if type_ == "ro"
else "drive12"
if gate == "RX12"
else "drive"
else (
"probe"
if gate == "MZ"
else (
"acquisition"
if type_ == "ro"
else "drive12" if gate == "RX12" else "drive"
)
)
)
element = qubit if type_ != "coupler" else f"coupler_{qubit}"
return f"{element}/{kind}"
Expand Down Expand Up @@ -123,9 +125,7 @@ def pulse_like(o: dict) -> dict:
return (
acquisition(o)
if o["type"] == "ro"
else virtualz(o)
if o["type"] == "virtual_z"
else pulse(o)
else virtualz(o) if o["type"] == "virtual_z" else pulse(o)
)


Expand Down

0 comments on commit 5c8003e

Please sign in to comment.