Skip to content
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

(resolves #83) Probability in tools needs parameter type #87

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

fabie37
Copy link

@fabie37 fabie37 commented Sep 20, 2024

Pull Request

Requesting to pull changes to resolve issue #83

Description

Fixes issue presented in #83

Please include a summary of the changes and the motivation behind them. If applicable, link to any related issues.

Type of Change

Please check the type of change your PR introduces:

  • Bugfix
  • New feature
  • Enhancement
  • Documentation
  • Refactoring
  • Other (please specify):

Checklist

  • I have read the contributing guidelines.
  • I have added tests that prove my fix is effective or that my feature works.
  • I have updated the documentation accordingly.
  • I ran black formatter on the codebase. (CI/CD will fail if neglected)
  • My code follows the project's coding style guidelines.

Related Issues

Screenshots (if applicable)

NA

Additional Notes

Problem:

  • Probability function needs Union[quantum_circuit, ndarray] type for quantum_state
  • quantum_state rename from quantumstate

Issues:

  • Importing quantum_circuit causes circular dependency
  • quantum_circuit import base_core imports from tools qubit
  • measure which is in tools imports probability which imports quantum_circuit

Solution:

    1. Rename qunatumstate to quantum_state
    1. Add Union type from typing
    1. Remove qubit from tools and put into separate folder to separate imports this solve the dependency issue.

Problem:
- Probability function needs Union[quantum_circuit, ndarray] type for quantum_state
- quantum_state rename from quantumstate

Issues:
- Importing quantum_circuit causes circular dependency
- quantum_circuit import base_core imports from tools qubit
- measure which is in tools imports probability which imports quantum_circuit

Solution:
- 1. Rename qunatumstate to quantum_state
- 2. Add Union type from typing
- 3. Remove qubit from tools and put into separate folder to separate imports
this solve the dependency issue.
Problem:
- Probability function needs Union[quantum_circuit, ndarray] type for quantum_state
- quantum_state rename from quantumstate

Issues:
- Importing quantum_circuit causes circular dependency
- quantum_circuit import base_core imports from tools qubit
- measure which is in tools imports probability which imports quantum_circuit

Solution:
- 1. Rename qunatumstate to quantum_state
- 2. Add Union type from typing
- 3. Remove qubit from tools and put into separate folder to separate imports
this solve the dependency issue.
Problem
- Project runs black formatter
- qubit needs to be included in root import

Solution
- run `black qcpy/`
- add `from ./qubit import *`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Probability in tools needs parameter type
1 participant