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 effiency bug in synthesis

See original GitHub issue

Information

  • Qiskit Terra version: qiskit-terra==0.18.2
  • Python version: 3.9.7
  • Operating system: CentOS Linux 7 (Core)

What is the current behavior?

/home/user/.conda/envs/stuff/lib/python3.9/site-packages/qiskit/transpiler/runningpassmanager.py:166: UserWarning: Resynthesized [<qiskit.dagcircuit.dagnode.DAGNode object at 0x2ae0e3027820>, <qiskit.dagcircuit.dagnode.DAGNode object at 0x2ae0e3aae8e0>] and got global phase: π/2, but the original was native 
and the new value is longer.  This indicates an efficiency bug in synthesis.  Please report it by opening an issue here: https://github.com/Qiskit/qiskit-terra/issues/new/choose
  new_dag = pass_.run(dag)

This circuit was also in the messsage: Figure 1-1

Steps to reproduce the problem

I got this warning several times while using the qiskit transpiler. I am not able to retrieve the exact circuit that caused this error.

What is the expected behavior?

Suggested solutions

Issue Analytics

  • State:open
  • Created 2 years ago
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
epelofske-LANLcommented, Sep 28, 2021

I found a circuit which gave the user warning (edit; the user warning was the same as the above post, and is the same as the original start to this issue):

circuit.txt

The transpiler call I made that produced the warning used several options, including specifying the coupling map of ibmq_guadalupe:

backend = provider.get_backend("ibmq_guadalupe")
config = backend.configuration()
hardware_connectivity = networkx.Graph(config.coupling_map)
compiled_circuit = transpile(qc, coupling_map=CouplingMap(list(hardware_connectivity.edges())), optimization_level=3, basis_gates=["x", "sx", "cx", "rz"], initial_layout=[8, 11, 12, 13, 14, 15])
1reaction
epelofske-LANLcommented, Sep 28, 2021

I installed from source, and managed to get this warning:

/home/user/.local/lib/python3.9/site-packages/qiskit/transpiler/passes/optimization/optimize_1q_decomposition.py:171: UserWarning: Resynthesized 

Instruction(name='sx', num_qubits=1, num_clbits=0, params=[])
Instruction(name='x', num_qubits=1, num_clbits=0, params=[])

and got

Instruction(name='rz', num_qubits=1, num_clbits=0, params=[-3.141592653589793])
Instruction(name='sx', num_qubits=1, num_clbits=0, params=[])
Instruction(name='rz', num_qubits=1, num_clbits=0, params=[-3.141592653589793])

but the original was native (for ['x', 'sx', 'cx', 'rz']) and the new value is longer.  This indicates an efficiency bug in synthesis.  Please report it by opening an issue here: https://github.com/Qiskit/qiskit-terra/issues/new/choose
  if new_circ is not None and self._substitution_checks(dag, run, new_circ, new_basis):

I am trying to save a circuit which gives this warning, and will post it here if I can replicate it (it seems to be hard to replicate).

Read more comments on GitHub >

github_iconTop Results From Across the Web

Efficiency bug in synthesis warning #7224 - Qiskit/qiskit-terra
Across many different circuits I am getting this error when executing jobs. //anaconda3/envs/lib/python3.9/site-packages/qiskit/transpiler/ ...
Read more >
The Extended Stabilizer Simulator - Qiskit
This indicates an efficiency bug in synthesis. Please report it by opening an issue here: https://github.com/Qiskit/qiskit-terra/issues/new/choose new_dag ...
Read more >
Bug Synthesis: Challenging Bug-Finding Tools with Deep Faults
In this work, we introduce a new technique for bug injection, based on symbolic execution, program synthesis and uniform sam- pling. We build...
Read more >
Finding and Understanding Bugs in FPGA Synthesis Tools
We found two classes of bugs: Verilog designs that cause the synthesis tool to produce incorrect output, and Verilog designs that cause the...
Read more >
How We Stopped Worrying About Bugs in Kotlin Compiler
... evaluation on both synthetic and real Kotlin programs; we also compared its performance with classic delta debugging techniques.
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