![]() |
THIS CLASS IS DEPRECATED.
Inherits From: QuilOutput
cirq_rigetti.quil_output.RigettiQCSQuilOutput(
*,
operations: cirq.OP_TREE,
qubits: Tuple[cirq.Qid, ...],
decompose_operation: Optional[Callable[[cirq.Operation], List[cirq.Operation]]] = None,
qubit_id_map: Optional[Dict[cirq.Qid, str]] = None
)
IT WILL BE REMOVED IN cirq v1.6
.
Cirq-Rigetti is deprecated. For more details or to provide feedback see https://github.com/quantumlib/Cirq/issues/7058
A sub-class of cirq.circuits.quil_output.QuilOutput
that additionally accepts a
qubit_id_map
for explicitly mapping logical qubits to physical qubits.
Attributes:
qubit_id_map: A dictionary mapping <a href="https://quantumai.google/reference/python/cirq/Qid"><code>cirq.Qid</code></a> to strings that
address physical qubits in the outputted QUIL.
measurement_id_map: A dictionary mapping a Cirq measurement key to
the corresponding QUIL memory region.
formatter: A QUIL formatter that formats QUIL strings account for both
the `qubit_id_map` and `measurement_id_map`.
Args | |
---|---|
operations
|
A list or tuple of cirq.OP_TREE arguments.
|
qubits
|
The qubits used in the operations. |
decompose_operation
|
Optional; A callable that decomposes a circuit operation
into a list of equivalent operations. If None provided, this class
decomposes operations by invoking QuilOutput._write_quil .
|
qubit_id_map
|
Optional; A dictionary mapping cirq.Qid to strings that
address physical qubits in the outputted QUIL.
|
Methods
rename_defgates
rename_defgates(
output: str
) -> str
A function for renaming the DEFGATEs within the QUIL output. This utilizes a second pass to find each DEFGATE and rename it based on a counter.
save_to_file
save_to_file(
path: Union[str, bytes, int]
) -> None
Write QUIL output to a file specified by path.