• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

qiskit-community / qiskit-aqt-provider / 7567300363

18 Jan 2024 08:32AM UTC coverage: 99.83%. Remained the same
7567300363

push

github

web-flow
Prepare for release 1.1.0 (#120)

2353 of 2357 relevant lines covered (99.83%)

3.97 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

100.0
/examples/quickstart-transpile.py
1
# This code is part of Qiskit.
2
#
3
# (C) Copyright Alpine Quantum Technologies GmbH 2023
4
#
5
# This code is licensed under the Apache License, Version 2.0. You may
6
# obtain a copy of this license in the LICENSE.txt file in the root directory
7
# of this source tree or at http://www.apache.org/licenses/LICENSE-2.0.
8
#
9
# Any modifications or derivative works of this code must retain this
10
# copyright notice, and modified files need to carry a notice indicating
11
# that they have been altered from the originals.
12

13
"""Quickstart example on transpiling and executing circuits."""
4✔
14

15
import qiskit
4✔
16
from qiskit.circuit.library import QuantumVolume
4✔
17

18
from qiskit_aqt_provider import AQTProvider
4✔
19

20
# Define a circuit
21
circuit = QuantumVolume(5)
4✔
22
circuit.measure_all()
4✔
23

24
# Select an execution backend
25
provider = AQTProvider("ACCESS_TOKEN")
4✔
26
backend = provider.get_backend("offline_simulator_no_noise")
4✔
27

28
# Transpile the circuit to target the selected AQT backend
29
transpiled_circuit = qiskit.transpile(circuit, backend, optimization_level=2)
4✔
30
print(transpiled_circuit)
4✔
31

32
# Execute the circuit on the selected AQT backend
33
result = backend.run(transpiled_circuit, shots=50).result()
4✔
34

35
if result.success:
4✔
36
    print(result.get_counts())
4✔
37
else:  # pragma: no cover
38
    raise RuntimeError
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc