SwiftQuantum IDE
Turning a Quantum Circuit into Qiskit, PennyLane, CUDA-Q or OpenQASM 3 Code
How the same list of gates maps onto four quantum SDK syntaxes, where their conventions differ, and how SwiftQuantum IDE generates each one as text you can copy.
One circuit, four vocabularies
A quantum circuit is a short list of operations on named qubits. A Hadamard on qubit 0, then a CNOT from qubit 0 to qubit 1, then a measurement of both qubits: that list means the same thing whichever tool you use. What changes is the vocabulary. One framework calls the gate `h`, another writes `qml.Hadamard`, a third wraps it in a kernel and calls `h(q[0])`, and OpenQASM 3 spells it `h q[0];`.
Most of the translation is mechanical. The harder part is the set of conventions around the gates, because those are the places where a copied snippet runs without error and still answers a different question than you meant.
Where the conventions differ
Qubit ordering in results. Frameworks do not agree on which end of a result string is qubit 0. If you compare counts from two tools without checking, you can read the same circuit as two different outcomes. Check the convention in the documentation for the framework you are using before you compare numbers.
Measurement. Some frameworks need an explicit measurement at the end of the circuit before they return counts. Others return the state. The IDE's own rule is simple to state: a measurement you place in the drawing is exported where it stands, and a circuit with no measurement gets every qubit measured at the end, the same as the simulator does. That keeps the copied code and the drawn result in step.
Gate names. Small differences such as `S` and `T` versus their adjoints, or a controlled gate written as a generic control in one framework and a named gate in another, are easy to get wrong by hand. Generating the text from the drawing removes the hand-copying step, but it does not remove the need to read the output.
Parameters. The Qiskit script writes each rotation angle exactly as the number stored in the editor, and Qiskit reads that number as radians. Check the angle in the generated code against the value you meant, rather than trusting the drawing alone.
How SwiftQuantum IDE generates the code
The IDE's transpiler panel takes the circuit you have drawn and writes it out for four targets: Qiskit, PennyLane, CUDA-Q, and OpenQASM 3. You pick a tab, read the text, and copy it. The panel does not execute the code, and it does not validate it against a framework. It is a translation of your drawing into text, and the text is yours to run.
The Qiskit tab is the most complete of the four. It writes a Python script that builds the circuit with core Qiskit and samples it with the `StatevectorSampler` primitive, so it does not need a simulator add-on or an account to run. That makes it a practical starting point for a learner who wants to see the same circuit in code, next to the drawing.
The OpenQASM 3 output is worth knowing about because it is the most portable of the four. If you only need to move a circuit between tools, the OpenQASM editor route, which uses the older OpenQASM 2.0 text, may be the simpler option, since the IDE both exports and imports that format.
When a circuit leaves the simulator's comfort zone
The generated code describes a circuit. It does not change what the circuit can do. A circuit that uses only Clifford gates can be simulated far more cheaply than a general one, as explained in the Clifford stabilizer page. A general circuit is limited by the state-vector method, as explained in the circuit simulator page. The code you copy carries the same circuit, so the same limits apply wherever you run it.
Before you copy the code
Read it once before you run it. Check the qubit count, the measurement lines, and any angle values. Then run it in the framework's own environment and compare the result with what the IDE shows for the same circuit. If the two disagree, the difference is almost always one of the conventions above, and the framework documentation will settle it.
Draw your circuit in SwiftQuantum IDE and copy the code for the framework you use.
Get started