Skip to content

Commit

Permalink
Added example of pre-built model
Browse files Browse the repository at this point in the history
  • Loading branch information
edyounis committed Oct 17, 2023
1 parent 3643c0b commit 148ffbd
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions bqskit/compiler/compile.py
Original file line number Diff line number Diff line change
Expand Up @@ -322,6 +322,15 @@ def compile(
>>> model = MachineModel(circuit.num_qudits, gate_set=target_gate_set)
>>> compiled_circuit = compile(circuit, model, optimization_level=2)
You can also use pre-built models from the :obj:`~bqskit.ext` package
for common hardware. For example, to compile to the H1-1 machine
from Quantinuum:
>>> from bqskit import compile, Circuit
>>> from bqskit.ext import H1_1Model
>>> circuit = Circuit.from_file('input.qasm')
>>> compiled_circuit = compile(circuit, H1_1Model)
Raises:
ValueError: If the input is an empty iterable.
Expand Down

0 comments on commit 148ffbd

Please sign in to comment.