Skip to content

✨ State Preparation Routines for DD Package #341

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
burgholzer opened this issue Jun 15, 2023 · 0 comments · Fixed by #445
Closed

✨ State Preparation Routines for DD Package #341

burgholzer opened this issue Jun 15, 2023 · 0 comments · Fixed by #445
Labels
DD Anything related to the DD package feature New feature or request good first issue Good for newcomers

Comments

@burgholzer
Copy link
Member

Currently, the DD package provides methods for directly constructing the decision diagrams for

  • computational basis states
  • any product state that can be constructed from the single-qubit states |0>, |1>, |+>, |->, |L>, |R>

It would be convenient to have some further state preparations available that can be used, e.g., in DDSIM.
Examples:

  • GHZ state
  • W state
  • ... some other important states ...

It should be possible to directly construct the DDs for these states without starting from the all-zero state and applying some operations.

A suggestion would be to name these functions make<SOME-IDENTIFIER>State.
In the interest of providing a little more structure in the DD package, these functions should probably be designed in a way that they can be put into a separate header file and, ideally, not rely on any template stuff, so that the implementation can be moved to a source file.
If this is accomplished, the existing functions for state preparation should be moved as well.

@burgholzer burgholzer added good first issue Good for newcomers feature New feature or request DD Anything related to the DD package labels Jun 15, 2023
@burgholzer burgholzer added this to the DD Package Improvements milestone Jun 15, 2023
@burgholzer burgholzer added this to MQT and MQT Core Jun 15, 2023
@burgholzer burgholzer moved this to Todo in MQT Jun 15, 2023
@burgholzer burgholzer moved this to Todo in MQT Core Jun 15, 2023
@burgholzer burgholzer linked a pull request Oct 19, 2023 that will close this issue
4 tasks
burgholzer added a commit that referenced this issue Nov 15, 2023
## Description

<!-- Please include a summary of the change and which issue is fixed.
Please also include relevant motivation and context. List any
dependencies that are required for this change. -->

In
#[341](#341 (comment))
the DD package provided methods for directly constructing DD for
computational basis states or any product state that can be constructed
from the single-qubit states `|0>, |1>, |+>, |->, |L>, |R>`.

## Updates
There are now 2 routines which implement the 
- GHZ state
- W state,
also, there are unit tests which check that the preparation routines
provide the desired states for a smaller number of qubits.

Fixes
#[341](#341 (comment))
<!--- Replace (issue) with the issue number that is fixed by this pull
request. -->

## Notes
In the beginning, I tried adding the routines to a different header
file, however, I noticed that it was a lot easier to stick to the
current structure and add the functions to the Package.hpp header inside
the DD package. Additionally, I tried to use the existing functions in
order to create & normalize the decision diagrams.

## Checklist:

<!---
This checklist serves as a reminder of a couple of things that ensure
your pull request will be merged swiftly.
-->

- [x] The pull request only contains commits that are related to it.
- [x] I have added appropriate tests and documentation.
- [x] I have made sure that all CI jobs on GitHub pass.
- [x] The pull request introduces no new warnings and follows the
project's style guidelines.

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Lukas Burgholzer <[email protected]>
@github-project-automation github-project-automation bot moved this from Todo to Done in MQT Nov 15, 2023
@github-project-automation github-project-automation bot moved this from Todo to Done in MQT Core Nov 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
DD Anything related to the DD package feature New feature or request good first issue Good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant