Beispiel #1
0
 /// <summary>
 /// Checks whether or not this physical gate can be executed
 /// on the given architecture according to the given mapping.
 /// </summary>
 /// <param name="architecture"> The architecture to check if this gate can be executed on it. </param>
 /// <param name="map"> The mapping according to which the gate should be executable. </param>
 /// <returns>
 /// True if and only if this gate can be executed on the given architecture graph,
 /// according to the given mapping.
 /// </returns>
 public abstract bool CanBeExecutedOn(Architecture architecture, Mapping map);
Beispiel #2
0
 /// <summary>
 /// See <see cref="Gate.CanBeExecutedOn(Architecture)"/>.
 /// </summary>
 /// <returns>
 /// True if and only if there exists a connection between the mapping of
 /// the control and target qubit in the given architecture.
 /// </returns>
 public override bool CanBeExecutedOn(Architecture architecture, Mapping map)
 {
     return(architecture.HasConnection(map.Map[Qubits[0]], map.Map[Qubits[1]]));
 }