change_of_basis_matrix_to_quil

forest.benchmarking.robust_phase_estimation.change_of_basis_matrix_to_quil(qc: pyquil.api._quantum_computer.QuantumComputer, qubits: Sequence[int], change_of_basis: numpy.ndarray) → pyquil.quil.Program

Helper to return a native quil program for the given qc to implement the change_of_basis matrix.

Parameters:
  • qc – Quantum Computer that will need to use the change of basis
  • qubits – the qubits the program should act on
  • change_of_basis – a unitary matrix acting on len(qubits) many qubits
Returns:

a native quil program that implements change_of_basis on the qubits of qc.