Class CHGate

All Implemented Interfaces:
Gate

public final class CHGate extends TwoQubitGate
Controlled Hadamard (CH) quantum gate.

A two-qubit gate where the target qubit undergoes a Hadamard transformation if the control qubit is |1⟩. The gate matrix in the computational basis {|00⟩, |01⟩, |10⟩, |11⟩} is:

 [1  0  0   0  ]
 [0  1  0   0  ]
 [0  0  H[0][0] H[0][1]]
 [0  0  H[1][0] H[1][1]]
 

where H is the Hadamard matrix.

  • Constructor Details

    • CHGate

      public CHGate()
  • Method Details

    • name

      public String name()
      Description copied from interface: Gate
      Get the name of this gate (e.g., "H", "X", "CNOT").
      Returns:
      the gate name