FermionCircuitSolver.to_operators

FermionCircuitSolver.to_operators(circuit)

Convert a circuit to a list of second quantized operators that describe the generators of the gates applied to the circuit. The SecondQuantizedOps generating the gates are embedded in the larger space corresponding to the entire circuit.

Parameters:

circuit (QuantumCircuit) – A quantum circuit with gates described by second quantized generators

Returns:

a list of second-quantized operators, one for each applied gate, in the order of the gates in the circuit

Return type:

operators

Raises:
  • QiskitColdAtomError

    • If a given gate can not be converted into a second-quantized operator - If a gate is applied after a measurement instruction - If a circuit instruction other than a Gate, measure, load or barrier is given

  • NotImplementedError – If ignore_barriers is False