7
$\begingroup$

Sorry if this question sounds trivial, however I'm struggling to get the intuition of how quantum circuits are actually run on real quantum hardware.

As far as I know, in a simulated environment, circuits are transpiled, compiled and assembled so that we eventually get binary code to be executed on classical CPUs. This is usually true in general for classical computing: we have a set of human readable instructions which are eventually converted, after several steps, in binary code a CPU can execute.

However, since in quantum computing we "practically" describe the circuit we want to run and not exactly what we want it to do, I don't understand what happens on a real device.

$\endgroup$
2
  • 2
    $\begingroup$ A Quantum circuit is just a graphical method to help understand, you can think it does not exist. $\endgroup$
    – narip
    Commented Aug 28, 2022 at 12:38
  • 1
    $\begingroup$ For example in case of superconducting qubits, quantum gates are realized with modulated microwave pulse. In case of photonic computers optical elements are used. $\endgroup$ Commented Aug 28, 2022 at 13:26

2 Answers 2

6
$\begingroup$

I like to think of many quantum gates as essentially opcodes that instruct a (classical) controller how to tune and send the microwave or laser pulses to the qubits.

Many simple quantum circuits, then, are essentially one-level, or one-and-a-half-level, above the stack of abstraction. For example many quantum circuits can be thought of as assembly-language programs which can get assembled into the set of opcodes that the controller uses to tune the laser.

Depending on the context, much of the time such circuits are fundamentally device-independent. Thus when looking at a quantum circuit with a bunch of controlled Pauli gates or other 2-qubit gates we don't concern ourselves yet with whether our qubits are, say, ion-trap qubits or transmon qubits.

Also sometimes we might hide or ignore the qubit topology in the quantum circuit. In general most of the time when I draw a quantum circuit I assume all-to-all connectivity, but this can be overly simplistic and hide a lot of overhead.

For example transmon-qubit based architectures don't have all-to-all connectivity, but a circuit diagram could include a gate acting between two qubits that are far-away on the transmon processor's topology. If the quantum circuit were to be assembled or transpiled into a set of microwave pulses that a controller would send to the qubits, then there might be some hidden SWAP gates that need to be implemented that move the contents of the first qubit closer to that of the second. The overall fidelity of the circuit will be affected by all of these SWAP gates.

$\endgroup$
5
$\begingroup$

A quantum circuit is just a model for representing computations and evolution of a closed quantum system with time.

For running a quantum circuit on a real quantum device, we first need to transpile it to a version that a specific quantum device can implement. The actions a quantum computer can perform are being determined by its properties - like native gates (what gates the device can physically perform?), qubits connectivity (how are the qubits physically connected among themselves?), etc.

After transpiling, how the real quantum operations are being applied in the quantum device? There's a classical computer that controls various physical devices manipulating the qubits. The actual implementation varies between different technologies and devices - A quantum computer based on superconducting qubits works differently from an ion-trapped based quantum computer.

But the principle is similar everywhere - Qubits essentially are 2-level quantum system, and can be implemented using any 2-level quantum system. For simplicty, and generally speaking - let's think of an electron and its spin as a qubit - There are 2 basis states (spin up, spin down) which can represent $|0\rangle$ and $|1\rangle$ - while any normalized superposition of spin up and spin down is possible. We can manipulate the spin by, generally speaking, inducing magnetic fields upon the electron. Then you can think of the each native gate as a specific setting of a magnetic field - an $X$ gate is implemented by that magnetic field, an $RZ$ gate is implemented by another specific setting, and so on.. As aforementioned, the method to manipulate qubits varies between the different types of devices, while in many cases qubits are being manipulated by some kind of electromagnetic raditation - RF waves, microwaves, etc.

The quantum information being processed is encoded within the quantum statevector of the system, and we get to see just a fraction of it upon measurements of the qubits (the measurement operation works a bit different from the method of applying gates, but it is essentially also a physical operation controlled by a classical computer). The results of the measurements are being translated to binary strings and a classical computer takes it from there.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.