qcbench 0.1.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
qcbench/__init__.py ADDED
@@ -0,0 +1,6 @@
1
+ """Quantum computer characterization from reproducible experiments and shot counts."""
2
+ __version__="0.1.0"
3
+ from .plans import make_plan,plan_digest,to_qasm3,validate_plan
4
+ from .analysis import analyze,make_dataset,validate_dataset
5
+ from .reporting import write_json,write_csv
6
+ __all__=["make_plan","plan_digest","to_qasm3","validate_plan","analyze","make_dataset","validate_dataset","write_json","write_csv","__version__"]
qcbench/__main__.py ADDED
@@ -0,0 +1,2 @@
1
+ from .cli import main
2
+ raise SystemExit(main())
qcbench/analysis.py ADDED
@@ -0,0 +1,101 @@
1
+ """Analyze complete hardware datasets without conflating simulated and measured runs."""
2
+ from datetime import datetime,timezone
3
+ import math
4
+ import json
5
+ import platform
6
+ from importlib.metadata import version
7
+ from .plans import validate_plan,plan_digest
8
+ from .statistics import validate_counts,wilson,marginal_successes,fit_decay
9
+
10
+ KINDS=("hardware","simulator","synthetic")
11
+
12
+
13
+ def make_dataset(plan, counts, *, execution_kind, backend_name, job_id=None, metadata=None):
14
+ """Bind externally collected counts to the exact plan. No execution is performed."""
15
+ validate_plan(plan)
16
+ if not isinstance(counts,dict): raise ValueError("counts must map circuit IDs to counts objects")
17
+ records=[dict(circuit_id=cid,counts=value) for cid,value in counts.items()]
18
+ data=dict(schema_version=1,plan_sha256=plan_digest(plan),execution_kind=execution_kind,
19
+ backend_name=backend_name,job_id=job_id,metadata={} if metadata is None else metadata,records=records)
20
+ validate_dataset(plan,data)
21
+ return data
22
+
23
+
24
+ def validate_dataset(plan,data):
25
+ validate_plan(plan)
26
+ if not isinstance(data,dict) or data.get("schema_version")!=1 or data.get("plan_sha256")!=plan_digest(plan):
27
+ raise ValueError("Dataset schema or plan fingerprint mismatch")
28
+ if data.get("execution_kind") not in KINDS: raise ValueError("Declare hardware, simulator or synthetic execution_kind")
29
+ if not isinstance(data.get("backend_name"),str) or not data["backend_name"].strip(): raise ValueError("backend_name is required")
30
+ if data.get("job_id") is not None and (not isinstance(data["job_id"],str) or not data["job_id"].strip()):
31
+ raise ValueError("job_id must be a nonempty string or null")
32
+ if not isinstance(data.get("metadata",{}),dict): raise ValueError("metadata must be a JSON object")
33
+ try: json.dumps(data.get("metadata",{}),allow_nan=False)
34
+ except (TypeError,ValueError) as exc: raise ValueError("metadata must contain finite JSON values") from exc
35
+ records=data.get("records")
36
+ if not isinstance(records,list): raise ValueError("records must be a list")
37
+ expected={c["id"]:c for c in plan["circuits"]}; seen=set()
38
+ for row in records:
39
+ if not isinstance(row,dict): raise ValueError("Every record must be an object")
40
+ cid=row.get("circuit_id")
41
+ if not isinstance(cid,str) or cid not in expected or cid in seen: raise ValueError("Unknown or duplicate circuit ID")
42
+ seen.add(cid); validate_counts(row.get("counts"),expected[cid]["n_qubits"])
43
+ if "effective_time_us" in row:
44
+ t=row["effective_time_us"]
45
+ if type(t) not in (int,float) or not math.isfinite(t) or t<0: raise ValueError("Invalid effective delay")
46
+ if seen!=expected.keys(): raise ValueError("Dataset must contain exactly one record for every planned circuit")
47
+ return data
48
+
49
+
50
+ def analyze(plan, data, confidence=.95):
51
+ validate_dataset(plan,data)
52
+ wilson(0,1,confidence) # Validate before applying any confidence adjustment.
53
+ rows={r["circuit_id"]:r for r in data["records"]}; metrics=[]
54
+ ghz={}; decay={}
55
+ for spec in plan["circuits"]:
56
+ record=rows[spec["id"]]; counts=record["counts"]; shots=sum(counts.values())
57
+ meta=spec["metadata"]; benchmark=spec["benchmark"]
58
+ if benchmark=="readout":
59
+ errors=marginal_successes(counts,meta["logical_qubit"],1-meta["prepared"])
60
+ metrics.append(dict(benchmark=benchmark,metric="assignment_error",physical_qubit=meta["physical_qubit"],
61
+ prepared=meta["prepared"],**wilson(errors,shots,confidence)))
62
+ elif benchmark=="mirror":
63
+ success=counts.get("0"*spec["n_qubits"],0)
64
+ metrics.append(dict(benchmark=benchmark,metric="all_zero_survival",depth=meta["depth"],sequence=meta["sequence"],
65
+ **wilson(success,shots,confidence)))
66
+ elif benchmark=="ghz": ghz[spec["id"]]=(spec,counts,shots)
67
+ else:
68
+ success=marginal_successes(counts,meta["logical_qubit"],1)
69
+ point=dict(time_us=record.get("effective_time_us",meta["time_us"]),requested_time_us=meta["time_us"],
70
+ successes=success,shots=shots,**{"probability_one":wilson(success,shots,confidence)})
71
+ decay.setdefault((benchmark,meta["physical_qubit"]),[]).append(point)
72
+ if ghz:
73
+ n=len(plan["config"]["physical_qubits"])
74
+ component_confidence=1-(1-confidence)/(n+1)
75
+ _,counts,shots=ghz["ghz.z"]
76
+ population=wilson(counts.get("0"*n,0)+counts.get("1"*n,0),shots,component_confidence)
77
+ phases=[]
78
+ for k in range(n):
79
+ _,counts,shots=ghz[f"ghz.phase{k}"]
80
+ good=sum(c for bits,c in counts.items() if bits.count("1")%2==k%2)
81
+ phases.append(dict(phase_index=k,**wilson(good,shots,component_confidence)))
82
+ fidelity=population["estimate"]/2+sum(p["estimate"] for p in phases)/n-.5
83
+ interval=[population["interval"][i]/2+sum(p["interval"][i] for p in phases)/n-.5 for i in range(2)]
84
+ interval=[min(1.,max(0.,v)) for v in interval]
85
+ metrics.append(dict(benchmark="ghz",metric="ghz_fidelity",estimate=fidelity,interval=interval,confidence=confidence,
86
+ method="Population plus equatorial parity; Bonferroni-adjusted approximate Wilson component intervals",
87
+ population=population,phases=phases,measurement_settings=n+1))
88
+ for (benchmark,qubit),points in decay.items():
89
+ metrics.append(dict(benchmark=benchmark,metric="decay_time_us",physical_qubit=qubit,
90
+ **fit_decay(sorted(points,key=lambda p:p["time_us"]))))
91
+ from . import __version__
92
+ return dict(schema_version=1,qcbench_version=__version__,created_at=datetime.now(timezone.utc).isoformat(),
93
+ suite=plan["suite"],plan_sha256=plan_digest(plan),execution_kind=data["execution_kind"],
94
+ analysis_environment=dict(python=platform.python_version(),platform=platform.platform(),numpy=version("numpy"),scipy=version("scipy")),
95
+ backend_name=data["backend_name"],job_id=data.get("job_id"),metadata=data.get("metadata",{}),
96
+ config=plan["config"],total_circuits=len(rows),total_shots=sum(sum(r["counts"].values()) for r in rows.values()),
97
+ metrics=metrics,limitations=["Provenance is caller-declared, not independently attested.",
98
+ "Readout errors include state preparation and gate errors; no SPAM separation or mitigation.",
99
+ "Confidence intervals assume independent shots and stable measurement settings.",
100
+ "Mirror survival is not randomized benchmarking or a per-gate error estimate.",
101
+ "Coherence fits assume a single exponential with free asymptote; inspect fit quality and time coverage."])
qcbench/cli.py ADDED
@@ -0,0 +1,62 @@
1
+ import argparse
2
+ import json
3
+ import sys
4
+ from pathlib import Path
5
+ from . import __version__
6
+ from .plans import BENCHMARKS,DEFAULT_TIMES,make_plan,validate_plan,to_qasm3
7
+ from .analysis import analyze
8
+ from .demo import synthetic_dataset
9
+ from .reporting import write_json,write_csv
10
+
11
+
12
+ def main(argv=None):
13
+ parser=argparse.ArgumentParser(description="Quantum computer experiment planning and shot-count analysis")
14
+ parser.add_argument("--version",action="version",version=__version__)
15
+ commands=parser.add_subparsers(dest="command",required=True)
16
+ commands.add_parser("list",help="List hardware benchmark families")
17
+ plan=commands.add_parser("plan",help="Generate a device-neutral experiment plan")
18
+ plan.add_argument("--physical-qubits",type=int,nargs="+",default=[0,1])
19
+ plan.add_argument("--benchmark",action="append",choices=BENCHMARKS)
20
+ plan.add_argument("--times-us",type=float,nargs="+",default=DEFAULT_TIMES)
21
+ plan.add_argument("--mirror-depths",type=int,nargs="+",default=[1,4,8])
22
+ plan.add_argument("--mirror-sequences",type=int,default=3)
23
+ plan.add_argument("--seed",type=int,default=0)
24
+ plan.add_argument("--output",type=Path,required=True)
25
+ export=commands.add_parser("export",help="Export logical-wire OpenQASM 3 circuits")
26
+ export.add_argument("plan",type=Path); export.add_argument("--directory",type=Path,required=True)
27
+ analysis=commands.add_parser("analyze",help="Analyze real or simulated shot records")
28
+ analysis.add_argument("plan",type=Path); analysis.add_argument("data",type=Path)
29
+ analysis.add_argument("--confidence",type=float,default=.95)
30
+ analysis.add_argument("--output",type=Path); analysis.add_argument("--csv",type=Path)
31
+ demo=commands.add_parser("demo",help="Generate explicitly synthetic example data and reports")
32
+ demo.add_argument("--directory",type=Path,required=True)
33
+ demo.add_argument("--shots",type=int,default=4096); demo.add_argument("--seed",type=int,default=123)
34
+ args=parser.parse_args(argv)
35
+ try:
36
+ if args.command=="list": print("\n".join(BENCHMARKS)); return 0
37
+ if args.command=="plan":
38
+ value=make_plan(args.physical_qubits,args.benchmark or BENCHMARKS,args.times_us,
39
+ args.mirror_depths,args.mirror_sequences,args.seed)
40
+ write_json(value,args.output)
41
+ print(json.dumps({"circuits":len(value["circuits"]),"output":str(args.output),"submitted":False}))
42
+ elif args.command=="export":
43
+ value=validate_plan(json.loads(args.plan.read_text()))
44
+ args.directory.mkdir(parents=True,exist_ok=True)
45
+ for spec in value["circuits"]:
46
+ (args.directory/(spec["id"]+".qasm")).write_text(to_qasm3(spec),encoding="utf-8")
47
+ write_json(value,args.directory/"plan.json")
48
+ print(json.dumps({"exported":len(value["circuits"]),"submitted":False}))
49
+ elif args.command=="demo":
50
+ args.directory.mkdir(parents=True,exist_ok=True)
51
+ value=make_plan(); data=synthetic_dataset(value,args.shots,args.seed); report=analyze(value,data)
52
+ for name,item in [("plan.json",value),("counts.json",data),("report.json",report)]: write_json(item,args.directory/name)
53
+ write_csv(report,args.directory/"report.csv")
54
+ print(json.dumps({"execution_kind":"synthetic","circuits":report["total_circuits"],"output":str(args.directory)}))
55
+ else:
56
+ report=analyze(json.loads(args.plan.read_text()),json.loads(args.data.read_text()),args.confidence)
57
+ if args.csv: write_csv(report,args.csv)
58
+ if args.output: write_json(report,args.output)
59
+ else: print(json.dumps(report,indent=2,allow_nan=False))
60
+ return 0
61
+ except (ValueError,OSError,TypeError,KeyError) as exc:
62
+ print("qcbench: "+str(exc),file=sys.stderr); return 2
qcbench/demo.py ADDED
@@ -0,0 +1,37 @@
1
+ """Synthetic shot fixtures, clearly labelled and never reported as real QPU results."""
2
+ import math
3
+ import numpy as np
4
+ from .plans import validate_plan
5
+ from .analysis import make_dataset
6
+
7
+
8
+ def synthetic_dataset(plan,shots=4096,seed=123):
9
+ validate_plan(plan)
10
+ if type(shots) is not int or not 1<=shots<=1000000: raise ValueError("shots must be in 1..1000000")
11
+ if type(seed) is not int or not 0<=seed<2**32: raise ValueError("seed must be in 0..2**32-1")
12
+ rng=np.random.default_rng(seed); counts={}
13
+ for spec in plan["circuits"]:
14
+ n=spec["n_qubits"]; meta=spec["metadata"]; benchmark=spec["benchmark"]
15
+ if benchmark=="ghz":
16
+ if meta["basis"]=="z":
17
+ bits=np.repeat(rng.integers(0,2,size=(shots,1)),n,axis=1)
18
+ else:
19
+ bits=rng.integers(0,2,size=(shots,n))
20
+ bits[:,-1]=(np.sum(bits[:,:-1],axis=1)%2)^(meta["phase_index"]%2)
21
+ bits^=(rng.random((shots,n))<.015).astype(int)
22
+ elif benchmark=="mirror":
23
+ bits=rng.integers(0,2,size=(shots,n)); bits[rng.random(shots)<math.exp(-.015*n*meta["depth"])]=0
24
+ else:
25
+ q=meta["logical_qubit"]
26
+ if benchmark=="readout": probability=.025 if meta["prepared"]==0 else .965
27
+ elif benchmark=="t1": probability=.025+.94*math.exp(-meta["time_us"]/75.)
28
+ else: probability=.5+.47*math.exp(-meta["time_us"]/55.)
29
+ bits=np.zeros((shots,n),dtype=int); bits[:,q]=(rng.random(shots)<probability).astype(int)
30
+ result={}
31
+ for sample in bits:
32
+ key="".join(str(int(b)) for b in reversed(sample))
33
+ result[key]=result.get(key,0)+1
34
+ counts[spec["id"]]=result
35
+ return make_dataset(plan,counts,execution_kind="synthetic",backend_name="synthetic-fixture",
36
+ metadata={"fixture_seed":seed,"fixture_model":"Family-specific shot distributions, not a gate-level noise simulator",
37
+ "nominal_t1_us":75.,"nominal_t2_echo_us":55.})
qcbench/plans.py ADDED
@@ -0,0 +1,122 @@
1
+ """Deterministic hardware experiment plans and portable OpenQASM 3 export."""
2
+ import hashlib
3
+ import json
4
+ import math
5
+ import random
6
+
7
+ BENCHMARKS = ("readout", "ghz", "mirror", "t1", "t2_echo")
8
+ DEFAULT_TIMES = (0., 10., 25., 50., 100., 200.)
9
+
10
+
11
+ def _integers(values, name, minimum, maximum, unique=True):
12
+ values = list(values)
13
+ if not values or any(type(x) is not int or not minimum <= x <= maximum for x in values):
14
+ raise ValueError(f"{name} must be nonempty integers in {minimum}..{maximum}")
15
+ if unique and len(set(values)) != len(values):
16
+ raise ValueError(f"{name} must not contain duplicates")
17
+ return values
18
+
19
+
20
+ def make_plan(physical_qubits=(0, 1), benchmarks=BENCHMARKS, times_us=DEFAULT_TIMES,
21
+ mirror_depths=(1, 4, 8), mirror_sequences=3, seed=0):
22
+ """Build an SDK-neutral, deterministic plan; no device execution occurs."""
23
+ physical = _integers(physical_qubits, "physical_qubits", 0, 100000)
24
+ n = len(physical)
25
+ if n > 32: raise ValueError("At most 32 selected qubits are supported")
26
+ benchmarks = list(benchmarks)
27
+ if not benchmarks or len(set(benchmarks)) != len(benchmarks) or any(x not in BENCHMARKS for x in benchmarks):
28
+ raise ValueError("Select unique supported benchmarks")
29
+ if "ghz" in benchmarks and n < 2: raise ValueError("GHZ requires at least two qubits")
30
+ if type(seed) is not int or not 0 <= seed < 2**32: raise ValueError("seed must be in 0..2**32-1")
31
+ if type(mirror_sequences) is not int or not 1 <= mirror_sequences <= 100:
32
+ raise ValueError("mirror_sequences must be in 1..100")
33
+ depths = _integers(mirror_depths, "mirror_depths", 1, 256)
34
+ times = list(times_us)
35
+ if not times or any(type(t) not in (int,float) or not math.isfinite(t) or t < 0 or t > 1e9 for t in times):
36
+ raise ValueError("times_us must contain finite times in 0..1e9")
37
+ if sorted(set(times)) != times: raise ValueError("times_us must be unique and increasing")
38
+ if any(x in benchmarks for x in ("t1", "t2_echo")) and (len(times)<5 or times[0]!=0):
39
+ raise ValueError("Coherence experiments need at least five times, starting at zero")
40
+ times = [float(t) for t in times]
41
+ config = dict(physical_qubits=physical, benchmarks=benchmarks, times_us=times,
42
+ mirror_depths=depths, mirror_sequences=mirror_sequences, seed=seed)
43
+ circuits = []
44
+ def gate(name, qubits, angle=None, duration_us=None):
45
+ op = dict(name=name,qubits=list(qubits))
46
+ if angle is not None: op["angle"] = angle
47
+ if duration_us is not None: op["duration_us"] = duration_us
48
+ return op
49
+ def add(identifier, benchmark, operations, **metadata):
50
+ circuits.append(dict(id=identifier,benchmark=benchmark,n_qubits=n,operations=operations,metadata=metadata))
51
+ if "readout" in benchmarks:
52
+ for q,p in enumerate(physical):
53
+ for prepared in (0,1):
54
+ add(f"readout.q{q}.p{prepared}","readout",[gate("x",[q])] if prepared else [],
55
+ logical_qubit=q,physical_qubit=p,prepared=prepared)
56
+ if "ghz" in benchmarks:
57
+ preparation = [gate("h",[0])] + [gate("cx",[q-1,q]) for q in range(1,n)]
58
+ add("ghz.z","ghz",preparation,basis="z")
59
+ for k in range(n):
60
+ theta=k*math.pi/n
61
+ ops=preparation+[gate("barrier",range(n))]
62
+ for q in range(n): ops += [gate("rz",[q],-theta),gate("h",[q])]
63
+ add(f"ghz.phase{k}","ghz",ops,basis="equatorial",phase_index=k,theta=theta)
64
+ if "mirror" in benchmarks:
65
+ rng=random.Random(seed)
66
+ for depth in depths:
67
+ for sequence in range(mirror_sequences):
68
+ forward=[]
69
+ for layer in range(depth):
70
+ for q in range(n):
71
+ forward += [gate("ry",[q],rng.uniform(-math.pi,math.pi)),gate("rz",[q],rng.uniform(-math.pi,math.pi))]
72
+ forward += [gate("cx",[q,q+1]) for q in range(layer%2,n-1,2)]
73
+ forward += [gate("barrier",range(n))]
74
+ inverse=[]
75
+ for op in reversed(forward):
76
+ inv=dict(op)
77
+ if "angle" in inv: inv["angle"]=-inv["angle"]
78
+ inverse.append(inv)
79
+ add(f"mirror.d{depth}.s{sequence}","mirror",forward+inverse,depth=depth,sequence=sequence)
80
+ for benchmark in ("t1","t2_echo"):
81
+ if benchmark not in benchmarks: continue
82
+ for q,p in enumerate(physical):
83
+ for index,t in enumerate(times):
84
+ if benchmark=="t1":
85
+ ops=[gate("x",[q]),gate("barrier",range(n)),gate("delay",[q],duration_us=t)]
86
+ else:
87
+ ops=[gate("ry",[q],math.pi/2),gate("barrier",range(n)),
88
+ gate("delay",[q],duration_us=t/2),gate("x",[q]),
89
+ gate("delay",[q],duration_us=t/2),gate("barrier",range(n)),gate("ry",[q],math.pi/2)]
90
+ add(f"{benchmark}.q{q}.t{index}",benchmark,ops,logical_qubit=q,physical_qubit=p,time_us=t)
91
+ return dict(schema_version=1,suite="qpu-characterization-v1",config=config,circuits=circuits)
92
+
93
+
94
+ def validate_plan(plan):
95
+ """Accept only this version's canonical plans; reject edited or ambiguous circuits."""
96
+ if not isinstance(plan,dict) or plan.get("schema_version")!=1 or plan.get("suite")!="qpu-characterization-v1":
97
+ raise ValueError("Unsupported plan schema or suite")
98
+ config=plan.get("config")
99
+ if not isinstance(config,dict): raise ValueError("Missing plan configuration")
100
+ try: expected=make_plan(**config)
101
+ except (TypeError,KeyError) as exc: raise ValueError("Invalid plan configuration") from exc
102
+ if json.dumps(plan,sort_keys=True,allow_nan=False)!=json.dumps(expected,sort_keys=True,allow_nan=False): raise ValueError("Plan differs from its canonical configuration; regenerate it")
103
+ return plan
104
+
105
+
106
+ def plan_digest(plan):
107
+ validate_plan(plan)
108
+ return hashlib.sha256(json.dumps(plan,sort_keys=True,separators=(",",":"),allow_nan=False).encode()).hexdigest()
109
+
110
+
111
+ def to_qasm3(circuit):
112
+ """Export logical wires; physical mapping is not encoded as a hardware promise."""
113
+ n=circuit["n_qubits"]
114
+ lines=["OPENQASM 3.0;",'include "stdgates.inc";',f"qubit[{n}] q;",f"bit[{n}] meas;"]
115
+ for op in circuit["operations"]:
116
+ args=", ".join(f"q[{q}]" for q in op["qubits"])
117
+ name=op["name"]
118
+ if name=="delay": lines.append(f"delay[{op['duration_us']:.17g}us] {args};")
119
+ elif "angle" in op: lines.append(f"{name}({op['angle']:.17g}) {args};")
120
+ else: lines.append(f"{name} {args};")
121
+ lines.extend(f"meas[{q}] = measure q[{q}];" for q in range(n))
122
+ return "\n".join(lines)+"\n"
@@ -0,0 +1,90 @@
1
+ """Optional circuit preparation and IBM Runtime submission. No saved credentials."""
2
+ import math
3
+ from .plans import validate_plan,plan_digest
4
+ from .analysis import make_dataset
5
+
6
+
7
+ def to_qiskit(spec, *, dt=None, alignment=1):
8
+ from qiskit import QuantumCircuit,QuantumRegister,ClassicalRegister
9
+ if dt is not None and (not math.isfinite(dt) or dt<=0): raise ValueError("dt must be positive seconds")
10
+ if type(alignment) is not int or alignment<1: raise ValueError("alignment must be a positive integer")
11
+ n=spec["n_qubits"]
12
+ circuit=QuantumCircuit(QuantumRegister(n,"q"),ClassicalRegister(n,"meas"),name=spec["id"])
13
+ effective=0.
14
+ for op in spec["operations"]:
15
+ name=op["name"]; q=op["qubits"]
16
+ if name=="delay":
17
+ duration=op["duration_us"]
18
+ if dt is None:
19
+ circuit.delay(duration,q[0],unit="us"); effective+=duration
20
+ else:
21
+ ticks=int(math.floor(duration*1e-6/dt/alignment+.5))*alignment
22
+ circuit.delay(ticks,q[0],unit="dt"); effective+=ticks*dt*1e6
23
+ elif name=="barrier": circuit.barrier(*q)
24
+ elif name in ("ry","rz"): getattr(circuit,name)(op["angle"],*q)
25
+ else: getattr(circuit,name)(*q)
26
+ # Prevent state preparation / measurement simplification across the final boundary.
27
+ circuit.barrier(*range(n))
28
+ circuit.measure(range(n),range(n))
29
+ circuit.metadata={"qcbench_circuit_id":spec["id"]}
30
+ if spec["benchmark"] in ("t1","t2_echo"): circuit.metadata["effective_time_us"]=effective
31
+ return circuit
32
+
33
+
34
+ def prepare_qiskit(plan,backend=None):
35
+ """Prepare circuits, optionally compile against a device without submitting jobs."""
36
+ validate_plan(plan)
37
+ from importlib.metadata import version
38
+ dt=getattr(backend,"dt",None) if backend is not None else None
39
+ target=getattr(backend,"target",None) if backend is not None else None
40
+ alignment=math.lcm(int(getattr(target,"granularity",1)),int(getattr(target,"pulse_alignment",1))) if target else 1
41
+ circuits=[to_qiskit(c,dt=dt,alignment=alignment) for c in plan["circuits"]]
42
+ if backend is not None:
43
+ from qiskit.transpiler.preset_passmanagers import generate_preset_pass_manager
44
+ manager=generate_preset_pass_manager(backend=backend,optimization_level=0,
45
+ initial_layout=plan["config"]["physical_qubits"],seed_transpiler=plan["config"]["seed"])
46
+ circuits=manager.run(circuits)
47
+ execution=dict(plan_sha256=plan_digest(plan),qiskit_version=version("qiskit"),optimization_level=0,
48
+ requested_initial_layout=plan["config"]["physical_qubits"],device_dt_seconds=dt,
49
+ delay_alignment_dt=alignment,compiled_for_backend=backend is not None,circuits=[])
50
+ for native,spec in zip(circuits,plan["circuits"]):
51
+ record=dict(circuit_id=spec["id"],depth=native.depth(),num_qubits=native.num_qubits,
52
+ gate_counts={str(k):int(v) for k,v in native.count_ops().items()},layout=str(native.layout))
53
+ if "effective_time_us" in (native.metadata or {}): record["effective_time_us"]=native.metadata["effective_time_us"]
54
+ execution["circuits"].append(record)
55
+ return circuits,execution
56
+
57
+
58
+ def collect_sampler_result(plan,result,*,execution_kind,backend_name,job_id=None,execution_metadata=None):
59
+ """Collect ordered Sampler V2 publications, each with the single 'meas' register."""
60
+ validate_plan(plan)
61
+ results=list(result)
62
+ if len(results)!=len(plan["circuits"]): raise ValueError("Sampler result count does not match plan")
63
+ counts={}
64
+ for spec,pub in zip(plan["circuits"],results):
65
+ try: counts[spec["id"]]=pub.data.meas.get_counts()
66
+ except AttributeError as exc: raise ValueError("Expected Sampler V2 data.meas.get_counts()") from exc
67
+ metadata=execution_metadata or {}
68
+ if metadata and metadata.get("plan_sha256")!=plan_digest(plan): raise ValueError("Execution metadata fingerprint mismatch")
69
+ data=make_dataset(plan,counts,execution_kind=execution_kind,backend_name=backend_name,job_id=job_id,metadata=metadata)
70
+ if metadata:
71
+ compiled={row["circuit_id"]:row for row in metadata["circuits"]}
72
+ if compiled.keys()!={c["id"] for c in plan["circuits"]}: raise ValueError("Incomplete compiled-circuit metadata")
73
+ for row in data["records"]:
74
+ if "effective_time_us" in compiled[row["circuit_id"]]:
75
+ row["effective_time_us"]=compiled[row["circuit_id"]]["effective_time_us"]
76
+ from .analysis import validate_dataset
77
+ validate_dataset(plan,data)
78
+ return data
79
+
80
+
81
+ def submit_ibm(plan,backend,*,shots=1024,allow_submit=False):
82
+ """Explicit opt-in cloud submission; may consume paid QPU time. Returns (job, metadata)."""
83
+ if allow_submit is not True:
84
+ raise ValueError("Submission disabled: explicitly set allow_submit=True after reviewing QPU cost and plan")
85
+ if type(shots) is not int or not 1<=shots<=10000000: raise ValueError("shots must be in 1..10000000")
86
+ circuits,metadata=prepare_qiskit(plan,backend)
87
+ from qiskit_ibm_runtime import SamplerV2
88
+ job=SamplerV2(mode=backend).run(circuits,shots=shots)
89
+ metadata["requested_shots_per_circuit"]=shots
90
+ return job,metadata
qcbench/reporting.py ADDED
@@ -0,0 +1,20 @@
1
+ """Portable reports, with provenance on every exported metric."""
2
+ import csv
3
+ import json
4
+ from pathlib import Path
5
+
6
+
7
+ def write_json(value,path):
8
+ Path(path).write_text(json.dumps(value,indent=2,allow_nan=False)+"\n",encoding="utf-8")
9
+
10
+
11
+ def write_csv(report,path):
12
+ fields=["execution_kind","backend_name","benchmark","metric","physical_qubit","prepared","depth","sequence",
13
+ "estimate","interval_low","interval_high","confidence","shots","status","decay_time_us","decay_time_std_us","reason"]
14
+ with Path(path).open("w",newline="",encoding="utf-8") as stream:
15
+ writer=csv.DictWriter(stream,fieldnames=fields); writer.writeheader()
16
+ for metric in report["metrics"]:
17
+ row={k:metric[k] for k in fields if k in metric}
18
+ row.update(execution_kind=report["execution_kind"],backend_name=report["backend_name"])
19
+ if "interval" in metric: row.update(interval_low=metric["interval"][0],interval_high=metric["interval"][1])
20
+ writer.writerow(row)
qcbench/statistics.py ADDED
@@ -0,0 +1,62 @@
1
+ """Shot-count validation, intervals and bounded exponential coherence fits."""
2
+ import math
3
+ from statistics import NormalDist
4
+ import warnings
5
+ import numpy as np
6
+ from scipy.optimize import OptimizeWarning, curve_fit
7
+
8
+
9
+ def validate_counts(counts, n_qubits):
10
+ if not isinstance(counts,dict) or not counts: raise ValueError("Counts must be a nonempty bitstring-to-integer object")
11
+ for bits,count in counts.items():
12
+ if not isinstance(bits,str) or len(bits)!=n_qubits or set(bits)-{"0","1"}:
13
+ raise ValueError("Counts keys must be fixed-width binary strings (MSB left)")
14
+ if type(count) is not int or count<0: raise ValueError("Counts must be nonnegative integers, not probabilities")
15
+ if sum(counts.values())<=0: raise ValueError("Counts must contain at least one shot")
16
+ return counts
17
+
18
+
19
+ def wilson(successes, shots, confidence=.95):
20
+ if type(shots) is not int or type(successes) is not int or not 0<=successes<=shots or shots<=0:
21
+ raise ValueError("Require integer 0 <= successes <= shots, shots > 0")
22
+ if type(confidence) not in (int,float) or not 0<confidence<1: raise ValueError("confidence must be between zero and one")
23
+ p=successes/shots; z=NormalDist().inv_cdf((1+confidence)/2); z2=z*z
24
+ center=(p+z2/(2*shots))/(1+z2/shots)
25
+ half=z*math.sqrt(p*(1-p)/shots+z2/(4*shots*shots))/(1+z2/shots)
26
+ return dict(estimate=p,interval=[max(0.,center-half),min(1.,center+half)],confidence=confidence,
27
+ successes=successes,shots=shots,method="Wilson score interval")
28
+
29
+
30
+ def marginal_successes(counts, logical_qubit, value):
31
+ return sum(c for bits,c in counts.items() if int(bits[-1-logical_qubit])==value)
32
+
33
+
34
+ def fit_decay(points):
35
+ """Fit p(t)=p_inf+(p_zero-p_inf)*exp(-t/T); return explicit non-fit states."""
36
+ t=np.array([p["time_us"] for p in points],dtype=float)
37
+ p=np.array([p["successes"]/p["shots"] for p in points])
38
+ shots=np.array([p["shots"] for p in points],dtype=float)
39
+ if len(set(t))<5 or max(t)<=0:
40
+ return dict(status="unidentifiable",reason="Need five distinct effective delay times",points=points)
41
+ if np.ptp(p)<max(.03,2/math.sqrt(float(min(shots)))):
42
+ return dict(status="unidentifiable",reason="Insufficient measured decay contrast",points=points)
43
+ scale=float(max(t)); x=t/scale
44
+ def model(x,p_zero,p_inf,tau): return p_inf+(p_zero-p_inf)*np.exp(-x/tau)
45
+ sigma=np.sqrt(np.maximum(p*(1-p),1/(4*shots))/shots)
46
+ try:
47
+ with warnings.catch_warnings():
48
+ warnings.simplefilter("error",OptimizeWarning)
49
+ params,cov=curve_fit(model,x,p,p0=[float(p[0]),float(p[-1]),.4],sigma=sigma,
50
+ absolute_sigma=True,bounds=([0,0,1e-6],[1,1,1000]),maxfev=20000)
51
+ p_zero,p_inf,tau=[float(v) for v in params]
52
+ std=float(math.sqrt(max(0,cov[2,2]))*scale)
53
+ if not np.isfinite(cov).all() or std>=tau*scale or p_zero-p_inf<.03 or tau>=999:
54
+ return dict(status="unidentifiable",reason="Fit parameters are poorly constrained",points=points)
55
+ chi2=float(sum(((p-model(x,*params))/sigma)**2))
56
+ return dict(status="fitted",decay_time_us=tau*scale,decay_time_std_us=std,p_zero=p_zero,p_inf=p_inf,
57
+ chi_squared=chi2,degrees_of_freedom=len(points)-3,points=points,
58
+ reduced_chi_squared=chi2/(len(points)-3),
59
+ fit_quality="model_mismatch" if chi2/(len(points)-3)>5 else "inspect_residuals",
60
+ method="Bounded weighted nonlinear least squares; asymptotic covariance uncertainty")
61
+ except (RuntimeError,ValueError,OptimizeWarning) as exc:
62
+ return dict(status="unidentifiable",reason=str(exc),points=points)
@@ -0,0 +1,189 @@
1
+ Metadata-Version: 2.4
2
+ Name: qcbench
3
+ Version: 0.1.0
4
+ Summary: Reproducible quantum computer characterization from hardware circuits and shot counts
5
+ Author: QCBench contributors
6
+ License-Expression: Apache-2.0
7
+ Project-URL: Homepage, https://github.com/qcbench-org/qcbench
8
+ Project-URL: Repository, https://github.com/qcbench-org/qcbench
9
+ Project-URL: Issues, https://github.com/qcbench-org/qcbench/issues
10
+ Keywords: quantum,QPU,hardware,benchmark,characterization
11
+ Classifier: Development Status :: 3 - Alpha
12
+ Classifier: Intended Audience :: Science/Research
13
+ Classifier: Programming Language :: Python :: 3
14
+ Classifier: Topic :: Scientific/Engineering :: Physics
15
+ Requires-Python: >=3.11
16
+ Description-Content-Type: text/markdown
17
+ License-File: LICENSE
18
+ Requires-Dist: numpy>=1.24
19
+ Requires-Dist: scipy>=1.10
20
+ Provides-Extra: qiskit
21
+ Requires-Dist: qiskit<3,>=1.2; extra == "qiskit"
22
+ Provides-Extra: ibm
23
+ Requires-Dist: qiskit<3,>=1.2; extra == "ibm"
24
+ Requires-Dist: qiskit-ibm-runtime<1,>=0.30; extra == "ibm"
25
+ Provides-Extra: dev
26
+ Requires-Dist: pytest>=7; extra == "dev"
27
+ Requires-Dist: build; extra == "dev"
28
+ Requires-Dist: twine; extra == "dev"
29
+ Dynamic: license-file
30
+
31
+ # QCBench
32
+
33
+ [![PyPI](https://img.shields.io/pypi/v/qcbench)](https://pypi.org/project/qcbench/)
34
+ [![CI](https://github.com/qcbench-org/qcbench/actions/workflows/ci.yml/badge.svg)](https://github.com/qcbench-org/qcbench/actions/workflows/ci.yml)
35
+
36
+ **Reproducible quantum computer characterization from hardware experiments and shot counts.**
37
+
38
+ QCBench plans small QPU experiments, exports circuits, collects shot-count results and produces quantitative reports with uncertainty and provenance. Its first release measures **readout assignment error, GHZ state fidelity, mirror-circuit survival, T1 and spin-echo T2**. The focus is quantum-computer behavior under an actual experiment, rather than SDK operation speed.
39
+
40
+ Version 0.1.0 includes independently implemented circuit generators and analysis, an optional Qiskit device compiler, IBM Runtime submission and result collection, and a fully offline synthetic demonstration. It is an initial characterization toolkit, not a comprehensive hardware ranking, vendor-certified calibration suite or composite quantum-computer score. No real-device performance numbers are bundled or claimed.
41
+
42
+ ## Install
43
+
44
+ Requires Python 3.11 or newer. Core dependencies are NumPy and SciPy; quantum SDKs are optional.
45
+
46
+ ```bash
47
+ pip install qcbench
48
+ pip install 'qcbench[qiskit]' # Native circuits and device-aware compilation
49
+ pip install 'qcbench[ibm]' # Also IBM Runtime submission and collection
50
+ ```
51
+
52
+ ## Try it offline
53
+
54
+ ```bash
55
+ qcbench list
56
+ qcbench demo --directory demo-results
57
+ qcbench analyze demo-results/plan.json demo-results/counts.json \
58
+ --output report.json --csv report.csv
59
+ ```
60
+
61
+ The demo writes a deterministic experiment plan, synthetic shot records, JSON analysis and CSV metrics. Every dataset and report carries `execution_kind="synthetic"`. The synthetic fixture uses family-specific outcome distributions; it is not a gate-level noise simulator or a hardware result.
62
+
63
+ ## Prepare an experiment
64
+
65
+ ```bash
66
+ qcbench plan --physical-qubits 0 1 --output plan.json
67
+ qcbench export plan.json --directory circuits
68
+
69
+ # Select only readout checks for one physical qubit.
70
+ qcbench plan --physical-qubits 7 --benchmark readout --output readout-plan.json
71
+
72
+ # Customize the time range and mirror circuits.
73
+ qcbench plan --physical-qubits 0 1 2 --times-us 0 10 25 50 100 200 \
74
+ --mirror-depths 1 4 8 --mirror-sequences 3 --seed 42 --output plan.json
75
+ ```
76
+
77
+ The default two-qubit plan contains **40 circuits**. Plan generation and OpenQASM export do not connect to a provider or submit jobs. OpenQASM 3 exports use logical wires; the accompanying plan contains the requested physical-qubit mapping. A provider must compile these programs for its device before execution. Delay and instruction support vary by hardware.
78
+
79
+ Selected physical indices must be unique nonnegative integers; up to 32 selected qubits are supported. GHZ needs at least two. Coherence experiments require at least five unique increasing delay times starting at zero. Times are in microseconds. Mirror depth counts forward layers; each forward circuit is followed by its inverse.
80
+
81
+ ## Measurements
82
+
83
+ | Family | Experiment | Reported quantity |
84
+ | --- | --- | --- |
85
+ | `readout` | Prepare 0 and 1 on each selected qubit | P(measure 1 \| prepare 0) and P(measure 0 \| prepare 1), with Wilson intervals |
86
+ | `ghz` | Prepare a GHZ state and measure Z populations plus n equatorial parity settings | Estimated GHZ fidelity, component results and approximate combined interval |
87
+ | `mirror` | Seeded local rotations/CNOT layers followed by the inverse | All-zero return probability at each depth and sequence, with Wilson interval |
88
+ | `t1` | X preparation followed by a variable idle delay | Single-exponential probability-one decay time in microseconds |
89
+ | `t2_echo` | RY(pi/2), half delay, X, half delay, RY(pi/2) | Spin-echo probability-one decay time in microseconds |
90
+
91
+ GHZ fidelity uses **n+1 measurement settings** and includes coherence; all-zero/all-one population alone is not treated as fidelity. Readout results include preparation and gate errors. Mirror survival is not randomized benchmarking, and no per-gate error or quantum-volume value is inferred from it. There is no error mitigation in this release. See [METHODS.md](METHODS.md) for equations, assumptions and limitations.
92
+
93
+ ## Import hardware shot counts
94
+
95
+ All counts use fixed-width binary strings, with the **most significant bit on the left**. Logical qubit 0 is the rightmost bit. Logical index i maps initially to `plan['config']['physical_qubits'][i]`. Counts must be nonnegative integers with a positive total, not quasi-probabilities, floating-point weights, hex strings or multiple-register strings.
96
+
97
+ For example, make and analyze a single-qubit readout dataset:
98
+
99
+ ```python
100
+ from qcbench import make_plan, make_dataset, analyze, write_json
101
+
102
+ plan = make_plan(physical_qubits=[7], benchmarks=['readout'])
103
+ # Replace these illustrative counts with your measured results.
104
+ counts = {
105
+ 'readout.q0.p0': {'0': 980, '1': 20},
106
+ 'readout.q0.p1': {'0': 35, '1': 965},
107
+ }
108
+ data = make_dataset(
109
+ plan, counts,
110
+ execution_kind='synthetic', # Use 'hardware' only for actual device counts.
111
+ backend_name='illustrative-counts',
112
+ )
113
+ report = analyze(plan, data)
114
+ write_json(plan, 'plan.json')
115
+ write_json(data, 'counts.json')
116
+ write_json(report, 'report.json')
117
+ ```
118
+
119
+ For real measurements, declare `execution_kind='hardware'`, supply the device name and job ID, and include relevant execution metadata. Use `simulator` for simulated circuits and `synthetic` for constructed data. Provenance is caller-declared, not independently authenticated. Merely setting the hardware label does not establish that data came from a QPU.
120
+
121
+ A dataset is bound to its exact plan by SHA-256. Analysis rejects missing, duplicate or unknown circuit IDs and mismatched plans. A complete dataset must contain one counts object for every planned circuit; partial jobs should be completed before analysis. Canonical version-1 plans are generated by `make_plan`; editing their circuit definitions or metadata is rejected. Custom experiment families require a new implementation and suite version.
122
+
123
+ ## Qiskit preparation and sampler results
124
+
125
+ ```python
126
+ from qcbench import make_plan, analyze
127
+ from qcbench.qiskit_adapter import prepare_qiskit, collect_sampler_result
128
+ from qiskit.primitives import StatevectorSampler
129
+
130
+ plan = make_plan(benchmarks=['readout', 'ghz', 'mirror'])
131
+ circuits, execution = prepare_qiskit(plan)
132
+ # Local simulator example; no cloud access or QPU submission.
133
+ result = StatevectorSampler(seed=7).run(circuits, shots=1024).result()
134
+ data = collect_sampler_result(
135
+ plan, result, execution_kind='simulator',
136
+ backend_name='StatevectorSampler', execution_metadata=execution,
137
+ )
138
+ report = analyze(plan, data)
139
+ ```
140
+
141
+ For device compilation, call `prepare_qiskit(plan, backend)`. It uses optimization level 0, the requested initial layout and a fixed compiler seed. Barriers separate mirror layers, the inversion boundary, state preparation and final measurement so the intended mirror experiment is not trivially optimized into an empty circuit. Review the compiled gate counts and layout before submission; other provider optimizers may treat barriers differently.
142
+
143
+ When a backend exposes `dt`, idle delays are rounded to a multiple of its advertised granularity and pulse alignment. Effective idle times are recorded and used in decay analysis when the execution metadata is passed to the collector. These times exclude pulse durations. The requested physical list is an initial layout, not a promise that routing never uses other qubits. Compiled width, layout and gate counts are retained. Backend-specific timing and instruction constraints still require review.
144
+
145
+ ## IBM QPU execution
146
+
147
+ The source repository includes [examples/ibm_hardware.py](https://github.com/qcbench-org/qcbench/blob/main/examples/ibm_hardware.py). By default, it writes a plan without connecting to IBM. It requires `--submit` and an explicit accessible backend to run a job:
148
+
149
+ ```bash
150
+ # Plan only. No account lookup, cloud connection or job submission.
151
+ python examples/ibm_hardware.py --physical-qubits 0 1
152
+
153
+ # After reviewing the plan and configuring your IBM account locally:
154
+ python examples/ibm_hardware.py --backend YOUR_BACKEND_NAME \
155
+ --physical-qubits 0 1 --shots 1024 --submit
156
+ ```
157
+
158
+ The Python API `submit_ibm(plan, backend, shots=1024, allow_submit=True)` returns `(job, execution_metadata)`. Omitting the explicit opt-in raises an error before submission. A job can consume paid QPU time; review the backend, plan, circuit count, shot count and provider limits first. No cloud jobs run as part of installation, tests, demo, plan, export or analysis. Credentials use the provider SDK's existing account configuration and are never stored by QCBench.
159
+
160
+ The example records the submission/job ID, raw counts and report. It expects the ordered Sampler V2 result format and one classical register named `meas`. Retain the exact plan and publication order when retrieving a job later. Device submission is implemented but has not been validated on a paid QPU as part of this release; local compilation, local sampler collection and a stubbed submission protocol are tested.
161
+
162
+ ## Reports and interpretation
163
+
164
+ Reports include package/suite versions, analysis timestamp and software environment, device/provenance labels, job ID, plan fingerprint, requested physical mapping, raw experiment configuration, total circuits/shots, per-metric statistics and fit diagnostics. Raw counts stay in the dataset for independent reanalysis. The report timestamp is analysis time, not a claim about when a device executed the experiment. Put execution timestamps, calibration identifiers and provider/compiler options in dataset metadata when available; keep credentials out of metadata.
165
+
166
+ Default confidence is 95%, adjustable with `qcbench analyze --confidence`. Wilson intervals are approximate frequentist intervals, not posterior probabilities. GHZ components use a Bonferroni adjustment with approximate Wilson intervals, so the combined result is not an exact-coverage or device-independent entanglement certificate. Shots must be independent and measurement settings stable for the statistical interpretation to apply.
167
+
168
+ Coherence fitting uses a bounded, weighted three-parameter exponential, with free initial probability and asymptote. It reports covariance-based standard error, chi-squared and degrees of freedom. Flat signals, too few effective times or poorly constrained parameters return `status='unidentifiable'` instead of a fabricated T value. A large reduced chi-squared is flagged as a model mismatch; a fitted value alone does not validate the model. Inspect time coverage, pulse calibration, residuals and drift before comparing devices. No bootstrap or calibration-systematic uncertainty is claimed.
169
+
170
+ Successful report production exits 0, including reports containing unidentifiable fits. Input, validation and file errors exit 2. Invalid performance should remain visible in reports, not be confused with an I/O failure.
171
+
172
+ ## Development
173
+
174
+ ```bash
175
+ python -m pip install -e '.[ibm,dev]'
176
+ python -m pytest -q
177
+ python -m build
178
+ python -m twine check --strict dist/*
179
+ ```
180
+
181
+ Tests cover statistical boundaries, arbitrary-state GHZ fidelity, analytic decay recovery, provenance/count validation, ideal circuits, local sampler integration, device compilation and submission opt-in without cloud jobs. Core-only environments skip the optional adapter tests. See [CONTRIBUTING.md](CONTRIBUTING.md) and [RELEASING.md](RELEASING.md). Code and original experiment definitions are Apache-2.0 licensed.
182
+
183
+ ## Roadmap
184
+
185
+ Additional QPU providers, richer job recovery, calibration snapshots, gate-set and randomized benchmarking protocols, application-level workloads, drift-aware repeats, systematic uncertainty, connectivity sweeps and cross-device result views. Each added protocol must define its experiment, statistical estimator and scope of valid interpretation.
186
+
187
+ ## 中文说明
188
+
189
+ QCBench 面向量子计算真机的测评与表征,首版提供读出分配误差、GHZ 态保真度、镜像电路成功率、T1 和回波 T2 的电路生成与 counts 分析,支持 OpenQASM 3 导出、Qiskit 设备编译、IBM Runtime 显式提交/结果采集以及 JSON/CSV 报告。真机、模拟器和合成数据必须明确区分。默认离线演示不连接云平台,也不提交真机任务;首版尚未执行付费 QPU 验证,不包含真实设备排名或虚构真机分数。
@@ -0,0 +1,15 @@
1
+ qcbench/__init__.py,sha256=VqxAOl6x1d9GbqhSibaHn5vAPZrTG1RGOYLM-MZyD4s,421
2
+ qcbench/__main__.py,sha256=ee5vE0xcUZM3fPmxicvcw-IJXkm6nOwxARREHBWpF8Q,47
3
+ qcbench/analysis.py,sha256=GlxeV1-46Apvbi89EKkj0sJ5QhER5jcSo5X7NC4EcGg,6829
4
+ qcbench/cli.py,sha256=WEOX-KthxiXdQug5C-yTzs3vh4WlOzbScl-3phw93LQ,3857
5
+ qcbench/demo.py,sha256=ukxK4DtI5SJLTaqPH2pla0LMIMjyplGENhRaEkvnOZU,2018
6
+ qcbench/plans.py,sha256=0gSg3qWReSizdd3ury5lbjUnhFNno6SKx47Q4RHoBsk,6694
7
+ qcbench/qiskit_adapter.py,sha256=y1UR4C9MylsZDWZSTgTFPPi3SQ6SBu_23D172I8yrJ0,5215
8
+ qcbench/reporting.py,sha256=oQOBD_ME7uKCXYbBPR9XTGxw1qNHpDG4iMWZOib1Azs,1011
9
+ qcbench/statistics.py,sha256=HkOAyM-huuq5vlwfTYdoXlHE2LJ-SHvuWt8tdOOpIPA,3694
10
+ qcbench-0.1.0.dist-info/licenses/LICENSE,sha256=z8d0m5b2O9McPEK1xHG_dWgUBT6EfBDz6wA0F7xSPTA,11358
11
+ qcbench-0.1.0.dist-info/METADATA,sha256=KGliO-znGRJaq4Tr7WWrrjIdrRWmZ5VOifr0F7qmE-Y,13635
12
+ qcbench-0.1.0.dist-info/WHEEL,sha256=mOdXR9C3wMVov7cSY8PY-XCzo3SmmWCHvGQr5csJoao,91
13
+ qcbench-0.1.0.dist-info/entry_points.txt,sha256=wQ7b-Xdim_jMXnvYmxdKREGOYTUx4UHVByFuIeS_Flg,45
14
+ qcbench-0.1.0.dist-info/top_level.txt,sha256=e_WkQDIsLP2dDnSEQbWlVhHWkwvFjgmW2gxEl7qAWdM,8
15
+ qcbench-0.1.0.dist-info/RECORD,,
@@ -0,0 +1,5 @@
1
+ Wheel-Version: 1.0
2
+ Generator: setuptools (84.2.1)
3
+ Root-Is-Purelib: true
4
+ Tag: py3-none-any
5
+
@@ -0,0 +1,2 @@
1
+ [console_scripts]
2
+ qcbench = qcbench.cli:main
@@ -0,0 +1,202 @@
1
+
2
+ Apache License
3
+ Version 2.0, January 2004
4
+ http://www.apache.org/licenses/
5
+
6
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
7
+
8
+ 1. Definitions.
9
+
10
+ "License" shall mean the terms and conditions for use, reproduction,
11
+ and distribution as defined by Sections 1 through 9 of this document.
12
+
13
+ "Licensor" shall mean the copyright owner or entity authorized by
14
+ the copyright owner that is granting the License.
15
+
16
+ "Legal Entity" shall mean the union of the acting entity and all
17
+ other entities that control, are controlled by, or are under common
18
+ control with that entity. For the purposes of this definition,
19
+ "control" means (i) the power, direct or indirect, to cause the
20
+ direction or management of such entity, whether by contract or
21
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
22
+ outstanding shares, or (iii) beneficial ownership of such entity.
23
+
24
+ "You" (or "Your") shall mean an individual or Legal Entity
25
+ exercising permissions granted by this License.
26
+
27
+ "Source" form shall mean the preferred form for making modifications,
28
+ including but not limited to software source code, documentation
29
+ source, and configuration files.
30
+
31
+ "Object" form shall mean any form resulting from mechanical
32
+ transformation or translation of a Source form, including but
33
+ not limited to compiled object code, generated documentation,
34
+ and conversions to other media types.
35
+
36
+ "Work" shall mean the work of authorship, whether in Source or
37
+ Object form, made available under the License, as indicated by a
38
+ copyright notice that is included in or attached to the work
39
+ (an example is provided in the Appendix below).
40
+
41
+ "Derivative Works" shall mean any work, whether in Source or Object
42
+ form, that is based on (or derived from) the Work and for which the
43
+ editorial revisions, annotations, elaborations, or other modifications
44
+ represent, as a whole, an original work of authorship. For the purposes
45
+ of this License, Derivative Works shall not include works that remain
46
+ separable from, or merely link (or bind by name) to the interfaces of,
47
+ the Work and Derivative Works thereof.
48
+
49
+ "Contribution" shall mean any work of authorship, including
50
+ the original version of the Work and any modifications or additions
51
+ to that Work or Derivative Works thereof, that is intentionally
52
+ submitted to Licensor for inclusion in the Work by the copyright owner
53
+ or by an individual or Legal Entity authorized to submit on behalf of
54
+ the copyright owner. For the purposes of this definition, "submitted"
55
+ means any form of electronic, verbal, or written communication sent
56
+ to the Licensor or its representatives, including but not limited to
57
+ communication on electronic mailing lists, source code control systems,
58
+ and issue tracking systems that are managed by, or on behalf of, the
59
+ Licensor for the purpose of discussing and improving the Work, but
60
+ excluding communication that is conspicuously marked or otherwise
61
+ designated in writing by the copyright owner as "Not a Contribution."
62
+
63
+ "Contributor" shall mean Licensor and any individual or Legal Entity
64
+ on behalf of whom a Contribution has been received by Licensor and
65
+ subsequently incorporated within the Work.
66
+
67
+ 2. Grant of Copyright License. Subject to the terms and conditions of
68
+ this License, each Contributor hereby grants to You a perpetual,
69
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
70
+ copyright license to reproduce, prepare Derivative Works of,
71
+ publicly display, publicly perform, sublicense, and distribute the
72
+ Work and such Derivative Works in Source or Object form.
73
+
74
+ 3. Grant of Patent License. Subject to the terms and conditions of
75
+ this License, each Contributor hereby grants to You a perpetual,
76
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
77
+ (except as stated in this section) patent license to make, have made,
78
+ use, offer to sell, sell, import, and otherwise transfer the Work,
79
+ where such license applies only to those patent claims licensable
80
+ by such Contributor that are necessarily infringed by their
81
+ Contribution(s) alone or by combination of their Contribution(s)
82
+ with the Work to which such Contribution(s) was submitted. If You
83
+ institute patent litigation against any entity (including a
84
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
85
+ or a Contribution incorporated within the Work constitutes direct
86
+ or contributory patent infringement, then any patent licenses
87
+ granted to You under this License for that Work shall terminate
88
+ as of the date such litigation is filed.
89
+
90
+ 4. Redistribution. You may reproduce and distribute copies of the
91
+ Work or Derivative Works thereof in any medium, with or without
92
+ modifications, and in Source or Object form, provided that You
93
+ meet the following conditions:
94
+
95
+ (a) You must give any other recipients of the Work or
96
+ Derivative Works a copy of this License; and
97
+
98
+ (b) You must cause any modified files to carry prominent notices
99
+ stating that You changed the files; and
100
+
101
+ (c) You must retain, in the Source form of any Derivative Works
102
+ that You distribute, all copyright, patent, trademark, and
103
+ attribution notices from the Source form of the Work,
104
+ excluding those notices that do not pertain to any part of
105
+ the Derivative Works; and
106
+
107
+ (d) If the Work includes a "NOTICE" text file as part of its
108
+ distribution, then any Derivative Works that You distribute must
109
+ include a readable copy of the attribution notices contained
110
+ within such NOTICE file, excluding those notices that do not
111
+ pertain to any part of the Derivative Works, in at least one
112
+ of the following places: within a NOTICE text file distributed
113
+ as part of the Derivative Works; within the Source form or
114
+ documentation, if provided along with the Derivative Works; or,
115
+ within a display generated by the Derivative Works, if and
116
+ wherever such third-party notices normally appear. The contents
117
+ of the NOTICE file are for informational purposes only and
118
+ do not modify the License. You may add Your own attribution
119
+ notices within Derivative Works that You distribute, alongside
120
+ or as an addendum to the NOTICE text from the Work, provided
121
+ that such additional attribution notices cannot be construed
122
+ as modifying the License.
123
+
124
+ You may add Your own copyright statement to Your modifications and
125
+ may provide additional or different license terms and conditions
126
+ for use, reproduction, or distribution of Your modifications, or
127
+ for any such Derivative Works as a whole, provided Your use,
128
+ reproduction, and distribution of the Work otherwise complies with
129
+ the conditions stated in this License.
130
+
131
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
132
+ any Contribution intentionally submitted for inclusion in the Work
133
+ by You to the Licensor shall be under the terms and conditions of
134
+ this License, without any additional terms or conditions.
135
+ Notwithstanding the above, nothing herein shall supersede or modify
136
+ the terms of any separate license agreement you may have executed
137
+ with Licensor regarding such Contributions.
138
+
139
+ 6. Trademarks. This License does not grant permission to use the trade
140
+ names, trademarks, service marks, or product names of the Licensor,
141
+ except as required for reasonable and customary use in describing the
142
+ origin of the Work and reproducing the content of the NOTICE file.
143
+
144
+ 7. Disclaimer of Warranty. Unless required by applicable law or
145
+ agreed to in writing, Licensor provides the Work (and each
146
+ Contributor provides its Contributions) on an "AS IS" BASIS,
147
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
148
+ implied, including, without limitation, any warranties or conditions
149
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
150
+ PARTICULAR PURPOSE. You are solely responsible for determining the
151
+ appropriateness of using or redistributing the Work and assume any
152
+ risks associated with Your exercise of permissions under this License.
153
+
154
+ 8. Limitation of Liability. In no event and under no legal theory,
155
+ whether in tort (including negligence), contract, or otherwise,
156
+ unless required by applicable law (such as deliberate and grossly
157
+ negligent acts) or agreed to in writing, shall any Contributor be
158
+ liable to You for damages, including any direct, indirect, special,
159
+ incidental, or consequential damages of any character arising as a
160
+ result of this License or out of the use or inability to use the
161
+ Work (including but not limited to damages for loss of goodwill,
162
+ work stoppage, computer failure or malfunction, or any and all
163
+ other commercial damages or losses), even if such Contributor
164
+ has been advised of the possibility of such damages.
165
+
166
+ 9. Accepting Warranty or Additional Liability. While redistributing
167
+ the Work or Derivative Works thereof, You may choose to offer,
168
+ and charge a fee for, acceptance of support, warranty, indemnity,
169
+ or other liability obligations and/or rights consistent with this
170
+ License. However, in accepting such obligations, You may act only
171
+ on Your own behalf and on Your sole responsibility, not on behalf
172
+ of any other Contributor, and only if You agree to indemnify,
173
+ defend, and hold each Contributor harmless for any liability
174
+ incurred by, or claims asserted against, such Contributor by reason
175
+ of your accepting any such warranty or additional liability.
176
+
177
+ END OF TERMS AND CONDITIONS
178
+
179
+ APPENDIX: How to apply the Apache License to your work.
180
+
181
+ To apply the Apache License to your work, attach the following
182
+ boilerplate notice, with the fields enclosed by brackets "[]"
183
+ replaced with your own identifying information. (Don't include
184
+ the brackets!) The text should be enclosed in the appropriate
185
+ comment syntax for the file format. We also recommend that a
186
+ file or class name and description of purpose be included on the
187
+ same "printed page" as the copyright notice for easier
188
+ identification within third-party archives.
189
+
190
+ Copyright [yyyy] [name of copyright owner]
191
+
192
+ Licensed under the Apache License, Version 2.0 (the "License");
193
+ you may not use this file except in compliance with the License.
194
+ You may obtain a copy of the License at
195
+
196
+ http://www.apache.org/licenses/LICENSE-2.0
197
+
198
+ Unless required by applicable law or agreed to in writing, software
199
+ distributed under the License is distributed on an "AS IS" BASIS,
200
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
201
+ See the License for the specific language governing permissions and
202
+ limitations under the License.
@@ -0,0 +1 @@
1
+ qcbench