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

MAHOUT-468 & MAHOUT-469 Add parameter object and bind at execution #472

Merged
merged 26 commits into from
Nov 14, 2024

Conversation

rawkintrevo
Copy link
Contributor

Purpose of PR:

Please give a short description of what this PR is for.
#468 Add a parameter object
#469 Bind Parameters at execution
with bonus notebook for optimization loop external to qumat

Important ToDos

Please mark each with an "x"

  • A JIRA ticket exists (if not, please create this first)[https://issues.apache.org/jira/browse/mahout/]

  • Title of PR is "MAHOUT-XXXX Brief Description of Changes" where XXXX is the JIRA number.

  • Created unit tests where appropriate

  • Assigned JIRA to self

  • Added documentation in scala docs/java docs, and to website

https://colab.research.google.com/drive/1QgeqKZtkC_hOmffRprxJWMcC1g9YsMOE?usp=sharing qiskit
https://colab.research.google.com/drive/1M5tT7h2wRiGNYx48g_FDGPTKuogKxEzc?usp=sharing cirq

bracket untested

Does this change break earlier versions?
no

Is this the beginning of a larger project for which a feature branch should be made?
no

This was linked to issues Nov 5, 2024
@rawkintrevo
Copy link
Contributor Author

On the last commit- i had to specify my fork in the install (bc I added functionality that isn't available in main), we need a more elegant solution to do this.

@rawkintrevo rawkintrevo linked an issue Nov 14, 2024 that may be closed by this pull request
Copy link
Contributor

@andrewmusselman andrewmusselman left a comment

Choose a reason for hiding this comment

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

I've read through and left some comments; can we add a button to run the Optimization_Example.ipynb in Colab so we can show it working?

@@ -29,7 +29,7 @@
{
"cell_type": "code",
"source": [
"!pip install git+https://github.com/apache/mahout.git@main"
"# pip install git+https://github.com/apache/mahout.git@main"
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this supposed to be commented out?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, for notebooks to actually be tested on the code that is being checked in it does.

@@ -0,0 +1,144 @@
{
Copy link
Contributor

Choose a reason for hiding this comment

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

Does this need an "Open in Colab" button?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It could, what is the standard on those? (I've seen in notebook, in a readme file, both, neither)

Copy link
Contributor

Choose a reason for hiding this comment

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

I don't have a rule of thumb but I know it's on the Simple Example and it's great. Let's just add to .ipynb files?

"qumat_instance.create_empty_circuit(1)\n",
"\n",
"# Apply parameterized RX, RY, and RZ gates\n",
"qumat_instance.apply_rx_gate(0, 'theta')\n",
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't see where theta, phi, and lambda are defined, should we add those definitions?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

That's a fair call out. They're standard in rotational gates, but it wouldn't hurt to add some docs calling them out.

Copy link
Contributor

Choose a reason for hiding this comment

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

If this runs for you I'm good approving; I'll make a new issue to add these def'ns later.

@andrewmusselman andrewmusselman merged commit c722868 into apache:main Nov 14, 2024
1 check passed
@andrewmusselman
Copy link
Contributor

andrewmusselman commented Nov 14, 2024

Added these two issues to track minor improvements
#474
#475

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.

Testing isn't right. Bind parameter values at execution Add a Parameter object
2 participants