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

Demo checks for v0.37 #1150

Merged
merged 9 commits into from
Jul 5, 2024
4 changes: 2 additions & 2 deletions demonstrations/getting_started_with_hybrid_jobs.metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
}
],
"dateOfPublication": "2023-10-16T00:00:00+00:00",
"dateOfLastModification": "2024-03-04T00:00:00+00:00",
"dateOfLastModification": "2024-07-04T00:00:00+00:00",
"categories": [
"Devices and Performance"
],
Expand Down Expand Up @@ -35,4 +35,4 @@
"logo": "/_static/hardware_logos/aws.png"
}
]
}
}
8 changes: 4 additions & 4 deletions demonstrations/getting_started_with_hybrid_jobs.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,11 +52,10 @@

.. warning::

The following demo is only compatible with Python version 3.10 and PennyLane v0.32.
The following demo is only compatible with Python version 3.10.

"""


######################################################################
# First, we define a quantum simulator to run the algorithm on. In this example, we will use the Braket
# local simulator before moving onto a QPU.
Expand Down Expand Up @@ -250,8 +249,9 @@ def circuit(params):

import pandas as pd
import matplotlib.pyplot as plt
from braket.jobs.metrics_data.definitions import MetricType

df = pd.DataFrame(job.metrics())
df = pd.DataFrame(job.metrics(metric_type=MetricType.ITERATION_NUMBER))
df.sort_values(by=["iteration_number"], inplace=True)

plt.plot(df["iteration_number"], df["expval"], "-o", color="orange")
Expand Down Expand Up @@ -373,7 +373,7 @@ def circuit(params):
# is not as smooth as the simulator, but the minimum still is detected correctly!
#

df = pd.DataFrame(qpu_job.metrics())
df = pd.DataFrame(qpu_job.metrics(metric_type=MetricType.ITERATION_NUMBER))
df.sort_values(by=["iteration_number"], inplace=True)

plt.plot(df["iteration_number"], df["expval"], "-o", color="teal")
Expand Down
4 changes: 2 additions & 2 deletions demonstrations/oqc_pulse.metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
}
],
"dateOfPublication": "2023-10-30T00:00:00+00:00",
"dateOfLastModification": "2024-01-01T00:00:00+00:00",
"dateOfLastModification": "2024-07-04T00:00:00+00:00",
"categories": [
"Quantum Computing"
],
Expand Down Expand Up @@ -71,4 +71,4 @@
"weight": 1.0
}
]
}
}
Loading
Loading