You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Expected Behavior
When generating an ADAPT ansatz with scbk, there should be 2 qubits removed
Current Behavior
ADAPT returns a circuit with superfluous quits which are not actually used for anything. These can be removed using the trim_qubits method of the Circuit class.
Steps to Reproduce (minimal example)
The ansatz in the project Neon should be a 2 qubit circuit, but it clearly indicates a width of 4 qubits, even though there are only gates on the first 2.
Environment
MacOS 11.6.1
The text was updated successfully, but these errors were encountered:
Thank you for reporting this ! I think you raise an important point we may not have looked into: meta VQEs or complex algorithms in general may not have a constant number of qubits. Maybe it can grow, maybe it can go down as well. When going to a different step or concatenating circuits, maybe we should try trimming once in a while and updating qubit number if relevant to ensure we keep resources low during runtime.
I think it's probably a small surgery we can do inside the code of ADAPT itself, unless we foresee VQE itself may have fancy ansatze whose number of qubits-in-use may change because... stuff.
Issue: Bug Report
Expected Behavior
When generating an ADAPT ansatz with scbk, there should be 2 qubits removed
Current Behavior
ADAPT returns a circuit with superfluous quits which are not actually used for anything. These can be removed using the
trim_qubits
method of the Circuit class.Steps to Reproduce (minimal example)
The ansatz in the project Neon should be a 2 qubit circuit, but it clearly indicates a width of 4 qubits, even though there are only gates on the first 2.
Environment
MacOS 11.6.1
The text was updated successfully, but these errors were encountered: