Returns the QUIL code for the given value.
cirq.protocols.quil(
val: Any,
*,
qubits: Optional[Iterable['cirq.Qid']] = None,
formatter: Optional[cirq.protocols.QuilFormatter
] = None
)
Args |
val
|
The value to turn into QUIL code.
|
qubits
|
A list of qubits that the value is being applied to. This is
needed for cirq.Gate values, which otherwise wouldn't know what
qubits to talk about.
|
formatter
|
A QuilFormatter object for properly ouputting the _quil_
method in a QUIL format.
|
Returns |
The result of val._quil_(...) if valhas a quilmethod.
Otherwise, returns None. ( Nonenormally indicates that the decomposefunction should be called on val`)
|