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

Error mitigation RFC #768

Closed
wants to merge 28 commits into from
Closed

Error mitigation RFC #768

wants to merge 28 commits into from

Conversation

eggerdj
Copy link

@eggerdj eggerdj commented Jan 9, 2020

Summary

This PR contains an RFC discussing error mitigation and how to include it in Qiskit.

Details and comments

Details are in rfcs/0000-error-mitigation.md

rfcs/0000-error-mitigation.md Outdated Show resolved Hide resolved
rfcs/0000-error-mitigation.md Outdated Show resolved Hide resolved
rfcs/0000-error-mitigation.md Outdated Show resolved Hide resolved
rfcs/0000-error-mitigation.md Outdated Show resolved Hide resolved
schedule_config['stretch_factors'] = stretch_factors
error_mitigation_schedules = schedule_circuit_error_mitigation(experiments, schedul_config, method)

return assemble_schedules(schedules=error_mitigation_schedules, qobj_id=qobj_id,
Copy link
Contributor

Choose a reason for hiding this comment

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

something funky might happen elsewhere to user code (or internal to qiskit maybe, too) when the number of jobs executed is not equal to the number of circuits given, since this is often assumed

Copy link
Author

Choose a reason for hiding this comment

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

Do you know where in qiskit this might be an issue?

Copy link
Contributor

Choose a reason for hiding this comment

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

I think this is an example, sort of pseudocode:

job = execute(circuits)  # circuits: List[QuantumCircuit]
result = job.get_results()
result_for_ith_circuit = result.get_counts(i)

I always see something like this on the user side for retrieving their data

Copy link
Contributor

Choose a reason for hiding this comment

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

specifically, I think the Result object or however results are returned could get hairy. I find the results object already pretty confusing, so I'm not sure what changes would have to be made or what issues to expect

rfcs/0000-error-mitigation.md Outdated Show resolved Hide resolved
This would then allow the creation of schedules for error mitigation that can be assembled using `assemble_schedule` and run on the backend.

Here are some additional considerations:
- Currently, the name of a scheduled circuit is the same as the circuit. We will also need to distinguish the schedules with different stretch factors, for instance, by including the stretch factor in the name of the circuit. E.g. `sched = Schedule(name=circuit.name + 'c=%d'.format(schedule_config['stretch_factor']))`.
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe Schedules should also have metadata. I don't really like the idea of using name to hold data that will be used programmatically elsewhere

Copy link
Contributor

Choose a reason for hiding this comment

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

You are still right that the names will have to be different (because unfortunately name might already be used to grab one schedule's results from a list of a job's results)

Copy link
Author

Choose a reason for hiding this comment

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

I agree with you on both points. Each schedule will still need a unique name but putting the stretch factor in the schedule name is not particularly appealing. Lets come up with something else.

eggerdj and others added 2 commits January 10, 2020 10:14
Schedule has a method arg.

Co-Authored-By: Lauren Capelluto <laurencapelluto@gmail.com>
Made `error_mitigation` in execute a string.
Copy link
Member

@ajavadia ajavadia left a comment

Choose a reason for hiding this comment

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

I left some comments. I like the backend-calibrated gates. I think similar to this, we can do easier readout error mitigation if the backend provides some extra data. But that's for another RFC.

rfcs/0000-error-mitigation.md Outdated Show resolved Hide resolved
rfcs/0000-error-mitigation.md Outdated Show resolved Hide resolved
rfcs/0000-error-mitigation.md Outdated Show resolved Hide resolved
rfcs/0000-error-mitigation.md Outdated Show resolved Hide resolved
@eggerdj eggerdj requested a review from ajavadia January 21, 2020 20:11
@ajavadia
Copy link
Member

@lcapelluto please make new comments on Qiskit/RFCs#3. I'll also do a final review there.

@ajavadia ajavadia closed this Jan 22, 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.

3 participants