RelaxationNoisePass#

class RelaxationNoisePass(*args, **kwargs)[source]#

Bases: LocalNoisePass

Add duration dependent thermal relaxation noise after instructions.

Initialize RelaxationNoisePass.

Parameters:
  • t1s – List of T1 times in seconds for each qubit.

  • t2s – List of T2 times in seconds for each qubit.

  • dt – Backend sample time (resolution) in seconds. This is required for converting dt-unit op durations to times in scheduled circuits.

  • op_types – Optional, the operation types to add relaxation to. If None relaxation will be added to all operations.

  • excited_state_populations – Optional, list of excited state populations for each qubit at thermal equilibrium. If not supplied or obtained from the backend this will be set to 0 for each qubit.

Attributes

is_analysis_pass#

Check if the pass is an analysis pass.

If the pass is an AnalysisPass, that means that the pass can analyze the DAG and write the results of that analysis in the property set. Modifications on the DAG are not allowed by this kind of pass.

is_transformation_pass#

Check if the pass is a transformation pass.

If the pass is a TransformationPass, that means that the pass can manipulate the DAG, but cannot modify the property set (but it can be read).

Methods

__call__(circuit: QuantumCircuit, property_set: PropertySet | dict | None = None) QuantumCircuit[source]#

Runs the pass on circuit.

Parameters:
  • circuit – The dag on which the pass is run.

  • property_set – Input/output property set. An analysis pass might change the property set in-place.

Returns:

If on transformation pass, the resulting QuantumCircuit. If analysis pass, the input circuit.

execute(passmanager_ir: PassManagerIR, state: PassManagerState, callback: Callable = None) tuple[PassManagerIR, PassManagerState][source]#

Execute optimization task for input Qiskit IR.

Parameters:
  • passmanager_ir – Qiskit IR to optimize.

  • state – State associated with workflow execution by the pass manager itself.

  • callback – A callback function which is caller per execution of optimization task.

Returns:

Optimized Qiskit IR and state of the workflow.

name() str[source]#

Name of the pass.

run(dag: DAGCircuit) DAGCircuit[source]#

Run the LocalNoisePass pass on dag. :param dag: DAG to be changed.

Returns:

A changed DAG.

Raises:

TranspilerError – if generated operation is not valid.

update_status(state: PassManagerState, run_state: RunState) PassManagerState[source]#

Update workflow status.

Parameters:
  • state – Pass manager state to update.

  • run_state – Completion status of current task.

Returns:

Updated pass manager state.