Returns QASM code for the given value, if possible.
cirq.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.
QasmArgs object to pass into the value's
This is for needed for objects that only have a local idea of what's
going on, e.g. a
cirq.Operation in a bigger
involving qubits that the operation wouldn't otherwise know about.
A list of qubits that the value is being applied to. This is
cirq.Gate values, which otherwise wouldn't know what
qubits to talk about.
A default result to use if the value doesn't have a
_qasm_ method or that method returns
If not specified, non-decomposable values cause a
The result of
val has a
method and it didn't return
default is returned, if it was specified. Otherwise an error is
val didn't have a
_qasm_ method (or that method returned
default wasn't set.