Twirled measurements followed by non-twirled measurements
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 25
- Forks
- 12
- Avg merge
- 2h 13m
- Merged PRs (30d)
- 10
Description
Summary
Support of twirled measurements followed by non-twirled measurements is currently shaky. We need to decide if and how we want to support them.
Details
Twirled measurements output the needed bitflips, and also leave behind the virtual gates as optional danglers. This works well if what follows are either gates without a measurement, or a new chain of boxes (starting with a left dressed box, even with other measurements).
However, it is difficult to introduce a non-twirled measurement after a twirled one. The optional dangler has to be collected before the measurement. Because we don't have a mechanism to add just a collector, a twirling box is needed - but no single box can be used:
- A left dressed box will be missing a closing right dressed box.
- A right hand box will be missing a collection on the left.
Currently, you would need to add two empty boxes - a left one, followed by a right one, and only then add the non-twirled measurement.
Possible solutions
- Accept the situation as is, and document it.
- Create a mechanism to insert only a collector.
- Create a mechanism to detect that an emission has no effect. Such mechanism will be able to detect that the emission of a right-dressed box following a twirled-measurement is not needed, and remove it.
- Add a collector to the right of all twirled-measurement boxes.
- "Magically" collect the bit flip and apply it to the non-twirled measurement.
- Other?
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
The issue names no files or tests. Start by tracing how twirled measurements create optional danglers and how collectors and emissions are inserted before subsequent measurements. Compare the listed approaches with the existing behavior; done should mean a decided, implemented, and tested policy for twirled measurements followed by non-twirled measurements, or clear documentation that the current limitation is intentional.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- tooling
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100