Skip to content

Commit 737060f

Browse files
authored
Use quantum_volume() function in the PGO script (#15931)
* Use quantum_volume() function in the PGO script This commit updates the pgo utility scale script to use the quantum_volume generator function instead of the legacy QuantumVolume class. When the script was originally written the generator function didn't exist yet so using the class made sense. But the QuantumVolume class has since been superseded by the rust generator function and also the class has also been deprecated pending removal in a future 3.0 release. Using the generator function now will avoid the deprecation warning during the pgo script run. It will also generate the circuits faster as the function is much faster and also provide profiling data for pgo about the quantum_volume function since it is written in rust. * Update circuit name to reflect the quantum volume value the circuit is for
1 parent 09bcf15 commit 737060f

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

tools/pgo_scripts/test_utility_scale.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
from qiskit import qasm2
2020
from qiskit.providers.fake_provider import GenericBackendV2
2121
from qiskit.transpiler import CouplingMap
22-
from qiskit.circuit.library import QuantumVolume
22+
from qiskit.circuit.library import quantum_volume
2323
from qiskit.transpiler.preset_passmanagers import generate_preset_pass_manager
2424

2525
QASM_DIR = os.path.join(
@@ -80,9 +80,9 @@ def _main():
8080
strict=False,
8181
)
8282
qaoa_circ.name = "qaoa_barabasi_albert_N100_3reps"
83-
qv_circ = QuantumVolume(100, seed=123456789)
83+
qv_circ = quantum_volume(cmap.size(), seed=123456789)
8484
qv_circ.measure_all()
85-
qv_circ.name = "QV1267650600228229401496703205376"
85+
qv_circ.name = "QV12554203470773361527671578846415332832204710888928069025792"
8686
hwb_circ = qasm2.load(
8787
os.path.join(QASM_DIR, "hwb12.qasm"),
8888
include_path=qasm2.LEGACY_INCLUDE_PATH,

0 commit comments

Comments
 (0)