Skip to content

Commit 508042c

Browse files
ZachMassakikomissxinyi-joffre
authored
qubit count update (#635)
* 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]>
1 parent 4e5d05d commit 508042c

File tree

5 files changed

+17
-14
lines changed

5 files changed

+17
-14
lines changed

azure-quantum/azure/quantum/qiskit/backends/quantinuum.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ def _get_n_qubits(name):
7777
if ".h1-" in name or "hqs-lt" in name:
7878
return 20
7979
if ".h2-" in name:
80-
return 32
80+
return 56
8181
warnings.warn(
8282
UserWarning(f"Number of qubits not known for target {name}. Defaulting to 20."))
8383
return 20

azure-quantum/tests/unit/test_qiskit.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1564,7 +1564,7 @@ def test_configuration_quantinuum_backends(self):
15641564
self.assertIsNotNone(target_name)
15651565
self.assertEqual(20, config.num_qubits)
15661566

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

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

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

16001600
@pytest.mark.rigetti
16011601
@pytest.mark.live_test

samples/hello-world/HW-quantinuum-cirq.ipynb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -124,11 +124,11 @@
124124
"| Target name | Target ID | Number of qubits | Description|\n",
125125
"| --- | ---| ---|---|\n",
126126
"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",
127-
"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",
127+
"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",
128128
"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",
129-
"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",
129+
"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",
130130
"H1-1 | `quantinuum.qpu.h1-1` | 20 | Quantinuum's H1-1 trapped ion device. |\n",
131-
"H2-1 | `quantinuum.qpu.h2-1` | 32 | Quantinuum's H2-1 trapped ion device. |\n",
131+
"H2-1 | `quantinuum.qpu.h2-1` | 56 | Quantinuum's H2-1 trapped ion device. |\n",
132132
"\n",
133133
"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)."
134134
]

samples/hello-world/HW-quantinuum-qiskit.ipynb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -121,11 +121,11 @@
121121
"| Target name | Target ID | Number of qubits | Description|\n",
122122
"| --- | ---| ---|---|\n",
123123
"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",
124-
"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",
124+
"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",
125125
"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",
126-
"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",
126+
"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",
127127
"H1-1 | `quantinuum.qpu.h1-1` | 20 | Quantinuum's H1-1 trapped ion device. |\n",
128-
"H2-1 | `quantinuum.qpu.h2-1` | 32 | Quantinuum's H2-1 trapped ion device. |\n",
128+
"H2-1 | `quantinuum.qpu.h2-1` | 56 | Quantinuum's H2-1 trapped ion device. |\n",
129129
"\n",
130130
"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)."
131131
]

samples/hello-world/HW-quantinuum-qsharp.ipynb

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -125,11 +125,11 @@
125125
"| Target name | Target ID | Number of qubits | Description|\n",
126126
"| --- | ---| ---|---|\n",
127127
"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",
128-
"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",
128+
"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",
129129
"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",
130-
"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",
130+
"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",
131131
"H1-1 | `quantinuum.qpu.h1-1` | 20 | Quantinuum's H1-1 trapped ion device. |\n",
132-
"H2-1 | `quantinuum.qpu.h2-1` | 32 | Quantinuum's H2-1 trapped ion device. |\n",
132+
"H2-1 | `quantinuum.qpu.h2-1` | 56 | Quantinuum's H2-1 trapped ion device. |\n",
133133
"\n",
134134
"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)."
135135
]
@@ -174,6 +174,9 @@
174174
"metadata": {
175175
"microsoft": {
176176
"language": "qsharp"
177+
},
178+
"vscode": {
179+
"languageId": "qsharp"
177180
}
178181
},
179182
"outputs": [],

0 commit comments

Comments
 (0)