qermit.measurement_reduction — Qermit 0.2.0 documentation

# qermit.measurement_reduction

measurement_reduction.measurement_reduction_task_gen(method: pytket._tket.partition.GraphColourMethod, cx_config: pytket._tket.transform.CXConfigType) → qermit.taskgraph.mittask.MitTask

  Uses measurement reduction techniques available in the pytket.partition module to reduce the number of measurement circuits required to measure all expectations for an observable.

  Parameters

    - strategy (PauliPartitionStrat) – Measurement reduction strategy used in measurement_reduction method

    - method (GraphColourMethod) – Graph colouring method used in measurement_reduction method

    - cx_config (CXConfigType) – Configuration of CX gates for diagonlisation methods.

  Returns

    MitTask object, taking and return same write type, but with added measurement circuits to ObservableTracker.

  Return type

    MitTask

measurement_reduction.gen_MeasurementReduction_MitEx(**kwargs) → qermit.taskgraph.mitex.MitEx

  Returns a MitEx object that produces measurement circuits via Measurement Reduction methods.

  Parameters

    backend (Backend) – Backend experiment is built around.

  Key mitex

    MitEx object measurement reduction task is prepended to.

  Returns

    MitEx object performing Measurement reduction

  Return type

    MitEx