cirq_rigetti.quil_output.RigettiQCSQuilOutput

A sub-class of cirq.circuits.quil_output.QuilOutput that additionally accepts a qubit_id_map for explicitly mapping logical qubits to physical qubits.

Inherits From: QuilOutput

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.

qubit_id_map A dictionary mapping cirq.Qid 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.

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.