cirq_rigetti.quil_output.RigettiQCSQuilOutput

THIS CLASS IS DEPRECATED.

Inherits From: QuilOutput

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`.

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

View source

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

View source

Write QUIL output to a file specified by path.