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

re-create qamomile #51

Merged
merged 15 commits into from
Aug 16, 2024
Merged

re-create qamomile #51

merged 15 commits into from
Aug 16, 2024

Conversation

yuyamashiro
Copy link
Contributor

No description provided.

@yuyamashiro yuyamashiro reopened this Aug 14, 2024
@yuyamashiro yuyamashiro marked this pull request as draft August 14, 2024 00:34
@yuyamashiro
Copy link
Contributor Author

We have introduced an intermediate representation for quantum circuits and operators in Qamomile, which has led to a significant revision of Qamomile’s interface. The Converter class has been introduced. This Converter class provides encoders and decoders that transform instances of constrained optimization problems (compiled_instance) into objects suitable for quantum algorithms such as QAOA and QRAO. The encoder converts these instances into the intermediate representation. Additionally, Qamomile now includes the ability to modify quantum circuits and operators using this intermediate representation, allowing users to customize algorithms using only Qamomile, independent of the SDK.

Next, we introduced the Transpiler class. The Transpiler class provides functionality to convert Qamomile’s intermediate representation into SDKs like Qiskit or Quri-parts. With the introduction of the intermediate representation, we have clearly separated the processes of conversion and transpilation, and these are now part of the interface that users can directly interact with. Basic usage can be found in qamomile-docs/quickstart.ipynb.

If you need any further modifications, feel free to ask!

@yuyamashiro yuyamashiro requested a review from Jacomichi August 14, 2024 00:49
@yuyamashiro
Copy link
Contributor Author

yuyamashiro commented Aug 14, 2024

Tasks

  • implement rxx ryy rzz
  • write quri-parts test
  • write qaoa and alternative ansatz example notebook

@yuyamashiro yuyamashiro marked this pull request as ready for review August 15, 2024 13:42
Copy link
Collaborator

@Jacomichi Jacomichi left a comment

Choose a reason for hiding this comment

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

LGTM
The rest of the QRAO Hamiltonian will be added in a separate PR.

qamomile/qiskit/transpiler.py Show resolved Hide resolved
qamomile/core/converters/qaoa.py Outdated Show resolved Hide resolved
) -> qp_c.LinearMappedUnboundParametricQuantumCircuit:
"""Apply a parametric two qubit gate to the Qiskit circuit."""
angle = convert_parameter(gate.parameter, parameters=parameters)
match gate.gate:
Copy link
Collaborator

Choose a reason for hiding this comment

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

The match syntax is available in python 3.10 or later.

qamomile/quri_parts/transpiler.py Show resolved Hide resolved
qamomile/core/circuit/circuit.py Outdated Show resolved Hide resolved
qamomile/core/circuit/circuit.py Show resolved Hide resolved
@yuyamashiro yuyamashiro merged commit 55a2903 into main Aug 16, 2024
0 of 5 checks passed
@yuyamashiro yuyamashiro deleted the feature/ir_hamiltonian branch August 16, 2024 00:57
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.

2 participants