Package com.quantum4j.core.gates
Class CHGate
java.lang.Object
com.quantum4j.core.gates.TwoQubitGate
com.quantum4j.core.gates.CHGate
- All Implemented Interfaces:
Gate
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.
-
Field Summary
Fields inherited from class com.quantum4j.core.gates.TwoQubitGate
matrix -
Constructor Summary
Constructors -
Method Summary
Methods inherited from class com.quantum4j.core.gates.TwoQubitGate
apply, arity
-
Constructor Details
-
CHGate
public CHGate()
-
-
Method Details
-
name
Description copied from interface:GateGet the name of this gate (e.g., "H", "X", "CNOT").- Returns:
- the gate name
-