mqt.core.io
¶
IO handling within MQT Core.
Module Contents¶
- load(input_circuit: QuantumComputation | str | PathLike[str] | QuantumCircuit) QuantumComputation [source]¶
Load a quantum circuit from any supported format as a
QuantumComputation
.- Parameters:
input_circuit – The input circuit to translate to a
QuantumComputation
. This can be aQuantumComputation
itself, a file name to any of the supported file formats, an OpenQASM (2.0 or 3.0) string, or a QiskitQuantumCircuit
.- Returns:
The
QuantumComputation
.- Raises:
ValueError – If the input circuit is a Qiskit
QuantumCircuit
but the qiskit extra is not installed.FileNotFoundError – If the input circuit is a file name and the file does not exist.