We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
The tensor of two pauli_error gates after a two qubit gate is different from previous versions. Applying the gate
pauli_error
import qiskit.providers.aer.noise as noise error_1 = noise.pauli_error([('X', 1/3), ('Y', 1/3), ('Z', 1/3), ('I', 0)]) error_2 = error_1.tensor(error_1)
to a circuit with only a cx gate. (essentially identity circuit) results in the dictionary
cx
{'00': 557, '01' 467}
from qiskit import QuantumCircuit, execute, Aer import qiskit.providers.aer.noise as noise error_1 = noise.pauli_error([('X', 1/3), ('Y', 1/3), ('Z', 1/3), ('I', 0)]) err = error_1.tensor(error_1) noise_model = noise.NoiseModel() noise_model.add_all_qubit_quantum_error(err, ['cx']) circ = QuantumCircuit(2, 2) circ.cx(0, 1) circ.measure([0, 1], [0, 1]) result = execute(circ, Aer.get_backend('qasm_simulator'), noise_model=noise_model).result() counts = result.get_counts() print(counts)
In previous versions, it results in something close to what I would expect given my understanding of the pauli_error which would be.
counts = {'01': 2 / 9 * shots, '11': 4 / 9 * shots, '10': 2 / 9 * shots, '00': 1 / 9 * shots}
Revert to the old behavior or explain in the documentation what a tensored pauli_error is supposed to do in practice.
The text was updated successfully, but these errors were encountered:
It looks like a bug in the QuantumError.to_dict method, which is flatting all instructions to qubits [0, ..., n-1]. I will put in a fix for this
QuantumError.to_dict
Sorry, something went wrong.
chriseclectic
Successfully merging a pull request may close this issue.
Informations
What is the current behavior?
The tensor of two
pauli_error
gates after a two qubit gate is different from previous versions. Applying the gateto a circuit with only a
cx
gate. (essentially identity circuit) results in the dictionarySteps to reproduce the problem
What is the expected behavior?
In previous versions, it results in something close to what I would expect given my understanding of the
pauli_error
which would be.Suggested solutions
Revert to the old behavior or explain in the documentation what a tensored pauli_error is supposed to do in practice.
The text was updated successfully, but these errors were encountered: