question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Create `qml.PauliError`

See original GitHub issue

Feature details

As requested in #971, we would like to add a channel for Pauli errors.

See the following references:

See the addition of a Reset error as an example.

Implementation

List of tasks for completion:

A.

  1. Add a new qml.PauliError class to pennylane/ops/channel.py that inherits from Channel and defines the Kraus operators.
  2. Add an entry to the doc/introduction/operations.rst file for the new operation
  3. Add tests for the new channel in the tests/ops/test_channel_ops.py file.

B.

  1. Add support for qml.PauliError in the default.mixed device by adding it to the list of supported operations.
  2. Add tests for checking the Kraus operators of the channel and for applying the new channel using default.mixed.

How important would you say this feature is?

1: Not important. Would be nice to have.

Additional information

No response

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:9 (9 by maintainers)

github_iconTop GitHub Comments

2reactions
ingstracommented, Oct 16, 2021

@MoritzWillmann sure! I’m not working on it.

1reaction
antalszavacommented, Oct 20, 2021

Hi @MoritzWillmann, awesome, I’ll have a go at addressing them. 🙂 Note that in general we have some flexibility here.

When you say “Pauli Error acting on an arbitrary number of qubits”, does that mean the Kraus Matrices “only” need to be upscaled to act on the according state vector?

What I had in mind there is that we could specify a Pauli string, the wires the error acts on and the corresponding probability , e.g., “XYZ”, wires=[0,1,2] and p=0.1 for example.

In such a case, with probability 0.1 we’ll apply the following

qml.PauliX(0)
qml.PauliY(1)
qml.PauliZ(2)

and with a probability of 0.9 the state is reserved.

One step further, we could define 3 lists:

  1. a list of Pauli-strings;
  2. a list of wires;
  3. a list of probabilities.

For example, qml.PauliError(["XX","YY","ZZ"],[ [0,1], [1,2], [2,0]],[0.1, 0.2, 0.3]), such that

  1. With probability 0.1 we’ll apply
qml.PauliX(0)
qml.PauliX(1)

with probability 0.2 we’ll apply

qml.PauliY(1)
qml.PauliY(2)

with probability 0.3 we’ll apply the following

qml.PauliZ(2)
qml.PauliZ(0)

and with a probability 0.4 the state is preserved.

Constructing the Kraus matrices will likely be computationally heavy when we have many wires.

We could then express your example as:

  • qml.PauliError("X", [0], p) which has the same syntax as a bitflip essentially or;
  • qml.PauliError("XI", [0,1], p), provided that we allow identities in the Pauli string.

Should there be a possibility to choose which Pauli Error channel is applied or should all 4 Kraus Matrices be returned?

Not quite sure about this one, what would “choose which Pauli Error channel is applied” mean?

Read more comments on GitHub >

github_iconTop Results From Across the Web

qml.PauliError — PennyLane 0.27.0 documentation
Pauli operator error channel for an arbitrary number of qubits. This channel is modelled by the following Kraus matrices: K0=√ ...
Read more >
QML module not found error - qt creator
The project uses qmake. I have tried using qmlplugindump.exe to generate a qmltypes file for my main qml view container file, but qmlplugindump....
Read more >
Information-Theoretic Bounds on Quantum Advantage in ...
We study the performance of classical and quantum machine learning (ML) models in predicting outcomes of physical experiments.
Read more >
PennyLane
Improved quantum natural gradient Use qml.metric_tensor function to compute the full ... qml.Barrier - qml.QubitDensityMatrix - qml.PauliError - qml.
Read more >
QuantumNAT: Quantum Noise-Aware Training with ...
Pauli error. • Readout error ... Benchmarks. • Different gate set design spaces ... Provide tutorials, videos and example projects of QML and...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found