cirKITers / cirKITers/Split-Optimization
[BUG] Having some trouble when using shots
- Dominant language
- Jupyter Notebook
- Stars
- 1
- Forks
- 0
- PR merge metrics
- No merged PRs in 30d
Description
**Describe the bug**
The current implementation runs fully analytically which is motivated by faster simulation times and by the fact, that the effect of shots are not the focus of interest within this project (tbd.).
However, when trying to enable shots, Pennylane tries to artifically sample from the probabilities received from the quantum circuit output. Within a hybrid setup (with batches) this usually has the dimension of `[B, N]` where N=2^n and B being the batch size.
However, without `batch_input` decorator, the Pennylane sampling devices seems to not expect this additional batch dimension and therefore complains about B being not equal 2^n.
Adding the decorator however requires setting `arbnum` to the parameter index that contains the non-trainable weights, i.e. the input.
In a hybrid setup however, the input is just the output of the preceding classical module and therefore has a `requires_grad` flag, i.e. is trainable, which is why adding this decorator fails.
Contributor guide
No contributing guide indexed for this repository
Research direction
The issue names no file, test, or entry point. Start by reproducing the hybrid batched circuit with shots and inspect the sampling path involving the batched probability output, batch_input, and arbnum; done means shots work without the batch-dimension error or the requires_grad conflict.
Written by the indexing model from the issue text.
Assessment
- Domain
- quantum-computing
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100