MAX_PARAM_NORMS = ( MAX_AMP_C, MAX_AMP_T, ) OPTIMIZER = Adam() PULSE_TIME = 500 PULSE_STEP_COUNT = 500 ITERATION_COUNT = 5000 # Define the problem. INITIAL_STATE_0 = np.kron(CAVITY_ZERO, TRANSMON_G) TARGET_STATE_0 = np.kron(CAVITY_ONE, TRANSMON_G) INITIAL_STATES = np.stack((INITIAL_STATE_0, ), ) TARGET_STATES = np.stack((TARGET_STATE_0, ), ) COSTS = (TargetInfidelity(TARGET_STATES), ParamVariation(MAX_PARAM_NORMS, PARAM_COUNT, PULSE_STEP_COUNT)) # Define the output. LOG_ITERATION_STEP = 1 SAVE_ITERATION_STEP = 1 SAVE_FILE_NAME = "binomialcode_exp2_3" SAVE_PATH = os.path.join( "./pulses/", SAVE_FILE_NAME, ) def main(): result = grape_schroedinger_discrete( COSTS, hamiltonian,
# Define the optimization. ITERATION_COUNT = 5000 OPTIMIZER = Adam() PARAM_COUNT = 3 PULSE_TIME = 500 PULSE_STEP_COUNT = PULSE_TIME # Define the problem. INITIAL_STATE_0 = anp.kron(TRANSMON_G, CAVITY_ZERO) INITIAL_STATES = anp.stack((INITIAL_STATE_0,)) TARGET_STATE_0 = anp.kron(TRANSMON_G, CAVITY_ONE) TARGET_STATES = anp.stack((TARGET_STATE_0,)) COSTS = (TargetInfidelity(TARGET_STATES), ParamVariation(MAX_PARAM_NORMS, PARAM_COUNT, PULSE_STEP_COUNT, cost_multiplier=0.5, order=1), ParamVariation(MAX_PARAM_NORMS, PARAM_COUNT, PULSE_STEP_COUNT, cost_multiplier=0.5, order=2),) # Define the output. LOG_ITERATION_STEP = 1 SAVE_FILE_NAME = "piccolo_exp1" SAVE_ITERATION_STEP = 1 SAVE_PATH = os.path.join("./pulses/", SAVE_FILE_NAME,)