Add builtin interner index for empty qubits or clbits #12932
Labels
Rust
This PR or issue is related to Rust code in the repository
type: enhancement
It's working, but needs polishing
I have a change to the interners I want to make once the
DAGCircuit
PR merges that will avoid the need for theVec
here in favour of the static empty slice (which is at least a small saving), but I think the idea of the special "intern key to the 'zero' object" is a good one too. I can see it coming up a lot, and I think it's doable without losing any particular generality in the interners - we can make it likeor something like that, and arrange that the 0 index of
Interner<T: Default>
always corresponds to<T as Default>::default()
.Originally posted by @jakelishman in #12809 (comment)
The text was updated successfully, but these errors were encountered: