MCPhaseGate

class MCPhaseGate(lam, num_ctrl_qubits, label=None)[source]

Multi-controlled-Phase gate.

This is a diagonal and symmetric gate that induces a phase on the state of the target qubit, depending on the state of the control qubits.

Circuit symbol:

    q_0: ───■────
            │
            .
            │
q_(n-1): ───■────
         ┌──┴───┐
    q_n: ┤ P(λ) ├
         └──────┘

See also

CPhaseGate: The singly-controlled-version of this gate.

Create new MCPhase gate.

Attributes

MCPhaseGate.ctrl_state

Return the control state of the gate as a decimal integer.

MCPhaseGate.decompositions

Get the decompositions of the instruction from the SessionEquivalenceLibrary.

MCPhaseGate.definition

Return definition in terms of other basic gates.

MCPhaseGate.label

Return gate label

MCPhaseGate.num_ctrl_qubits

Get number of control qubits.

MCPhaseGate.params

return instruction params.

Methods

MCPhaseGate.add_decomposition(decomposition)

Add a decomposition of the instruction to the SessionEquivalenceLibrary.

MCPhaseGate.assemble()

Assemble a QasmQobjInstruction

MCPhaseGate.broadcast_arguments(qargs, cargs)

Validation and handling of the arguments and its relationship.

MCPhaseGate.c_if(classical, val)

Add classical condition on register classical and value val.

MCPhaseGate.control([num_ctrl_qubits, …])

Controlled version of this gate.

MCPhaseGate.copy([name])

Copy of the instruction.

MCPhaseGate.inverse()

Return inverted MCU1 gate (\(MCU1(\lambda){\dagger} = MCU1(-\lambda)\))

MCPhaseGate.is_parameterized()

Return True .IFF.

MCPhaseGate.mirror()

DEPRECATED: use instruction.reverse_ops().

MCPhaseGate.power(exponent)

Creates a unitary gate as gate^exponent.

MCPhaseGate.qasm()

Return a default OpenQASM string for the instruction.

MCPhaseGate.repeat(n)

Creates an instruction with gate repeated n amount of times.

MCPhaseGate.reverse_ops()

For a composite instruction, reverse the order of sub-instructions.

MCPhaseGate.to_matrix()

Return a Numpy.array for the gate unitary matrix.