This builds a CircuitTransformer
that the client may use over multiple sweeps of cirq.Sweepable
.
cirq_rigetti.circuit_transformers.build(
*,
qubits: Optional[Tuple[cirq.Qid, ...]] = None,
decompose_operation: Optional[Callable[[cirq.Operation], List[cirq.Operation]]] = None,
qubit_id_map: Optional[Dict[cirq.Qid, str]] = None,
post_transformation_hooks: Optional[List[_PostTransformationHook]] = None
) -> cirq_rigetti.circuit_transformers.CircuitTransformer
Args |
qubits
|
The qubits defined on the circuit that this function will transform. If None,
the transformer will pull qubits from the cirq.Circuit and order them by
cirq.ops.QubitOrder.DEFAULT on each transformation.
|
decompose_operation
|
A callable that can decompose each individual operation on the
cirq.Circuit before being transformed. This will override the default Quil
decompositions in cirq. You may optimize your circuit before transformation and pass
a no-op here.
|
qubit_id_map
|
A map of cirq.Qid to physical qubit addresses that will end up in
the executed native Quil.
|
post_transformation_hooks
|
A list of transformation functions you may pass to further
convert a pyquil.Program after transformation.
|
Returns |
A CircuitTransformer transforming the cirq.Circuit s as specified above.
|