pyqonvert.noise.insert_parallel_noise_noise_mapping

pyqonvert.noise.insert_parallel_noise_noise_mapping(circuit, device, noise_models, placement=None)

Parallelize a circuit and insert noise in a noise mapping compatible way.

Returns two circuits:

  • The first circuit is a parallelized circuit without decomposition blocks but with PragmaStopParallelBlock annotations. It can be used for further programs.

  • The second circuit is a circuit containing decomposition blocks specifically for noise mapping.

Parameters:
  • circuit (Circuit) -- The Circuit that is parallelized.

  • device (Device) -- The Device containing noise information.

  • noise_models (List[NoiseModel]) -- List of noise models that define noise like continuous background noise or noise on gates.

  • placement (str) -- Where the noise is inserted relative to the gates Available: after, before, symmetric. Default: after.

Returns:

Tuple of the parallelized circuit and the circuit for noise mapping.

Return type:

(Circuit, Circuit)

Raises:
  • RuntimeError -- Error occurred during parallelization or noise mapping.

  • ValueError -- Could not convert inputs from Python.