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

Move wrapper load_qasm_* methods to a submodule #533

Conversation

delapuente
Copy link
Contributor

Motivation and Context

It was intended that load_qasm_string and load_qasm_file call static constructors in the QuantumCircuit instead of being implemented at wrapper module-level.

How Has This Been Tested?

Passing the same test suite without alterations.

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

ajavadia
ajavadia previously approved these changes Jun 6, 2018
@delapuente
Copy link
Contributor Author

Per a discussion with @atilag we agreed on moving these methods again to wrapper but to a different submodule so QuantumCircuit class remains as lean as possible. Utilities and higher abstractions should live outside the core.

@delapuente delapuente force-pushed the move-loading-from-qasm-to-quantum-circuit-static-methods branch from 366adbd to c0890cb Compare June 7, 2018 11:54
atilag
atilag previously approved these changes Jun 7, 2018
@delapuente delapuente force-pushed the move-loading-from-qasm-to-quantum-circuit-static-methods branch from c0890cb to 7c473a1 Compare June 8, 2018 07:47
@diego-plan9
Copy link
Member

For the new files, can you adjust the license header so it follows the format recently introduced by #550 ?

# -*- coding: utf-8 -*-

# Copyright 2018, IBM.
#
# This source code is licensed under the Apache License, Version 2.0 found in
# the LICENSE.txt file in the root directory of this source tree.

# pylint: disable=something-only-if-there-is-no-other-way

"""
Description of the module ...
"""
from qiskit import ...

@delapuente delapuente force-pushed the move-loading-from-qasm-to-quantum-circuit-static-methods branch from 7c473a1 to b85e5de Compare June 8, 2018 17:28
@CLAassistant
Copy link

CLAassistant commented Jun 8, 2018

CLA assistant check
All committers have signed the CLA.

atilag
atilag previously approved these changes Jun 11, 2018
@atilag
Copy link
Member

atilag commented Jun 11, 2018

@delapuente can you update CHANGELOG.rst accordingly? :)

Copy link
Member

@diego-plan9 diego-plan9 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, @delapuente !

@diego-plan9 diego-plan9 changed the title Moving wrapper top-level methods to the QuantumCircuit static API Move wrapper load_qasm_* methods to a submodule Jun 11, 2018
@diego-plan9 diego-plan9 changed the title Move wrapper load_qasm_* methods to a submodule Move wrapper load_qasm_* methods to a submodule Jun 11, 2018
@atilag atilag merged commit 80c5de1 into Qiskit:master Jun 11, 2018
@delapuente delapuente deleted the move-loading-from-qasm-to-quantum-circuit-static-methods branch November 8, 2018 15:08
lia-approves pushed a commit to edasgupta/qiskit-terra that referenced this pull request Jul 30, 2019
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

5 participants