Repo Added
|
Files
1268
|
Badge
Embed ▾
README BADGES
|
push
github
Add support for QuantumCircuit.layout to qpy (#10148) * Add support for QuantumCircuit.layout to qpy This commit adds the missing support for QuantumCircuit.layout to the qpy format. This necessitates bumping the QPY format version to 8 to accomodate the extra data needed for representing the details of the layout. The tricky piece with representing the 3 TranspileLayout attributes is representing the virtual bits in the initial layout because there is no guarantee that the input circuit's registers are in the output circuit (typically they are not when transpile() is used). Fixes #10112 * Fix handling of empty layout * Expand test coverage * Fix lint * Add qpy compat tests * Fix compat tests * Add release notes * Adjust layout creation to be register independent * Finish docs * Only check layout in compat tests with circuits * Fix typos * Fix doc typo in qiskit/qpy/__init__.py Co-authored-by: John Lapeyre <jlapeyre@users.noreply.github.com> * Adjust introduction version for layout qpy compat tests * Unify qpy compat test version filter style * Add new line to layout error message * Simplify serialization logic Co-authored-by: Jake Lishman <jake.lishman@ibm.com> * Doc fixes * Improve test coverage * Don't reuse bits between initial layout and circuit in qpy compat tests. * Update qiskit/qpy/__init__.py * Fix test typo * Use a register in compat tests for consistent equality * Update test/python/qpy/test_circuit_load_from_qpy.py --------- Co-authored-by: John Lapeyre <jlapeyre@users.noreply.github.com> Co-authored-by: Jake Lishman <jake.lishman@ibm.com> (cherry picked from commit dbf1230ab)
71447 of 83159 relevant lines covered (85.92%)
45847.82 hits per line
Coverage | ∆ | File | Lines | Relevant | Covered | Missed | Hits/Line |
---|