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

Make parameter_values optional #204

Merged
merged 6 commits into from
Mar 14, 2022

Conversation

rathishcholarajan
Copy link
Member

@rathishcholarajan rathishcholarajan commented Mar 11, 2022

Summary

  • Make parameter_values optional so we don't have to do [[]] * n
  • Allow passing just one circuit, ex: circuits=bell instead of circuits=[bell]

Details and comments

Fixes #

@rathishcholarajan rathishcholarajan self-assigned this Mar 11, 2022
@jyu00
Copy link
Collaborator

jyu00 commented Mar 11, 2022

While we are at this, we can make the __init__() functions match the implementation as well, e.g.

class Estimator(BaseEstimator):
    """Estimator primitive."""
    def __init__(
        self,
        circuits: Union[QuantumCircuit, Iterable[QuantumCircuit]], 
        ...
    ):

This allows one to do estimator(circuits=bell) instead of estimator(circuits=[bell]) (the former is also closer to Qiskit convention)

@rathishcholarajan rathishcholarajan changed the title Make circuit_indices, observable_indices and parameter_values optional Make parameter_values optional Mar 11, 2022
@coveralls
Copy link

coveralls commented Mar 14, 2022

Pull Request Test Coverage Report for Build 1981646463

Warning: This coverage report may be inaccurate.

This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.

Details

  • 4 of 4 (100.0%) changed or added relevant lines in 4 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+1.2%) to 70.158%

Totals Coverage Status
Change from base Build 1971188683: 1.2%
Covered Lines: 2043
Relevant Lines: 2912

💛 - Coveralls

@rathishcholarajan rathishcholarajan merged commit af05e33 into Qiskit:main Mar 14, 2022
@rathishcholarajan rathishcholarajan deleted the make-optional branch March 14, 2022 16:22
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.

None yet

3 participants