You're reading an old version of this documentation. If you want up-to-date information, please have a look at 11.0.

qiskit_iqm.qiskit_to_iqm.serialize_circuit#

qiskit_iqm.qiskit_to_iqm.serialize_circuit(circuit)#

Serialize a quantum circuit into the IQM data transfer format.

Assumes that circuit has been transpiled so that it only contains operations natively supported by the given IQM quantum architecture.

Qiskit uses one measurement instruction per qubit (i.e. there are no multi-qubit measurement instructions). While serializing we do not group any measurements together but rather associate a unique measurement key with each measurement instruction, so that the results can later be reconstructed correctly (see MeasurementKey documentation for more details).

Parameters

circuit (qiskit.circuit.quantumcircuit.QuantumCircuit) – quantum circuit to serialize

Returns

data transfer object representing the circuit

Raises

InstructionNotSupportedError – circuit contains an unsupported instruction

Return type

iqm_client.iqm_client.Circuit