-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
Information
- Qiskit Terra version: latest
- Python version:
- Operating system:
What is the current behavior?
qc = QuantumCircuit(5, 4)
qc.reset(range(5))
qc.x(4)
qc.h(range(5))
qc.cx(range(4), 4)
qc.draw()
qc.h(range(4))
qc.barrier()
qc.measure(range(4), range(4))
qc.draw('mpl')
becomes:
backend = FakeCasablanca()
trans_qc = transpile(qc, backend)
trans_qc.draw('mpl')
Steps to reproduce the problem
Run above at optimization levels 1->3.
What is the expected behavior?
If the user explicitly puts resets at the beginning of a circuit they should remain there. This is important as the unconditional reset done by default on IBM Quantum systems is not perfect, leading to state prep errors. Adding a reset at the beginning of a circuit greatly suppresses these errors and is needed to get high-fidelity results.
Suggested solutions
Do not remove resets at the beginning of circuits. i.e. do not run this RemoveResetInZeroState
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working