Quanlse/Calibration/TwoQubit.py
def czCaliDynamicalPhaseJob(sche: Scheduler, q0: int, q1: int, q0VZPhase: float, q1VZPhase: float):
    """
    Calibrate the dynamical phase by tuning the Z pulse.

    :param sche: the Scheduler instance
    :param q0: the index of the first qubit to be calibrated
    :param q1: the index of the second qubit to be calibrated
    :param q0VZPhase: the amplitude of the calibration phase on the first qubit
    :param q1VZPhase: the amplitude of the calibration phase on the second qubit
    :return: the QJob instance
    """

    qubits = (q0, q1)

    # Set the pulse parameter
    sche.conf["caliDataCZ"][qubits]["q0VZPhase"] = q0VZPhase
    sche.conf["caliDataCZ"][qubits]["q1VZPhase"] = q1VZPhase

    # -------------------------------------
    # 1. When qubit B is initialized as |1>
    # -------------------------------------
    sche.clearCircuit()
    # Add the H pulse
    H(sche.Q[q0])
    H(sche.Q[q1])
    # Add the Z pulse
    CZ(sche.Q[q0], sche.Q[q1])
    # Add the X/2 pulse
    H(sche.Q[q1])
    # Generate the pulse
    job = sche.schedule()

    return job

    Calibrate the dynamical phase by tuning the Z pulse.

    :param sche: the Scheduler instance
    :param q0: the index of the first qubit to be calibrated
    :param q1: the index of the second qubit to be calibrated
    :param q0VZPhase: the amplitude of the calibration phase on the first qubit
    :param q1VZPhase: the amplitude of the calibration phase on the second qubit
    :return: the QJob instance
    
Calibrate the dynamical phase by tuning the Z pulse.
Calibrate the dynamical phase by tuning the Z pulse .
def czCaliDynamicalPhaseJob(sche: Scheduler, q0: int, q1: int, q0VZPhase: float, q1VZPhase: float):
    qubits = (q0, q1)
    sche.conf["caliDataCZ"][qubits]["q0VZPhase"] = q0VZPhase
    sche.conf["caliDataCZ"][qubits]["q1VZPhase"] = q1VZPhase
    sche.clearCircuit()
    H(sche.Q[q0])
    H(sche.Q[q1])
    CZ(sche.Q[q0], sche.Q[q1])
    H(sche.Q[q1])
    job = sche.schedule()
    return job
def czCaliDynamicalPhaseJob ( sche : Scheduler , q0 : int , q1 : int , q0VZPhase : float , q1VZPhase : float ) : qubits = ( q0 , q1 ) sche . conf [ "caliDataCZ" ] [ qubits ] [ "q0VZPhase" ] = q0VZPhase sche . conf [ "caliDataCZ" ] [ qubits ] [ "q1VZPhase" ] = q1VZPhase sche . clearCircuit ( ) H ( sche . Q [ q0 ] ) H ( sche . Q [ q1 ] ) CZ ( sche . Q [ q0 ] , sche . Q [ q1 ] ) H ( sche . Q [ q1 ] ) job = sche . schedule ( ) return job
Calibrate the dynamical phase by tuning the Z pulse.
Calibrate the dynamical phase by tuning the Z pulse .
"""
    Calibrate the dynamical phase by tuning the Z pulse.

    :param sche: the Scheduler instance
    :param q0: the index of the first qubit to be calibrated
    :param q1: the index of the second qubit to be calibrated
    :param q0VZPhase: the amplitude of the calibration phase on the first qubit
    :param q1VZPhase: the amplitude of the calibration phase on the second qubit
    :return: the QJob instance
    """ # Set the pulse parameter # ------------------------------------- # 1. When qubit B is initialized as |1> # ------------------------------------- # Add the H pulse # Add the Z pulse # Add the X/2 pulse # Generate the pulse
the QJob instance
the QJob instance
sche
Scheduler
the Scheduler instance
the Scheduler instance
q0
int
the index of the first qubit to be calibrated
the index of the first qubit to be calibrated
q1
int
the index of the second qubit to be calibrated
the index of the second qubit to be calibrated
q0VZPhase
float
the amplitude of the calibration phase on the first qubit
the amplitude of the calibration phase on the first qubit
q1VZPhase
float
the amplitude of the calibration phase on the second qubit
the amplitude of the calibration phase on the second qubit