Japanese
言語
English
Bengali
French
German
Japanese
Korean
Portuguese
Spanish
Tamil

qiskit.circuit.QuantumCircuit.qasm

QuantumCircuit.qasm(formatted=False, filename=None, encoding=None)[ソース]

Return OpenQASM string.

パラメータ
  • 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 whatever locale.getpreferredencoding() returns) and can be set to any valid codec or alias from stdlib’s codec module

戻り値

If formatted=False.

戻り値の型

str

例外
  • MissingOptionalLibraryError – If pygments is not installed and formatted is True.

  • QasmError – If circuit has free parameters.