smartyfy.mrindigi.com

Quantum Computing Master Course — 140. Hardware Comparison Exercise

Lesson 140: Hardware Comparison Exercise

Smartyfy Quantum Computing Master Course

Objectives and prerequisites

Compare two hardware proposals using one explicit workload, separate measured evidence from a calculation, and identify missing information before making a decision. Prerequisites are routing, benchmark interpretation, independent probabilities, and statistical standard error. The two targets below are fictional and intentionally simplified. They do not represent named platforms or current market offerings.

Write the decision question first

Suppose a team wants to execute a four-logical-qubit circuit repeatedly and estimate a bounded observable. Before comparing devices, specify the circuit, required precision, number of samples, output interpretation, and acceptable noise. State whether the comparison concerns one physical execution, end-to-end time, or fault-tolerant performance. These are different objectives.

Our first workload is a single CNOT between two qubits initially placed at opposite ends of a four-position path. The other two qubits contain information that must be preserved. The output layout may change if the measurement map is recorded correctly. We request 100,000 independent shots for the timing exercise, with no claim that this count is sufficient to overcome systematic device bias.

Declare two fictional targets

Target A has a four-position bidirectional path, while target B supports every pair directly. Their primitive CNOT error parameters, durations, and per-shot overheads are shown below. For this exercise only, errors are independent Bernoulli failure flags and gates on permitted pairs have identical parameters within each target. This is a teaching cost model, not a complete quantum noise channel.

Fictional target assumptions, not measured platform specifications
Property Target A Target B Meaning
Connectivity Four-position path Complete four-position graph Bidirectional CNOT edges
Primitive CNOT failure parameter 0.001 0.003 Independent toy flags
CNOT duration 200 nanoseconds 2 microseconds Assumed layer duration
Other per-shot time 5 microseconds 20 microseconds Combined preparation, readout and reset allowance

The table does not include actual readout errors, leakage, drift, crosstalk, queue time, network delay, or software overhead. Therefore the following calculations cannot establish real application accuracy or total service turnaround. Stating those omissions before calculating prevents a precise number from acquiring a stronger meaning than its inputs support.

Compare the remote interaction

Use the route from Lesson 138 on target A: two SWAPs followed by the desired CNOT, without restoring the layout. At three CNOTs per SWAP, this costs seven sequential CNOTs. Target B uses one direct CNOT. The initial-layout and final-layout conventions must be the same in the compared logical tasks.

Under the toy independent-flag model, the probability that no CNOT failure flag occurs is 0.999^7 ≈ 0.993021 on target A and 0.997 on target B. Target B therefore has the higher gate-survival proxy for this remote interaction despite its worse individual-gate parameter. Connectivity has changed the comparison.

Target A takes 7 × 0.2 + 5 = 6.4 microseconds per shot. Target B takes 1 × 2 + 20 = 22 microseconds per shot. For 100,000 shots, these become 0.64 seconds and 2.2 seconds, excluding the omitted overheads. Thus A is faster in this simplified timing model while B has the better gate-survival proxy. Neither is unconditionally better across both objectives.

Change the workload and the ranking can change

Now use two CNOTs on disjoint adjacent pairs, with both targets permitted to run them in one layer. Both require two gates, so their no-flag probabilities are 0.999² = 0.998001 and 0.997² = 0.994009. Target A now has the better gate-survival proxy because the remote-routing penalty disappeared.

The one-layer timing is 0.2 + 5 = 5.2 microseconds per shot for A and 2 + 20 = 22 microseconds for B. For this workload, A is better on both declared proxies. This conclusion depends on the assumed parallel capability; a complete connectivity graph does not independently establish simultaneous-gate support.

Executed comparison and precision scale

from math import prod, sqrt
# Fictional targets. Times are seconds; failure parameters are model inputs.
targets = {
    'A': {'cx_error': 0.001, 'cx_seconds': 200e-9, 'shot_overhead': 5e-6},
    'B': {'cx_error': 0.003, 'cx_seconds': 2e-6, 'shot_overhead': 20e-6}
}
shots = 100_000
for workload, counts, depths in [('remote', (7,1), (7,1)),
                                 ('two_local_pairs', (2,2), (1,1))]:
    for name, gates, depth in zip(('A','B'), counts, depths):
        t = targets[name]
        success_proxy = (1-t['cx_error'])**gates
        seconds_per_shot = depth*t['cx_seconds'] + t['shot_overhead']
        print(workload, name, 'gate-survival proxy', round(success_proxy, 8),
              'total seconds', round(shots*seconds_per_shot, 8))
assert (1-.003) > (1-.001)**7
assert (1-.001)**2 > (1-.003)**2
assert abs(shots*(7*200e-9+5e-6)-.64)<1e-12
assert abs(shots*(2e-6+20e-6)-2.2)<1e-12
print('Worst-case independent ±1 mean standard error:', 1/sqrt(shots))

The code was executed locally using the standard library. It reproduces the gate-survival and timing values above. It does not submit circuits or estimate any actual device’s performance. The printed standard-error scale, 1/√100000 ≈ 0.003162, is the worst-case standard error of the mean for independent outcomes valued +1 or −1.

More shots reduce statistical uncertainty around the distribution actually sampled. They do not automatically remove coherent errors, readout bias, or an incorrectly mapped observable. Comparing sample counts without comparing bias and output definitions can favor a faster but systematically inaccurate estimate. Error mitigation may change variance and runtime, so its full sampling overhead belongs in the comparison.

Use dated evidence for a real evaluation

Replace each fictional input with traceable evidence: a calibration record, documented benchmark protocol, device graph, gate specification, or measured end-to-end experiment. Record when the evidence was obtained and whether it applies to isolated or simultaneous operations. A historical research demonstration supports a mechanism or a dated result, not necessarily a provider’s current service configuration.

Ask whether error numbers share the same definition: average infidelity, assignment error, leakage probability, logical error per cycle, and conditional fidelity are different metrics. Ask whether reported time includes reset, measurement, classical feedforward, communication, and repeated attempts. Distinguish an available-qubit count from the usable connected subset needed by the compiled workload.

For a fault-tolerant application, replace the raw-gate proxy with a code-and-decoder analysis, logical operation schedule, factory throughput, and failure budget. Comparing a physical gate’s fidelity with an encoded logical memory rate is not a fair substitution. Both can be informative, but only after their roles in the architecture are made explicit.

Present a conditional recommendation

A defensible comparison states the task and objective, gives results under the declared model, identifies uncertainties that could reverse the choice, and proposes a matched validation experiment. In this exercise, target A is preferable for the stipulated timing objective, while target B improves the remote gate-survival proxy. For the local-pair workload, target A wins both simplified metrics.

If the missing readout or leakage information could dominate the actual outcome, the correct decision is provisional rather than an invented universal ranking. Hardware evaluation is an exercise in matching evidence to requirements, not compressing every engineering feature into a single unsupported score.

Four exercises with worked solutions

  1. If target A must restore its original layout after the remote CNOT, what is its timing?

    Solution. The route costs thirteen sequential CNOTs. Per shot, time is 13 × 0.2 + 5 = 7.6 microseconds. At 100,000 shots this is 0.76 seconds under the same overhead model.

  2. Why is 0.999^7 not automatically the circuit’s output-state fidelity?

    Solution. It is the probability of no modeled independent gate-failure flag. Real errors can be coherent, correlated, harmless for some inputs, or combined with omitted readout and leakage processes. A quantum fidelity needs a specified channel and state metric.

  3. How many independent ±1 shots give worst-case standard error at most 0.001?

    Solution. Require 1/√N ≤ 0.001, so N ≥ 1,000,000. This controls sampling standard error under independence, not systematic bias.

  4. What evidence should accompany a real gate-duration comparison?

    Solution. State the native gate, pulse or compiled implementation, operating date, simultaneous-operation conditions, and which preparation, measurement, reset, or control delays are included. Otherwise the time units may describe different tasks.

Five explained multiple-choice questions

  1. Target B’s remote-interaction survival proxy improves because: A. Its primitive CNOT error parameter is smaller. B. It avoids the declared SWAP routing overhead. C. A complete graph removes every noise source. D. Longer gates always preserve coherence better.

    Answer: B. One noisier primitive can outperform seven cleaner primitives under the specific independent-flag model.

  2. For the remote workload, the declared model favors: A. Target B for both time and gate survival. B. Target A for both time and gate survival. C. Identical performance because both have four positions. D. Target A for time and target B for gate survival.

    Answer: D. The two objectives produce different rankings from the calculated values.

  3. Increasing shot count primarily reduces: A. Every coherent gate bias by the same factor. B. The physical leakage probability per execution. C. Statistical uncertainty under the sampling assumptions. D. The number of SWAPs required by the graph.

    Answer: C. Repetition estimates the actual sampled distribution more precisely without automatically correcting its bias.

  4. A dated isolated-gate benchmark should be used for a dense workload by: A. Checking whether its conditions and metric match the compiled workload. B. Assuming its error applies unchanged to every simultaneous gate. C. Converting it directly to a logical-cycle rate. D. Treating its confidence interval as coverage of all future calibration drift.

    Answer: A. Operating conditions and metric definitions determine whether evidence transfers.

  5. The fictional table supports: A. A current ranking of named commercial platforms. B. A proof of fault-tolerant application success. C. A complete end-to-end service runtime estimate. D. Conditional comparisons within the explicitly declared toy model.

    Answer: D. Missing physical and operational information limits the conclusions.

Pitfalls and summary

Compare matched workloads with matched metrics, count compilation and timing overhead, and retain dates and uncertainty. A useful conclusion is conditional and reproducible; it does not turn one favorable benchmark into a universal platform ranking.

Primary sources and further study

These sources support the definitions and context. The numerical examples, exercises, and explanations here were prepared for this lesson. Research papers are optional advanced reading.