Skip to content
This repository has been archived by the owner on Jun 12, 2023. It is now read-only.

Generate json files for RB tests #444

Merged

Conversation

dekool
Copy link
Contributor

@dekool dekool commented Jun 28, 2020

Summary

Added code to generate json files used in the RB fitters tests

Details and comments

Split from #398 in order to separate data generation of different functionalities
the generation of RB json files depends on #407
Hence the code in this PR should be revised after #407 is merged.

@chriseclectic
Copy link
Collaborator

@dekool I can't merge or update this Pr as its out-of-date with the base branch, and you fix rebase/merge from master to fix this?


def rb_circuit_execution(rb_opts: dict, shots: int):
"""
Create rb circuits with depolarizing error and simulates them
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should be "simulate"


def rb_circuit_execution_2(rb_opts: dict, shots: int):
"""
Create rb circuits with T1 and T2 errors and simulates them
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should be "simulate"


def rb_interleaved_execution(rb_opts: dict, shots: int):
"""
Create interleaved rb circuits with depolarizing error and simulates them
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should be "simulate"


def rb_cnotdihedral_execution(rb_opts: dict, shots: int):
"""
Create cnot-dihedral rb circuits with depolarizing errors and simulates them
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should be "simulate"


def rb_purity_circuit_execution(rb_opts: dict, shots: int):
"""
Create purity rb circuits with depolarizing errors and simulates them
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should be simulate


rb_circs, xdata = rb.randomized_benchmarking_seq(**rb_opts)

noise_model = NoiseModel()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This code (lines 49-50, 54-59) seem to be duplicated in most of the generation functions - maybe it's better to define it in one function and call it once?

noise_model=noise_model,
seed_simulator=SEED).result())
# coherent purity results
coherent_results.append(qiskit.execute(current_circ, backend=backend,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think that we actually check the coherent error fitter, since it's too noisy, but maybe it's good to keep it as a reference.

@ShellyGarion ShellyGarion self-requested a review July 13, 2020 10:27
Copy link
Contributor

@ShellyGarion ShellyGarion left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good Dekel!

@chriseclectic chriseclectic merged commit f74d59b into qiskit-community:master Jul 15, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants