# Chaque qubit a sa propre bande de fréquences, pour son pilotage et pour sa lecture
from qiskit_ibm_runtime.fake_provider import FakeFez

config = FakeFez().configuration()


def in_ghz(band):
    low, high = band
    return f"{low / 1e9:.2f} à {high / 1e9:.2f} GHz"


for qubit in range(3):
    drive = in_ghz(config.qubit_lo_range[qubit])
    readout = in_ghz(config.meas_lo_range[qubit])
    print(f"qubit {qubit} : pilotage {drive}, lecture {readout}")

# Le milieu de la bande de pilotage, qubit par qubit
centers = [(low + high) / 2e9 for low, high in config.qubit_lo_range]
print(f"Milieu de la bande de pilotage, sur {len(centers)} qubits : de {min(centers):.2f} à {max(centers):.2f} GHz")
