This repository has been archived by the owner on Aug 19, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 748
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
35 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
# -*- coding: utf-8 -*- | ||
|
||
# This code is part of Qiskit. | ||
# | ||
# (C) Copyright IBM 2019. | ||
# | ||
# This code is licensed under the Apache License, Version 2.0. You may | ||
# obtain a copy of this license in the LICENSE.txt file in the root directory | ||
# of this source tree or at http://www.apache.org/licenses/LICENSE-2.0. | ||
# | ||
# Any modifications or derivative works of this code must retain this | ||
# copyright notice, and modified files need to carry a notice indicating | ||
# that they have been altered from the originals. | ||
|
||
# pylint: disable=no-member,invalid-name,missing-docstring,no-name-in-module | ||
# pylint: disable=attribute-defined-outside-init,unsubscriptable-object | ||
|
||
from qiskit import assemble | ||
|
||
from .utils import random_circuit | ||
|
||
|
||
class AssemblerBenchmarks: | ||
params = ([1, 2, 5, 8], | ||
[8, 128, 1024, 2048, 4096]) | ||
param_names = ['n_qubits', 'depth'] | ||
timeout = 600 | ||
|
||
def setup(self, n_qubits, depth): | ||
seed = 42 | ||
self.circuit = random_circuit(n_qubits, depth, measure=True, | ||
conditional=True, seed=seed) | ||
|
||
def time_assemble_circuit(self, _, __): | ||
assemble(self.circuit) |