qermit.measurement_reduction

qermit.taskgraph.measurement_reduction.measurement_reduction_task_gen(strategy, method, cx_config)[source]

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.

Return type:

MitTask

Returns:

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

qermit.taskgraph.measurement_reduction.gen_MeasurementReduction_MitEx(backend, **kwargs)[source]

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.

Return type:

MitEx

Returns:

MitEx object performing Measurement reduction