bloqade.cirq_utils.noise.transform.transform_circuit
← Module overview
function
source
functiontransform_circuit¶source
bloqade.cirq_utils.noise.transform.transform_circuit
Signature
def transform_circuit(circuit: cirq.Circuit, to_native_gateset: bool = True, model: cirq.NoiseModel | None = None, parallelize_circuit: bool = False) -> cirq.CircuitTransform an input circuit into one with the native gateset with noise operations added.
Noise operations will be added to all qubits in circuit.all_qubits(), regardless of whether the output of the circuit optimizers contain all the qubits.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
circuit | cirq.Circuit | required | The input circuit. |
to_native_gateset | bool | True | |
model | cirq.NoiseModel | None | None | |
parallelize_circuit | bool | False |
Other Parameters
| Name | Type | Description |
|---|---|---|
to_native_gateset | bool | Whether or not to convert the input circuit to one using the native set of gates (`cirq.CZTargetGateset`) only. Defaults to `True`. Note, that if you use an input circuit that has gates different from this gateset and don't convert it, may lead to incorrect results and errors. |
model | cirq.NoiseModel | The cirq noise model to apply to the circuit. Usually, you want to use one of the ones supplied in this submodule, such as `GeminiOneZoneNoiseModel`. |
parallelize_circuit | bool | Whether or not to parallelize the circuit as much as possible after it's been converted to the native gateset. Defaults to `False`. |
Returns
cirq.CircuitThe resulting noisy circuit.