105 lines
2.8 KiB
Plaintext
105 lines
2.8 KiB
Plaintext
---
|
||
title: GlobalPhaseGate
|
||
description: API reference for qiskit.circuit.library.GlobalPhaseGate
|
||
in_page_toc_min_heading_level: 1
|
||
python_api_type: class
|
||
python_api_name: qiskit.circuit.library.GlobalPhaseGate
|
||
---
|
||
|
||
# GlobalPhaseGate
|
||
|
||
<Class id="qiskit.circuit.library.GlobalPhaseGate" isDedicatedPage={true} github="https://github.com/qiskit/qiskit/tree/stable/0.25/qiskit/circuit/library/standard_gates/global_phase.py" signature="qiskit.circuit.library.GlobalPhaseGate(phase, label=None)" modifiers="class">
|
||
Bases: [`Gate`](qiskit.circuit.Gate "qiskit.circuit.gate.Gate")
|
||
|
||
The global phase gate ($e^{i\theta}$).
|
||
|
||
Can be applied to a [`QuantumCircuit`](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit")
|
||
|
||
**Mathematical Representation:**
|
||
|
||
$$
|
||
\text{GlobalPhaseGate}\ =
|
||
\begin{pmatrix}
|
||
e^{i\theta}
|
||
\end{pmatrix}
|
||
$$
|
||
|
||
**Parameters**
|
||
|
||
* **phase** ([*ParameterExpression*](qiskit.circuit.ParameterExpression "qiskit.circuit.parameterexpression.ParameterExpression") *|*[*float*](https://docs.python.org/3/library/functions.html#float "(in Python v3.12)")) – The value of phase it takes.
|
||
* **label** ([*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.12)") *| None*) – An optional label for the gate.
|
||
|
||
## Attributes
|
||
|
||
### condition\_bits
|
||
|
||
<Attribute id="qiskit.circuit.library.GlobalPhaseGate.condition_bits">
|
||
Get Clbits in condition.
|
||
</Attribute>
|
||
|
||
### decompositions
|
||
|
||
<Attribute id="qiskit.circuit.library.GlobalPhaseGate.decompositions">
|
||
Get the decompositions of the instruction from the SessionEquivalenceLibrary.
|
||
</Attribute>
|
||
|
||
### definition
|
||
|
||
<Attribute id="qiskit.circuit.library.GlobalPhaseGate.definition">
|
||
Return definition in terms of other basic gates.
|
||
</Attribute>
|
||
|
||
### duration
|
||
|
||
<Attribute id="qiskit.circuit.library.GlobalPhaseGate.duration">
|
||
Get the duration.
|
||
</Attribute>
|
||
|
||
### label
|
||
|
||
<Attribute id="qiskit.circuit.library.GlobalPhaseGate.label">
|
||
Return instruction label
|
||
</Attribute>
|
||
|
||
### name
|
||
|
||
<Attribute id="qiskit.circuit.library.GlobalPhaseGate.name">
|
||
Return the name.
|
||
</Attribute>
|
||
|
||
### num\_clbits
|
||
|
||
<Attribute id="qiskit.circuit.library.GlobalPhaseGate.num_clbits">
|
||
Return the number of clbits.
|
||
</Attribute>
|
||
|
||
### num\_qubits
|
||
|
||
<Attribute id="qiskit.circuit.library.GlobalPhaseGate.num_qubits">
|
||
Return the number of qubits.
|
||
</Attribute>
|
||
|
||
### params
|
||
|
||
<Attribute id="qiskit.circuit.library.GlobalPhaseGate.params">
|
||
return instruction params.
|
||
</Attribute>
|
||
|
||
### unit
|
||
|
||
<Attribute id="qiskit.circuit.library.GlobalPhaseGate.unit">
|
||
Get the time unit of duration.
|
||
</Attribute>
|
||
|
||
## Methods
|
||
|
||
### inverse
|
||
|
||
<Function id="qiskit.circuit.library.GlobalPhaseGate.inverse" signature="inverse()">
|
||
Return inverted GLobalPhaseGate gate.
|
||
|
||
$\text{GlobalPhaseGate}(\lambda)^{\dagger} = \text{GlobalPhaseGate}(-\lambda)$
|
||
</Function>
|
||
</Class>
|
||
|