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

Noise transform #162

Merged
merged 29 commits into from
Apr 22, 2019
Merged

Noise transform #162

merged 29 commits into from
Apr 22, 2019

Conversation

gadial
Copy link
Collaborator

@gadial gadial commented Apr 22, 2019

Summary

This module transforms one error channel into another built from specified building blocks, such that the two channels are as close as possible. e.g. converting a general noise to a Clifford noise that a Clifford simulator can handle.

Details and comments

This module adds two functions:

  • approximate_quantum_error: given an input channel and a description of the desired building blocks, and output a "close" channel built from the building blocks.
  • approximate_noise_model: applies approximate_quantum_error to all noises in the noise model, with the same set of building blocks used for all noises in the model.

Examples:

Inputs as quantum error and operator string:

gamma = 0.23
error = amplitude_damping_error(gamma)
results = approximate_quantum_error(error, operator_string="reset")

Inputs as Kraus matrices and operator list:

X = standard_gate_unitary('x')
Y = standard_gate_unitary('y')
Z = standard_gate_unitary('z')
p = 0.34
theta = numpy.pi / 7
E0 = numpy.sqrt(1 - p) * numpy.array(numpy.eye(2))
E1 = numpy.sqrt(p) * (numpy.cos(theta) * X + numpy.sin(theta) * Y)
results = approximate_quantum_error((E0, E1), operator_list=[X, Y, Z])

@@ -361,43 +361,43 @@ def power(self, n):
return ret

def tensor(self, other):
"""Return the tensor product quantum error channel self other.
"""Return the tensor product quantum error channel self ? other.
Copy link
Member

Choose a reason for hiding this comment

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

Looks like something odd is going on with the math operator font characters here

Copy link
Member

@chriseclectic chriseclectic left a comment

Choose a reason for hiding this comment

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

This looks good @gadial, thanks!

The only minor issue I see now is that the tensor product and compose math operators have been replaced with question marks in the quantum_error.py file. If you can fix that its ready to merge (and if it's too hard to fix because of a font issue on your computer I can fix it in a seperate PR)

@gadial
Copy link
Collaborator Author

gadial commented Apr 22, 2019

Should be ok now.

Copy link
Member

@chriseclectic chriseclectic left a comment

Choose a reason for hiding this comment

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

Great work @gadial !

@chriseclectic chriseclectic merged commit 6909f6b into Qiskit:master Apr 22, 2019
hhorii pushed a commit to hhorii/qiskit-aer that referenced this pull request Apr 23, 2019
* Adding noise transformation to the noise package

* Unified interface for dict/list/string approximating operator input

* Implementation of approximate_noise_model

* Now generates noise approximation using unitaries if possible

* Now when possible outputs error circuits instead of Kraus/Unitary

* Now represent all named operators using circuits
@gadial gadial deleted the noise_transform branch June 11, 2019 07:45
dcmckayibm pushed a commit to dcmckayibm/qiskit-aer that referenced this pull request Nov 3, 2019
* Adding noise transformation to the noise package

* Unified interface for dict/list/string approximating operator input

* Implementation of approximate_noise_model

* Now generates noise approximation using unitaries if possible

* Now when possible outputs error circuits instead of Kraus/Unitary

* Now represent all named operators using circuits
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.

2 participants