cirq.Circuit.to_qasm

Circuit.to_qasm(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>) → str[source]

Returns QASM equivalent to the circuit.

Parameters:
  • 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.