mqt.bench.benchmarks.vqe_two_local¶
VQE twolocal ansatz benchmark definition.
Module Contents¶
- create_circuit(num_qubits: int, rotation_blocks: str | Gate | Iterable[str | Gate] = 'ry', entanglement_blocks: str | Gate | Iterable[str | Gate] = 'cx', entanglement: str = 'full', reps: int = 3) QuantumCircuit[source]¶
Returns a quantum circuit implementing the TwoLocal ansatz.
- Parameters:
num_qubits – number of qubits of the returned quantum circuit
rotation_blocks – type of rotation gates to use (default: “ry”, other options can be arbitrary single-qubit gates)
entanglement_blocks – type of entanglement gates to use (default: “cx”, other options can be arbitrary multi-qubit gates)
entanglement – type of entanglement to use (default: “full”, other options: “reverse_linear”, “linear”, “full”, “pairwise”, “circular”, “sca”)
reps – number of repetitions (layers) in the ansatz
- Returns:
QuantumCircuit – a quantum circuit implementing the TwoLocal ansatz