cirq.Circuit.save_qasm

Circuit.save_qasm(file_path: Union[str, bytes, int], header: Optional[str] = None, precision: int = 10, qubit_order: Union[cirq.ops.qubit_order.QubitOrder, Iterable[cirq.ops.raw_types.Qid]] = <cirq.ops.qubit_order.QubitOrder object>) → None[source]

Save a QASM file equivalent to the circuit.

Parameters:
  • file_path – The location of the file where the qasm will be written.
  • header – A multi-line string that is placed in a comment at the top of the QASM. Defaults to a cirq version specifier.
  • precision – Number of digits to use when representing numbers.
  • qubit_order – Determines how qubits are ordered in the QASM register.