Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update QV test for Qiskit 1.1 #1443

Merged
merged 1 commit into from
Apr 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[[0.02110822695364887, 0.013936320980929177, 0.06762829067477494, 0.05640378028262168, 0.019434855941263804, 0.01254494041140876, 0.3597504343657043, 0.44919315038964813], [0.1722976165549457, 0.029841680707019494, 0.015656642181112637, 0.22730547539691617, 0.12732050329410488, 0.06013320751345239, 0.23738660274412582, 0.13005827160832278], [0.025330413591789218, 0.05365793634629424, 0.005510054610574176, 0.2659480366696103, 0.06644689405510834, 0.16522547308232338, 0.06550526962201847, 0.35237592202228174], [0.03752531358760119, 0.0639087743319445, 0.05174568892966019, 0.026258899708790133, 0.06025270407432933, 0.4752249297421205, 0.17263176026475763, 0.11245192936079637], [0.31320609444467884, 0.0064025098682649, 0.2454242441765262, 0.11834874135446874, 0.1410876641286843, 0.016731059242565263, 0.09755353034344483, 0.06124615644136609], [0.019448190781865507, 0.05499334515101417, 0.13640962401919648, 0.027348070327303475, 0.048411270171909986, 0.16728339683880306, 0.3206808043538741, 0.225425298356034], [0.00960924565105907, 0.5136650426998607, 0.0011415111620172156, 0.020066510917153436, 0.0010864777624874085, 0.12088859340271874, 0.003926145584809557, 0.32961647281989354], [0.0033843151967825605, 0.0904375862783492, 0.14082024165587934, 0.028700581811163736, 0.5206374518621331, 0.1449007040623369, 0.020747488106116044, 0.050371631027239266], [0.02953881873020507, 0.16412229218641006, 0.0044071010350494825, 0.2837594965902758, 0.015330305509777008, 0.10239055990425917, 0.02799467182995681, 0.37245675421406627], [0.1322823017311934, 0.4458209485696668, 0.0, 0.0, 0.048864936086664826, 0.3730318136124744, 0.0, 0.0], [0.08168205214501269, 0.014301663582061402, 0.031796449397294785, 0.030646878482070747, 0.03347798878280955, 0.30568913585068463, 0.48978086811193544, 0.012624963648130906], [0.10270572333629126, 0.2054021653045906, 0.3214150326296182, 0.06540473121561362, 0.030757362188421174, 0.2211717639672315, 0.04658693468342603, 0.006556286674807662], [0.15936994988625908, 0.10431864042664502, 0.08299765915752665, 0.02804542799741586, 0.06960987222202304, 0.15337460586250898, 0.0958361933378381, 0.3064476511097831], [0.004950387743443303, 0.036932489074513596, 0.03652458327201384, 0.2650570018042196, 0.009291507543548598, 0.10388620362313436, 0.1691098123043206, 0.37424801463480634], [0.05972657537009159, 0.19914118274809703, 0.08779406969022188, 0.25663496507647837, 0.12477975035159891, 0.1996292453671398, 0.012677912029188738, 0.059616299367184024], [0.4809352140937508, 0.1984839027335819, 0.08741344211264122, 0.01856979807616571, 0.020353167602611928, 0.06987732405489348, 0.02366752222163191, 0.10069962910472299], [0.08304167605222394, 0.04112711434346582, 0.06461187209953644, 0.29581303509821427, 0.1801493690994243, 0.15019357344113535, 0.03342178624142832, 0.1516415736245708], [0.11034335151398833, 0.1535142244794561, 0.010924645942967047, 0.1595660489816288, 0.012260755380658836, 0.2373347471191917, 0.25694446799872295, 0.05911175858338647], [0.144941751473959, 0.009237621811653846, 0.016193183621015943, 0.015626036290447263, 0.07939130818210129, 0.1282415772050653, 0.522578062681002, 0.08379045873475498], [0.12323459136182116, 0.04647043553049166, 0.36115923872923944, 0.06606545697235076, 0.14875149834994203, 0.016170939689423118, 0.22211811256352207, 0.01602972680320908]]
6 changes: 5 additions & 1 deletion test/library/quantum_volume/test_qv.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
from qiskit_experiments.framework import ExperimentData
from qiskit_experiments.library import QuantumVolume
from qiskit_experiments.framework import ExperimentDecoder
from qiskit_experiments.framework.package_deps import version_is_at_least

SEED = 42

Expand Down Expand Up @@ -88,7 +89,10 @@ def test_qv_ideal_probabilities(self):
)
# compare to pre-calculated probabilities
dir_name = os.path.dirname(os.path.abspath(__file__))
probabilities_json_file = "qv_ideal_probabilities.json"
if version_is_at_least("qiskit", 1.1):
probabilities_json_file = "qv_ideal_probabilities_qiskit_1_1.json"
else:
probabilities_json_file = "qv_ideal_probabilities.json"
with open(
os.path.join(dir_name, probabilities_json_file), "r", encoding="utf-8"
) as json_file:
Expand Down