export the program to a supported target language, when you request its transpiled metrics with get_transpiled_circuit_metrics, or when you execute it on a designated backend, where the Classiq execution service transpiles it for that hardware so that every gate is compatible.
To restore the legacy flow, in which transpilation runs during synthesis, set
compatibility_mode=True in Preferences.Preferences, they are saved with the quantum program and applied when you export it (by setting transpilation_config=True) or read its transpiled metrics. To use a different transpilation option on export, pass an explicit TranspilationConfig instead of True; this overrides the synthesis settings entirely. Execution, on the other hand, disregards the synthesis transpilation option and transpiles for whichever backend you run on, at the decompose transpilation option by default. See execution preferences for the options available at execution.
Transpilation Options
none: no transpilation. This is the default transpilation option ofexportif notranspilation_configis passed.decompose: decompose all of the functions according to the basis gates of the backend.light: the lightest optimization pass; fast, and best suited for fully connected hardware.medium: a heavier pass that optimizes the quantum program further, at the cost of longer runtime. A balanced choice for hardware with moderate connectivity.auto optimize: chooses the transpilation automatically betweenlightandmedium, based on the chosen backend. This is the default transpilation option inget_transpiled_circuit_metricsand inexport(..., transpilation_config=True)when no transpilation option is set as a preference at synthesis.intensive: the heaviest pass, for maximum optimization. Well-suited for hardware with complex connectivity.custom: offers a personalized approach to optimizing quantum programs while weighing various factors. It takes specific optimization criteria into account, transpiling the quantum program to maximize efficiency and resource utilization for the chosen backend, with a primary focus on delivering the best possible circuit performance.