================================================================================ Calibrations, kept in their own grammar ================================================================================ defcalgrammar "openpulse"; cal { extern port drive; frame f0 = newframe(drive, 5.0e9, 0); } defcal rx(angle[20] t) $0 { play(f0, gaussian(1.0, 160dt, 40dt)); { nested; } } defcal measure $0 -> bit { return capture(f0); } -------------------------------------------------------------------------------- (source_file (calibration_grammar (string)) (calibration (calibration_block (calibration_text))) (calibration_definition (identifier) (parameter (scalar_type (designator (integer_literal))) (identifier)) (hardware_qubit) (calibration_block (calibration_text) (calibration_block (calibration_text)))) (calibration_definition (hardware_qubit) (return_signature (scalar_type)) (calibration_block (calibration_text))))