munich-quantum-toolkit / munich-quantum-toolkit/ddsim
✨ Memory Option
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 162
- Forks
- 40
- Avg merge
- 4h 49m
- Merged PRs (30d)
- 40
Description
What's the problem this feature will solve?
To whom it may concern,
First of all, I apologize if there are some misleading with the way I present the problem.
I was tying to simulate Simon's algorithm with the ddsim backend when I ran into a problem. I didn't know if it was a problem with the missing feature or the implementation I did.
This part is about calling the backend and getting the results:
backend = ddsim.DDSIMProvider().get_backend("qasm_simulator")
result = backend.run(transpiled_circuit, shots=num_shots, memory=True).result()
And here are the warning and error shown:
UserWarning: Option memory is not used by this backend
result = backend.run(transpiled_circuit, shots=num_shots, memory=True).result()
Traceback (most recent call last):
File "path/to/lib/python3.10/site-packages/qiskit/result/result.py", line 226, in get_memory
memory = self.data(experiment)["memory"]
KeyError: 'memory'
Should the mentioned feature be implemented in the backend or am I doing something wrong?
Thanks in advance for your tips.
Describe the solution you'd like
If I understand correctly and the mentioned feature is added, the implementation of Simon's algorithm will be as easy as other Qiskit backends.
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
Start at the DDSIMProvider.get_backend("qasm_simulator") and backend.run(..., memory=True) usage shown in the report, then inspect how results are exposed to Qiskit. Compare the expected get_memory behavior with the current warning and missing "memory" result data; done means memory=True returns per-shot memory without the reported error, with coverage for this invocation.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp, python
- Domain
- backend
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100