Skip to content

Commit

Permalink
qubit count update (#635)
Browse files Browse the repository at this point in the history
* qubit count update

* additional instance of H2 qubit count

updated quantinuum.py in backends so H2 returns 56 qubits.

* corrected unit tests

---------

Co-authored-by: kikomiss <[email protected]>
Co-authored-by: Xinyi Joffre <[email protected]>
  • Loading branch information
3 people authored Oct 21, 2024
1 parent 4e5d05d commit 508042c
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 14 deletions.
2 changes: 1 addition & 1 deletion azure-quantum/azure/quantum/qiskit/backends/quantinuum.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ def _get_n_qubits(name):
if ".h1-" in name or "hqs-lt" in name:
return 20
if ".h2-" in name:
return 32
return 56
warnings.warn(
UserWarning(f"Number of qubits not known for target {name}. Defaulting to 20."))
return 20
Expand Down
8 changes: 4 additions & 4 deletions azure-quantum/tests/unit/test_qiskit.py
Original file line number Diff line number Diff line change
Expand Up @@ -1564,7 +1564,7 @@ def test_configuration_quantinuum_backends(self):
self.assertIsNotNone(target_name)
self.assertEqual(20, config.num_qubits)

# The following backends should have 32 qubits
# The following backends should have 56 qubits
for target_name in [
"quantinuum.qpu.h2-1",
"quantinuum.sim.h2-1sc",
Expand All @@ -1573,7 +1573,7 @@ def test_configuration_quantinuum_backends(self):
config = provider.get_backend(target_name).configuration()
# We check for name so the test log includes it when reporting a failure
self.assertIsNotNone(target_name)
self.assertEqual(32, config.num_qubits)
self.assertEqual(56, config.num_qubits)

# The following backends should have 20 qubits
for target_name in [
Expand All @@ -1586,7 +1586,7 @@ def test_configuration_quantinuum_backends(self):
self.assertIsNotNone(target_name)
self.assertEqual(20, config.num_qubits)

# The following backends should have 32 qubits
# The following backends should have 56 qubits
for target_name in [
"quantinuum.qpu.h2-1",
"quantinuum.sim.h2-1sc",
Expand All @@ -1595,7 +1595,7 @@ def test_configuration_quantinuum_backends(self):
config = provider.get_backend(target_name, input_data_format="honeywell.openqasm.v1").configuration()
# We check for name so the test log includes it when reporting a failure
self.assertIsNotNone(target_name)
self.assertEqual(32, config.num_qubits)
self.assertEqual(56, config.num_qubits)

@pytest.mark.rigetti
@pytest.mark.live_test
Expand Down
6 changes: 3 additions & 3 deletions samples/hello-world/HW-quantinuum-cirq.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -124,11 +124,11 @@
"| Target name | Target ID | Number of qubits | Description|\n",
"| --- | ---| ---|---|\n",
"H1-1 Syntax Checker | `quantinuum.sim.h1-1sc` | 20 | Quantinuum's H1-1 Syntax Checker. This will return all zeros in place of actual or simulated results. Use this to validate quantum programs against the H1-1 compiler before submitting to hardware or emulators on Quantinuum's platform. Free of cost. |\n",
"H2-1 Syntax Checker | `quantinuum.sim.h2-1sc` | 32 | Quantinuum's H2-1 Syntax Checker. This will return all zeros in place of actual or simulated results. Use this to validate quantum programs against the H2-1 compiler before submitting to hardware or emulators on Quantinuum's platform. Free of cost. |\n",
"H2-1 Syntax Checker | `quantinuum.sim.h2-1sc` | 56 | Quantinuum's H2-1 Syntax Checker. This will return all zeros in place of actual or simulated results. Use this to validate quantum programs against the H2-1 compiler before submitting to hardware or emulators on Quantinuum's platform. Free of cost. |\n",
"H1-1 Emulator | `quantinuum.sim.h1-1e` | 20 | Quantinuum's H1-1 Emulator. Uses a realistic physical model and noise model of H1-1. |\n",
"H2-1 Emulator | `quantinuum.sim.h2-1e` | 32 | Quantinuum's H2-1 Emulator. Uses a realistic physical model and noise model of H2-1. |\n",
"H2-1 Emulator | `quantinuum.sim.h2-1e` | 56 | Quantinuum's H2-1 Emulator. Uses a realistic physical model and noise model of H2-1. |\n",
"H1-1 | `quantinuum.qpu.h1-1` | 20 | Quantinuum's H1-1 trapped ion device. |\n",
"H2-1 | `quantinuum.qpu.h2-1` | 32 | Quantinuum's H2-1 trapped ion device. |\n",
"H2-1 | `quantinuum.qpu.h2-1` | 56 | Quantinuum's H2-1 trapped ion device. |\n",
"\n",
"For this example, we will use `quantinuum.sim.h1-1sc` to avoid any costs or credit usage. If you wish to emulate or run the actual circuit, you may replace all instances of `quantinuum.sim.h1-1sc` in subsequent code cells with one of the other values in the table above, but please note any costs incurred. To learn more about Quantinuum's targets, check out our [documentation](https://aka.ms/AQ/Quantinuum/Documentation)."
]
Expand Down
6 changes: 3 additions & 3 deletions samples/hello-world/HW-quantinuum-qiskit.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -121,11 +121,11 @@
"| Target name | Target ID | Number of qubits | Description|\n",
"| --- | ---| ---|---|\n",
"H1-1 Syntax Checker | `quantinuum.sim.h1-1sc` | 20 | Quantinuum's H1-1 Syntax Checker. This will return all zeros in place of actual or simulated results. Use this to validate quantum programs against the H1-1 compiler before submitting to hardware or emulators on Quantinuum's platform. Free of cost. |\n",
"H2-1 Syntax Checker | `quantinuum.sim.h2-1sc` | 32 | Quantinuum's H2-1 Syntax Checker. This will return all zeros in place of actual or simulated results. Use this to validate quantum programs against the H2-1 compiler before submitting to hardware or emulators on Quantinuum's platform. Free of cost. |\n",
"H2-1 Syntax Checker | `quantinuum.sim.h2-1sc` | 56 | Quantinuum's H2-1 Syntax Checker. This will return all zeros in place of actual or simulated results. Use this to validate quantum programs against the H2-1 compiler before submitting to hardware or emulators on Quantinuum's platform. Free of cost. |\n",
"H1-1 Emulator | `quantinuum.sim.h1-1e` | 20 | Quantinuum's H1-1 Emulator. Uses a realistic physical model and noise model of H1-1. |\n",
"H2-1 Emulator | `quantinuum.sim.h2-1e` | 32 | Quantinuum's H2-1 Emulator. Uses a realistic physical model and noise model of H2-1. |\n",
"H2-1 Emulator | `quantinuum.sim.h2-1e` | 56 | Quantinuum's H2-1 Emulator. Uses a realistic physical model and noise model of H2-1. |\n",
"H1-1 | `quantinuum.qpu.h1-1` | 20 | Quantinuum's H1-1 trapped ion device. |\n",
"H2-1 | `quantinuum.qpu.h2-1` | 32 | Quantinuum's H2-1 trapped ion device. |\n",
"H2-1 | `quantinuum.qpu.h2-1` | 56 | Quantinuum's H2-1 trapped ion device. |\n",
"\n",
"For this example, we will use `quantinuum.sim.h1-1sc` to avoid any costs or credit usage. If you wish to emulate or run the actual circuit, you may replace all instances of `quantinuum.sim.h1-1sc` in subsequent code cells with one of the other values in the table above, but please note any costs incurred. To learn more about Quantinuum's targets, check out our [documentation](https://aka.ms/AQ/Quantinuum/Documentation)."
]
Expand Down
9 changes: 6 additions & 3 deletions samples/hello-world/HW-quantinuum-qsharp.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -125,11 +125,11 @@
"| Target name | Target ID | Number of qubits | Description|\n",
"| --- | ---| ---|---|\n",
"H1-1 Syntax Checker | `quantinuum.sim.h1-1sc` | 20 | Quantinuum's H1-1 Syntax Checker. This will return all zeros in place of actual or simulated results. Use this to validate quantum programs against the H1-1 compiler before submitting to hardware or emulators on Quantinuum's platform. Free of cost. |\n",
"H2-1 Syntax Checker | `quantinuum.sim.h2-1sc` | 32 | Quantinuum's H2-1 Syntax Checker. This will return all zeros in place of actual or simulated results. Use this to validate quantum programs against the H2-1 compiler before submitting to hardware or emulators on Quantinuum's platform. Free of cost. |\n",
"H2-1 Syntax Checker | `quantinuum.sim.h2-1sc` | 56 | Quantinuum's H2-1 Syntax Checker. This will return all zeros in place of actual or simulated results. Use this to validate quantum programs against the H2-1 compiler before submitting to hardware or emulators on Quantinuum's platform. Free of cost. |\n",
"H1-1 Emulator | `quantinuum.sim.h1-1e` | 20 | Quantinuum's H1-1 Emulator. Uses a realistic physical model and noise model of H1-1. |\n",
"H2-1 Emulator | `quantinuum.sim.h2-1e` | 32 | Quantinuum's H2-1 Emulator. Uses a realistic physical model and noise model of H2-1. |\n",
"H2-1 Emulator | `quantinuum.sim.h2-1e` | 56 | Quantinuum's H2-1 Emulator. Uses a realistic physical model and noise model of H2-1. |\n",
"H1-1 | `quantinuum.qpu.h1-1` | 20 | Quantinuum's H1-1 trapped ion device. |\n",
"H2-1 | `quantinuum.qpu.h2-1` | 32 | Quantinuum's H2-1 trapped ion device. |\n",
"H2-1 | `quantinuum.qpu.h2-1` | 56 | Quantinuum's H2-1 trapped ion device. |\n",
"\n",
"For this example, we will use `quantinuum.sim.h1-1sc` to avoid any costs or credit usage. If you wish to emulate or run the actual circuit, you may replace all instances of `quantinuum.sim.h1-1sc` in subsequent code cells with one of the other values in the table above, but please note any costs incurred. To learn more about Quantinuum's targets, check out our [documentation](https://aka.ms/AQ/Quantinuum/Documentation)."
]
Expand Down Expand Up @@ -174,6 +174,9 @@
"metadata": {
"microsoft": {
"language": "qsharp"
},
"vscode": {
"languageId": "qsharp"
}
},
"outputs": [],
Expand Down

0 comments on commit 508042c

Please sign in to comment.