I'm trying to follow the instructions here https://qiskit.org/documentation/getting_started.html. It says

The default backend for qiskit.visualization.circuit_drawer() or QuantumCircuit.draw() is the text backend. However, depending on your local environment you may want to change these defaults to something better suited for your use case. This is done with the user config file. By default the user config file should be located in ~/.qiskit/settings.conf and is a .ini file.

I don't see this config file anywhere. Can anyone tell me how I can find the location of this file in order to make the change from the text based plotter to the nicer plotter?


If you are working in Windows, the default location should be C:\Users\[user]\.qiskit, which might be hidden by default. Create a text file in that folder named settings.conf and set it up how you like.

For example by default

from qiskit import *
qc = QuantumCircuit(2)


text drawer circuit output

With settings.conf in the folder referenced above, containing the two lines


the same code produces

mpl drawer circuit output

| improve this answer | |
  • $\begingroup$ Thank you very much. And since I will be using this on a Mac as well, can I ask where this file should be in a Mac? $\endgroup$ – user1936752 Nov 6 '19 at 22:42
  • 1
    $\begingroup$ @user1936752 Sorry, I've never worked with qiskit in iOS. However, if you have your API token stored locally, you should have a file named qiskitrc in this folder already. Try doing a search for that file. $\endgroup$ – Jonathan Trousdale Nov 6 '19 at 22:47
  • 2
    $\begingroup$ @user1936752 Is it not just Users/[user]/.qiskit? If not a search for .qiskit should lead you there as well. $\endgroup$ – Jonathan Trousdale Nov 6 '19 at 23:41
  • $\begingroup$ Thank you - you were indeed correct. However it may be worth adding to your answer that this folder might be hidden! It was for me, hence the trouble finding it $\endgroup$ – user1936752 Nov 7 '19 at 12:01
  • 1
    $\begingroup$ @user1936752 No problem! It's in there, first sentence. $\endgroup$ – Jonathan Trousdale Nov 7 '19 at 12:29

Use the command ls -alt in Terminal on macOS to find hidden files. It's there. This should work for all Mac users.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.