|View source on GitHub|
Returns QASM code for the given value, if possible.
cirq.protocols.qasm( val: Any, *, args: Optional[
cirq.protocols.QasmArgs] = None, qubits: Optional[Iterable['cirq.Qid']] = None, default: TDefault = RaiseTypeErrorIfNotProvided ) -> Union[str, TDefault]
Different values require different sets of arguments. The general rule of
thumb is that circuits don't need any, operations need a
gates need both a
||The value to turn into QASM code.|
A list of qubits that the value is being applied to. This is
A default result to use if the value doesn't have a
The result of
val didn't have a
_qasm_ method (or that method returned
default wasn't set.