1

I can easily add any Unitary gate which I create using Qiskit but it gives a warning when I try to add these rotation gates to the noise model basis gates. It might be a problem with the labelling(I used 'rx' and 'ry') or some other issues which I am not able to figure out.

The problem is the noise won't affect these gates unless I add them to the basis gates.

noise_model = NoiseModel()
error_1 = depolarizing_error(prob_1, 1)
error_2 = depolarizing_error(prob_2, 2)
noise_model.add_all_qubit_quantum_error(phase_damping_error(0.1), ['Z1','Z2','rx','ry','h'])
noise_model.add_all_qubit_quantum_error(phase_damping_error(0.1),['CZϕA','CZϕB'])
noise_model.add_basis_gates(['unitary','rx','ry'])
basis_gates = noise_model.basis_gates
circs = transpile([qc1, qc2, qc3], basis_gates=basis_gates)
result_error = execute(circs,
                 QasmSimulator(),
                 shots=10,
                 noise_model=noise_model,
                 basis_gates=basis_gates).result()

print(noise_model)

Warning: Adding a gate "rx" to basis_gates which is not in QasmSimulator basis_gates.
Warning: Adding a gate "ry" to basis_gates which is not in QasmSimulator basis_gates.
NoiseModel:
  Basis gates: ['cx', 'h', 'id', 'u3', 'unitary']
  Instructions with noise: ['CZϕB', 'Z2', 'CZϕA', 'rx', 'h', 'ry', 'Z1']
  All-qubits errors: ['Z1', 'Z2', 'rx', 'ry', 'h', 'CZϕA', 'CZϕB']

0 Answers0