qermit.frame_randomisation

qermit.frame_randomisation.frame_randomisation.gen_Frame_Randomisation_MitRes(backend, samples, **kwargs)[source]

Produces a MitRes object that applies FrameRandomisation techniques to experiment circuits.

Parameters:
  • backend (Backend) – Backend which experiments are default run through.

  • samples (int) – Number of Frame Randomisation instances sampled in Frame Randomisation.

Key mitres:

MitRes object FrameRandomisation MitRes built around if given.

Key frame_randomisation:

FrameRandomisation Enum passed to specify method used. Default set to FrameRandomisation.UniversalFrameRandomisation.

Return type:

MitRes

class qermit.frame_randomisation.frame_randomisation.FrameRandomisation(value)[source]

An enumeration.

static PauliFrameRandomisation(circuit, shots, samples)[source]

Uses the pytket.tailoring method PauliFrameRandomisation to return a list of circuits corresponding to instances of frame randomisation for the input circuit.

Parameters:
  • circuit (Circuit) – Circuit to have frame randomisation applied.

  • shots (int) – Number of shots of each frame randomisation circuit to take.

  • samples (int) – Number of frame randomisation instances to sample.

Return type:

List[CircuitShots]

static UniversalFrameRandomisation(circuit, shots, samples)[source]

Uses the pytket.tailoring method UniversalFrameRandomisation to return a list of circuits corresponding to instances of frame randomisation for the input circuit. UniversalFrameRandomisation rebases the circuit to a gate set such that the whole circuit is a single cycle for frame randomisation. This is possible with the additional noise assumption on top of the regular Frame Randomisation assumptions that Rz(-x) and Rz(x) incur similar noise for any angle x.

Parameters:
  • circuit (Circuit) – Circuit to have frame randomisation applied.

  • shots (int) – Number of shots of each frame randomisation circuit to take.

  • samples (int) – Number of frame randomisation instances to sample.

Return type:

List[CircuitShots]

qermit.frame_randomisation.frame_randomisation.frame_randomisation_circuits_task_gen(samples, _fr_type)[source]

Returns a MitTask object that produces Frame Randomisation circuits for some wire of experiment circuits.

Parameters:

samples (int) – Number of samples of frame randomisation circuits to take for each circuit in wire.

Return type:

MitTask

qermit.frame_randomisation.frame_randomisation.frame_randomisation_result_task_gen(samples)[source]

Returns a MitTask object that sequentially collates samples number of BackendResult objects into single BackendResult object. These collated BackendResult objects should include all frame experiments for a single original circuit.

Parameters:

samples (int) – Number of frame randomisation instances created in the first place, used to suitably collate results.

Return type:

MitTask