qiskit.circuit.QuantumCircuit.qasm¶
- QuantumCircuit.qasm(formatted=False, filename=None, encoding=None)[fuente]¶
Return OpenQASM string.
- Parámetros
formatted (bool) – Return formatted Qasm string.
filename (str) – Save Qasm to file with name “filename”.
encoding (str) – Optionally specify the encoding to use for the output file if
filename
is specified. By default this is set to the system’s default encoding (ie whateverlocale.getpreferredencoding()
returns) and can be set to any valid codec or alias from stdlib’s codec module
- Devuelve
If formatted=False.
- Tipo del valor devuelto
str
- Muestra
MissingOptionalLibraryError – If pygments is not installed and
formatted
isTrue
.QasmError – If circuit has free parameters.