forked from Qiskit/qiskit
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add
QuantumCircuit.noop
for instructionless qubit use
This closes a usability gap between the low-level construction of control-flow ops and the builder interface. In the builder interface, there was previously no way to consider a qubit to be "used" by the scope without adding some corresponding instruction on it. It was possible to express this already by manually constructing the blocks. In general, this is not so useful for the control-flow operations that we already have present because the additional dependency is spurious and simply stymies some ability to perform optimisations. It is also a fair optimisation to remove the spurious data dependency in the transpiler. It becomes more useful with the upcoming `box`, however; this has additional semantics around its incident data dependencies.
- Loading branch information
1 parent
315d6ad
commit dc9e5c9
Showing
4 changed files
with
141 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
features_circuits: | ||
- | | ||
A new method, :meth:`.QuantumCircuit.noop`, allows qubits to be marked as explicitly used within | ||
a control-flow builder scope, without adding a corresponding operation to them. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters