Exemplo n.º 1
0
def test_QCBM(benchmark, nqubits):
    benchmark.group = "QCBM"
    qubits = quest.createQureg(nqubits, env)
    pairs = [(i, (i + 1) % nqubits) for i in range(nqubits)]
    benchmark(run_qcbm, qubits, nqubits, 9, pairs)
Exemplo n.º 2
0
def test_Toffoli(benchmark, nqubits):
    benchmark.group = "Toffoli"
    X = ((0.0, 0.0), (1.0, 0.0), (1.0, 0.0), (0.0, 0.0))
    qubits = quest.createQureg(nqubits, env)
    benchmark(quest.multiControlledUnitary, qubits, [0, 1], 2, 2, X)
Exemplo n.º 3
0
def run_bench(benchmark, gate, nqubits, args):
    qubits = quest.createQureg(nqubits, env)
    benchmark(gate, qubits, *args)
Exemplo n.º 4
0
def test_QFT(benchmark, nqubits):
    benchmark.group = "QFT"
    qubits = quest.createQureg(nqubits, env)
    benchmark(run_qft, qubits, nqubits)