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 Dec 2, 2024
1 parent d459a7e commit 6ee375b
Showing 1 changed file with 7 additions and 9 deletions.
16 changes: 7 additions & 9 deletions convert.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,9 +123,7 @@ def channel(qubit: str, type_: str, gate: Optional[str] = None) -> str:
else (
"acquisition"
if type_ == "ro"
else "drive12"
if gate == "RX12"
else "drive"
else "drive12" if gate == "RX12" else "drive"
)
)
)
Expand Down Expand Up @@ -184,9 +182,7 @@ def pulse_like(o: dict, rescale: float) -> dict:
return (
acquisition(o, rescale)
if o["type"] == "ro"
else virtualz(o)
if o["type"] == "virtual_z"
else pulse(o, rescale)
else virtualz(o) if o["type"] == "virtual_z" else pulse(o, rescale)
)


Expand Down Expand Up @@ -283,9 +279,11 @@ def two_qubits_cal(o: dict) -> dict:
def upgrade_cal(o: dict) -> dict:
return {
"single_qubits": single_qubits_cal(o["characterization"]["single_qubit"]),
"two_qubits": two_qubits_cal(o["characterization"]["two_qubit"])
if "two_qubit" in o["characterization"]
else {},
"two_qubits": (
two_qubits_cal(o["characterization"]["two_qubit"])
if "two_qubit" in o["characterization"]
else {}
),
}


Expand Down

0 comments on commit 6ee375b

Please sign in to comment.