Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Running on IonQ

qirc submit program.ll compiles the program and sends it to IonQ as a job in IonQ’s native circuit format, with the API key from the IONQ_API_KEY environment variable, --target choosing the backend (simulator by default, or a QPU such as qpu.aria-1) and --shots the shot count. It waits for the job, then prints the counts per result like a local run. --emit ionq prints the job instead of sending it. IonQ measures every qubit once at the end, so the program must be straight line with its measurements last. qirc keeps its single dependency by calling the curl that ships with Windows, macOS and Linux, and passes the key to it on standard input, so it never appears in the process list. The submission, polling and result mapping are tested end to end against a local server that imitates IonQ’s API; a real job needs your own key, which IonQ gives out free with access to its cloud simulator.