qbraid_qir.cirq.cirq_to_qir
- cirq_to_qir(circuit, name=None, **kwargs)[source]
Converts a Cirq circuit to a PyQIR module.
- Parameters:
circuit (cirq.Circuit) – The Cirq circuit to convert.
name (str, optional) – Identifier for created QIR module. Auto-generated if not provided.
- Keyword Arguments:
initialize_runtime (bool) – Whether to perform quantum runtime environment initialization, default True.
record_output (bool) – Whether to record output calls for registers, default True
- Return type:
Module
- Returns:
The QIR
pyqir.Module
representation of the input Cirq circuit.- Raises:
TypeError – If the input is not a valid Cirq circuit.
ValueError – If the input circuit is empty.
CirqConversionError – If the conversion fails.