Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add reset to standard_gate_instruction #154

Merged
merged 1 commit into from
Apr 18, 2019

Conversation

chriseclectic
Copy link
Member

Summary

This extends errorutils.standard_gate_instruction to convert single-qubit reset Kraus operations to standard qobj reset instructions.

Details and comments

Example:
kraus reset to 0 or 1:

reset0 = {'name': 'kraus', 'qubits': [0], 'params': [array([[1, 0], [0, 0]]), array([[0, 1], [0, 0]])]}
reset1 =  {'name': 'kraus', 'qubits': [0], 'params': [array([[0, 0], [0, 1]]), array([[0, 0], [1, 0]])]}

Then the modified instruction can convert these as:

standard_gate_instruction(reset0) -> [{'name': 'reset', 'qubits': [0]}]
standard_gate_instruction(reset1) -> [{'name': 'reset', 'qubits': [0]}, {'name': 'x', 'qubits': [0]}]

Note that the comparison is done using the SuperOp representation so any Kraus representation equivalent to the reset will be converted, not just the canonical ones.

@chriseclectic chriseclectic merged commit 8cbcff1 into Qiskit:master Apr 18, 2019
gadial pushed a commit to gadial/qiskit-aer that referenced this pull request Apr 22, 2019
@chriseclectic chriseclectic deleted the kraus2reset branch April 30, 2019 20:12
dcmckayibm pushed a commit to dcmckayibm/qiskit-aer that referenced this pull request Nov 3, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant