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.

Transpiler error during execution of circuits with dynamical decoupling on real backends

See original GitHub issue

Environment

‘qiskit-terra’: ‘0.18.3’, ‘qiskit-aer’: ‘0.9.1’, ‘qiskit-ignis’: ‘0.6.0’, ‘qiskit-ibmq-provider’: ‘0.18.1’, ‘qiskit-aqua’: ‘0.9.5’, ‘qiskit’: ‘0.32.1’, ‘qiskit-nature’: None, ‘qiskit-finance’: None, ‘qiskit-optimization’: None, ‘qiskit-machine-learning’: None}

What is happening?

A Transpiler Error occurs when executing circuits with dynamical coupling on real backends:

TranspilerError: "This circuit None may involve a delay instruction violating the pulse controller alignment. To adjust instructions to right timing, you should call one of scheduling passes first. This is usually done by calling transpiler with scheduling_method='alap'."

Whether or not these errors occur to be dependent on the type of circuit. For instance, the following circuit executes without errors:

image

But the same test circuit FAILS after adding one extra hadamard on qubit 0: image.

Commenting out the hadmard on qubit 0 will allow the circuit to execute without errors. Changing to backend = FakeMumbai() also executes without errors. Changing optimization level =1 to other levels makes no difference. Code fails on multiple real devices (not just IBM mumbai).

How can we reproduce the issue?

The code below

from qiskit.transpiler import PassManager, InstructionDurations
from qiskit.transpiler.passes import ALAPSchedule, DynamicalDecoupling
from qiskit.circuit.library import XGate
from qiskit import QuantumCircuit, transpile, execute, IBMQ 

IBMQ.load_account()
provider = IBMQ.get_provider(hub='ibm-q-internal' , group='performance', project='demos')
realbackend = provider.get_backend('ibmq_mumbai')

circ = QuantumCircuit(4)
circ.cx(0, 1)
circ.cx(2, 3)
circ.h(0) # comment out to run without errors
circ.cx(1, 2)
circ.measure_all()

circ_t = transpile(circ, backend=realbackend,scheduling_method="alap")
dd_sequence = [XGate()] * 2
spacing = []
durations = InstructionDurations.from_backend(realbackend)
pm = PassManager([ALAPSchedule(durations),
                DynamicalDecoupling(durations, dd_sequence, qubits=None, spacing=None)])
circuits = pm.run(circ_t)

job = execute(circuits, realbackend, shots=10)

fails with error:

TranspilerError: "This circuit None may involve a delay instruction violating the pulse controller alignment. To adjust instructions to right timing, you should call one of scheduling passes first. This is usually done by calling transpiler with scheduling_method='alap'."

What should happen?

Code should execute without Transpile errors irrespective of the type of circuit.

Any suggestions?

No response

Issue Analytics

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

github_iconTop GitHub Comments

1reaction
nkanazawa1989commented, Feb 28, 2022

Yes, this actually involves the refactoring of the whole framework in addition to the DD pass. I have updated the behavior of scheduling pass in #7655, and current stage is #7709 which upgrades scheduler pass and introduces BasePadding class which will be new base class of dynamical decoupling pass. Then, DD pass will be upgraded to consider the pulse alignment. Hopefully I can get reviews soon.

1reaction
nkanazawa1989commented, Dec 9, 2021

The best (or temporarily) solution for now would be asking the DD pass to check the constraints and insert delays that conform to the pulse alignment constraints. @ajavadia

Read more comments on GitHub >

github_iconTop Results From Across the Web

Dynamic circuits FAQ - IBM Quantum
Dynamic circuits are critical for algorithms such as quantum error correction (QEC). In general, there are broad classes of quantum algorithms that exchange ......
Read more >
arXiv:2211.01383v1 [quant-ph] 2 Nov 2022
Error suppression schemes such as dynamical decoupling and Pauli twirling alleviate this issue by reducing noise at the hardware level.
Read more >
The Qiskit Elements — Qiskit 0.19.6 documentation
At this level the experiments can be designed to reduce errors (dynamical decoupling, error mitigation, and optimal pulse shapes). Transpiler A major part...
Read more >
Release 0.17.1 Tech Team @ Unitary Fund - Mitiq
simulator you can simulate circuits in as a backend. ... Digital Dynamical Decoupling (DDD) is an error mitigation technique in which ...
Read more >
Effects of Dynamical Decoupling and Pulse ... - IEEE Xplore
Circuit optimization and error mitigation methods are needed to design quantum circuits to achieve better fidelity when executed on NISQ.
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