def _to_qasm_output(
        self,
        header: str | None = None,
        precision: int = 10,
        qubit_order: cirq.QubitOrderOrList = ops.QubitOrder.DEFAULT,
        version: str = '2.0',
    ) -> cirq.QasmOutput:
        """Returns a QASM object equivalent to the circuit.

        Args:
            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.
            version:  Version of OpenQASM to render as output.  Defaults
                to OpenQASM 2.0.  For OpenQASM 3.0, set this to '3.0'.
        """
        if header is None:
            header = f'Generated from Cirq v{cirq._version.__version__}'
        qubits = ops.QubitOrder.as_qubit_order(qubit_order).order_for(self.all_qubits())
        return QasmOutput(
            operations=self.all_operations(),
            qubits=qubits,
            header=header,
            precision=precision,
            version=version,
        )
Returns a QASM object equivalent to the circuit.

        Args:
            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.
            version:  Version of OpenQASM to render as output.  Defaults
                to OpenQASM 2.0.  For OpenQASM 3.0, set this to '3.0'.
        
cirq-core/cirq/circuits/circuit.py